SwiftLint v0.13.1 Release Notes
-
๐ฅ Breaking
- None.
โจ Enhancements
โ Add
ImplicitGetterRule
to warn against usingget
on computed read-only properties.
Marcelo Fabri #57โ Add
WeakDelegateRule
rule to enforce delegate instance variables to be marked asweak
.
Olivier Halligonโ Add
SyntacticSugar
rule that enforces that shorthanded syntax should be used when possible, for example[Int]
instead ofArray<Int>
.
Marcelo Fabri #319๐ Allow specifying multiple rule identifiers in comment commands. For example,
// swiftlint:disable:next force_cast force_try
. Works with all command types (disable
/enable
) and modifiers (next
,this
,previous
or blank).
JP Simard #861โ Add
NimbleOperatorRule
opt-in rule that enforces using operator overloads instead of free matcher functions when using Nimble.
Marcelo Fabri #881closure_spacing
rule now accepts empty bodies with a space.
Marcelo Fabri #875โ Add
TrailingCommaRule
to enforce/forbid trailing commas in arrays and dictionaries. The default is to forbid them, but this can be changed with themandatory_comma
configuration.
Marcelo Fabri #883โ Add support for
fileprivate
inPrivateOutletRule
andPrivateUnitTestRule
.
Marcelo Fabri #781 #831๐ Make
MarkRule
correctable.
kohtenko
๐ Bug Fixes
Rule out a few invalid
@IBInspectable
cases invalid_ibinspectable
.
Daniel Duan๐ Fix a few edge cases where malformed
MARK:
comments wouldn't trigger a violation.
JP Simard #805๐ Now lints single files passed to
--path
even if this file is excluded from the configuration file (.swiftlint.yml
).
JP Simard๐ Fixed error severity configuration in
colon
rule.
Marcelo Fabri #863switch_case_on_newline
rule should ignore trailing comments.
Marcelo Fabri #874switch_case_on_newline
rule shouldn't trigger on enums.
Marcelo Fabri #878๐ Fix regex bug in Comma Rule causing some violations to not be triggered when there were consecutive violations in the same expression.
Savio Figueiredo #872