All notable changes to this project will be documented in this file.
The format is based on Keep a Changelog.
Formatting Rules for Entries
Each entry should use the following format:- Summary of what was changed in a single line using past tense & followed by two whitespaces.
Issue: [#0](https://github.com/FlineDev/AnyLint/issues/0) | PR: [#0](https://github.com/FlineDev/AnyLint/pull/0) | Author: [Cihat Gündüz](https://github.com/Jeehut)
Note that at the end of the summary line, you need to add two whitespaces (
) for correct rendering on GitHub.
If needed, pluralize to Tasks
, PRs
or Authors
and list multiple entries separated by ,
. Also, remove entries not needed in the second line.
- None.
- None.
- None.
- None.
- None.
- None.
- Added a new
--unvalidated
(-u
) option for running all checks without running the validations provided, such as testing formatchingExamples
andnonMatchingExamples
. Use with cuation.
- Some internal code clean-up.
- Upgrade to Swift 5.7 manifest syntax.
- The
--measure
option also measured validations & files search which distorted the measure time for the first check with the same files search. Now, it only measures the actual matching time of the Regex for better evaluation.
- Improved output color & formatting of new
--measure
option for printing execution time per check.
Author: Cihat Gündüz
- New
--measure
option did not work when no violations were found, now also prints when all checks succeed.
Author: Cihat Gündüz
- New
--measure
/-m
option to print execution times per check to find slow checks easily.
Author: Cihat Gündüz
- The execution time of all checks are now being measured, independent of what options are provided.
Author: Cihat Gündüz
- Allow
customCheck
closure to be throwing by re-throwing if they are.
Author: Cihat Gündüz
- Default violation level was changed from
error
towarning
.
Author: Cihat Gündüz | Issue: #47
- Added new option
violationLocation
parameter forcheckFileContents
for specifying position of violation marker using.init(range:bound:)
, whererange
can be one of.fullMatch
or.captureGroup(index:)
and bound one of.lower
or.upper
.
- Fixed an issue where first violation can't be shown in Xcode due to 'swift-driver version: 1.45.2' printed on same line.
- Fixed an issue with pointing to the wrong Swift-SH path on Apple Silicon Macs. Should also fix the path on Linux.
Author: Cihat Gündüz | Issue: #46
- Bumped minimum required Swift tools version to 5.4.
Author: Cihat Gündüz - Removed
Package.resolved
file to prevent pinning dependency versions.
Author: Cihat Gündüz
- Made internal extension methos public for usage in
customCheck
.
PR: #35 | Author: Cihat Gündüz - Print diff out to console for multiline autocorrections that were applied.
Issue: #27 | PR: #35 | Author: Cihat Gündüz
- Made internal methods in types
FilesSearch
andViolation
public for usage incustomCheck
.
PR: #34 | Author: Cihat Gündüz
- Added new
repeatIfAutoCorrected
option tocheckFileContents
method to repeat the check if last run did any auto-corrections.
Issue: #29 | PR: #31 | Author: Cihat Gündüz - Added new Regex Cheat Sheet section to README including a tip on how to workaround the pointer issue.
Issue: #3 | PR: #32 | Author: Cihat Gündüz
- A new AnyLint custom check was added to ensure
AnyLint
fails whenLinuxMain.swift
isn't up-to-date, useful as a git pre-commit hook.
Author: Cihat Gündüz | PR: #28
- When a given
autoCorrectReplacement
on thecheckFileContents
method leads to no changes, the matched string of the givenregex
is considered to be already correct, thus no violation is reported anymore.
Issue: #26 | PR: #28 | Author: Cihat Gündüz - A CI pipeline using GitHub Actions was setup, which is much faster as it runs multiple tasks in parallel than Bitrise.
Author: Cihat Gündüz
- Summary output states how many files have been checked to make it easier to find include/exclude regexes.
Author: Cihat Gündüz - Made
Violation
public for usage incustomCheck
methods.
Author: Cihat Gündüz
- Removed version specifier from
lint.swift
file to get always latestAnyLint
library.
Author: Cihat Gündüz
- Attempt to fix an issue that lead to failed builds with an error on Linux CI servers.
Issue: #22 | Author: Cihat Gündüz
- Hugely improved performance of subsequent file searches with the same combination of
includeFilters
andexcludeFilters
. For example, if 30 checks were sharing the same filters, each file search is now ~8x faster.
Issue: #20 | PR: #21 | Author: Cihat Gündüz
- Added a way to specify Regex options for literal initialization via
/i
,/m
(String) or#"\"#: "im"
(Dictionary).
PR: #18 | Author: Cihat Gündüz
- New
-s
/--strict
option to fail on warnings as well (by default fails only on errors).
PR: #15 | Author: Cihat Gündüz - New
-l
/--validate
option to only runs validations formatchingExamples
,nonMatchingExamples
andautoCorrectExamples
.
PR: #17 | Author: Cihat Gündüz
- New
-d
/--debug
option to log more info about what AnyLint is doing. Required to add a checks completion block inlogSummaryAndExit
and moved it up in the blank template.
PR: #13 | Author: Cihat Gündüz
- Made
AutoCorrection
expressible by Dictionary literals and updated theREADME.md
accordingly.
Issue: #5 | PR: #11 | Author: Cihat Gündüz - Added option to skip checks within file contents by specifying
AnyLint.skipHere: <CheckInfo.ID>
orAnyLint.skipInFile: <All or CheckInfo.ID>
. Checkout the Skip file content checks README section for more info.
Issue: #9 | PR: #12 | Author: Cihat Gündüz
- Added new
-x
/--xcode
option to print out warnings & errors in an Xcode-compatible manner to improve user experience when used with an Xcode build script. Requiresarguments: CommandLine.arguments
as parameters tologSummary
in config file.
Issue: #4 | PR: #8 | Author: Cihat Gündüz
- Added two simple lint check examples in first code sample in README. (Thanks for the pointer, Dave Verwer!)
Author: Cihat Gündüz
- Changed
CheckInfo
id casing convention from snake_case to UpperCamelCase inblank
template.
Author: Cihat Gündüz
Initial public release.