Breaking
- None.
Experimental
- None.
Enhancements
-
Add type-checked analyzer rule version of
ArrayInitRule
named
TypesafeArrayInitRule
with identifiertypesafe_array_init
that
avoids the false positives present in the lint rule.
SimplyDanny
#3749 -
Add the
--in-process-sourcekit
command line flag tolint
andanalyze
commands, which has the same effect as setting theIN_PROCESS_SOURCEKIT
environment variable.
Juozas Valancius -
Add a new
artifactbundle
release asset containingswiftlint
binaries for
x86 & arm64 macOS.
Juozas Valancius
#3840 -
Add back
return_value_from_void_function
opt-in rule to warn against using
return <expression>
in a function that returnsVoid
.
Marcelo Fabri -
Don't skip autocorrect on files that have parser warnings. Only files with
errors reported by the Swift parser will be skipped.
Marcelo Fabri
#3343 -
Add
accessibility_label_for_image
rule to warn if a SwiftUI
Image does not have an accessibility label and is not hidden from
accessibility.
Ryan Cole -
Add
unavailable_condition
rule to prefer usingif #unavailable
instead of
if #available
with an empty body and anelse
condition when using
Swift 5.6 or later.
Marcelo Fabri
#3897 -
Add
comma_inheritance
rule to validate that inheritance clauses use commas
instead of&
.
Marcelo Fabri
#3950
Bug Fixes
-
Fix false positives in
unused_closure_parameter
when using parameters with
backticks.
JP Simard
#3628 -
Improved the
syntactic_sugar
rule's detection accuracy and fixed some
corrections leading to invalid code.
Paul Taykalo
#3866 -
Fix analyzer rules with Xcode 13.3 / Swift 5.6. Note that we've measured
performance regressions compared to Swift 5.5 on the order of about 2x.
JP Simard
#3920 -
Error by default on bad expiring todo date formatting.
Christopher Hale
#3636 -
Lint/analyze all files listed in the command even if the
--path
option is
used.
coffmark