SwiftLint v0.47.1 Release Notes
-
๐ฅ Breaking
- None.
Experimental
- None.
โจ Enhancements
Add new option
only_enforce_before_trivial_lines
tovertical_whitespace_closing_braces
rule. It restricts the rule to apply only before trivial lines (containing only closing braces, brackets and parentheses). This allows empty lines before non-trivial lines of code (e.g. if-else-statements).
benjamin-kramer #3940โ Add type-checked analyzer rule version of
ArrayInitRule
namedTypesafeArrayInitRule
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 #3840Add back
return_value_from_void_function
opt-in rule to warn against usingreturn <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 #3343Add
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 ofif #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 #39200๏ธโฃ 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