SwiftLint v0.23.0 Release Notes
-
๐ฅ Breaking
- None.
โจ Enhancements
๐ Fix csv reporter to output records with new lines.
atetlawAdd
contains_over_first_not_nil
rule to encourage usingcontains
overfirst(where:) != nil
.
Samuel Susla #1514โ Add
fallthrough
rule that flags usage offallthrough
.
Marcelo Fabri #1834๐ Improve
colon
rule to catch violations in dictionary types (e.g.[String: Int]
), when usingAny
and on function calls.
Marcelo Fabri #1074 #1389Add
switch_case_alignment
rule to validate thatcase
anddefault
statements are vertically aligned with their enclosingswitch
statement.
Austin Luโ Add
array_init
opt-in rule to validate thatArray(foo)
should be preferred overfoo.map({ $0 })
.
Marcelo Fabri #1271๐ง Truncate long configuration console descriptions to fit in the console window when running
swiftlint rules
.
JP Simard #1002โ Add
multiline_arguments
opt-in rule that warns to either keep all the arguments of a function call on the same line, or one per line.
Marcel JackwerthAdd
unneeded_break_in_switch
rule to validate that no extrabreak
s are added inswitch
statements.
Marcelo Fabri #1870Add
literal_expression_end_indentation
opt-in rule to validate that array and dictionary literals ends have the same indentation as the line that started them.
Marcelo Fabri #1435
๐ Bug Fixes
๐ Improve how
opening_brace
rule reports violations locations.
Marcelo Fabri #1811Fix false negatives in
unneeded_parentheses_in_closure_argument
rule when using capture lists.
Marcelo Fabri #1817Fix handling of attributes (
lazy
,objc
, etc.) for thelet_var_whitespace
rule.
David Catmull #1770 #1812๐ Fix false positives in
for_where
rule when usingif var
insidefor
.
Marcelo Fabri #1838Fix false positive in
class_delegate_protocol
rule when using Swift 4.0.1.
Marcelo Fabri #1856๐ง Print multi-line configuration values in a single line when running
swiftlint rules
to avoid breaking the table format.
JP Simard #1002๐ Ignore SwiftLint commands (
swiftlint:(disable|enable)
) infile_header
rule, making it work better withsuperfluous_disable_command
rule.
Marcelo Fabri #1810Fix false negatives in
generic_type_name
,identifier_name
andtype_name
rules when usingallowed_symbols
.
Marcelo Fabri