SwiftLint v0.22.0 Release Notes
-
π₯ Breaking
- π§ Nested configurations will now be merged with parent configurations rather
than replace them outright.
StΓ©phane Copin JP Simard #676
β¨ Enhancements
β Add
is_disjoint
rule to encourage usingSet.isDisjoint(with:)
overSet.intersection(_:).isEmpty
.
JP Simardβ Add
xctfail_message
rule to enforce XCTFail calls to include a description of the assertion.
Ornithologist Coder #13700οΈβ£ Add
joined_default_parameter
correctable opt-in rule to discourage explicit usage of the default separator.
Ornithologist Coder #1093 #1757Files with extensions other than
.swift
can now be used as arguments to--file
when linting or autocorrecting.
Marcelo Fabri #1721π Allow
()?
,Void?
,()!
, andVoid!
as return types inredundant_void_return
rule.
Ryan Booker #1761β Add
single_test_class
opt-in rule to validate that test files only contain a singleQuickSpec
orXCTestCase
subclass.
Ornithologist Coder #1779π Produce an error when a
// swiftlint:disable
command does not silence any violations.
JP Simard #1102Add
quick_discouraged_call
opt-in rule to discourage calls and object initialization inside 'describe' and 'context' block in Quick tests.
Ornithologist Coder #1781Invalidate cache when Swift version changes.
Marcelo FabriAdd
pattern_matching_keywords
opt-in rule to enforce movinglet
andvar
keywords outside tuples in aswitch
.
Marcelo Fabri #202Add
explicit_enum_raw_value
opt-in rule to allow refactoring the Swift API without breaking the API contract.
Mazyod #1778Add
no_grouping_extension
opt-in rule to disallow the use of extensions for code grouping purposes within the same file.
Mazyod #1767π Improve
syntactic_sugar
violation message to be type-specific.
Marcelo Fabri #1803Add
multiple_closures_with_trailing_closure
rule that disallows trailing closure syntax when passing more than one closure argument to a function.
Erik Strottmann #1801
π Bug Fixes
π Fix false positive on
force_unwrapping
rule when declaring local variable with implicity unwrapped type.
OtΓ‘vio Lima #1710π Fix the warning message and autocorrection of
vertical_whitespace
rule to display the maximum empty lines allowed ifmax_empty_lines
is greater than 1.
Hossam Ghareeb #1763π Fix for the wrong configuration being used when using
--path
and a configuration exists in a parent directory.
Marcelo Fabri #1744π Fix false positive on
unused_enumerated
rule with complex variable bindings.
Marcelo Fabri #1787π Fix incorrect violations and autocorrections on
unneeded_parentheses_in_closure_argument
rule that were generated in some cases (mainly when using chained method calls with closures).
Marcelo Fabri
- π§ Nested configurations will now be merged with parent configurations rather
than replace them outright.