SwiftLint v0.19.0 Release Notes
-
π₯ Breaking
β Remove support for Swift 2.
Marcelo Fabri #1453π Remove
missing_docs
andvalid_docs
rules since they were already disabled.
Marcelo Fabri #1453β Add
modificationDate(forFileAtPath:)
function requirement toLintableFileManager
protocol.
Victor Pimentelπ Several breaking changes to
LinterCache
.
Victor Pimentel JP Simardβ Remove
Configuration.hash
property.
Victor Pimentelπ Rename
ConditionalReturnsOnNewline
struct toConditionalReturnsOnNewlineRule
to match rule naming conventions.
JP Simard
β¨ Enhancements
π Cache linter results for files unmodified since the previous linter run.
Victor Pimentel JP Simard Marcelo Fabri #1184 #1550Add opt-in configurations to
generic_type_name
,identifier_name
andtype_name
rules to allow excluding non-alphanumeric characters and names that start with uppercase.
Javier HernΓ‘ndez #541β Adds support for
excluded
in custom rules to exclude files.
Nigel Flack #1437π Make
trailing_comma
rule autocorrectable.
Samuel Susla Jeremy David Giesbrecht #1326Added
no_extension_access_modifier
opt-in rule to disallow access modifiers completely, Γ la SE-0119.
Jose Cheyo Jimenez #1457β Add lowercase and missing colon checks to the
mark
rule.
Jason MooreImprove violation reason wording in
function_body_length
,large_type
, andtype_body_length
rules. Β ultimatedbzAdd
explicit_top_level_acl
opt-in rule that validates that all top level declarations should explicitly be marked with an Access Control Level (private
,fileprivate
,internal
,public
oropen
).
J. Cheyo Jimenez Marcelo Fabri #58β Add
implicit_return
opt-in rule that warns against using thereturn
keyword when it can be omitted inside closures.
Marcelo Fabri #1194Add option to
unused_optional_binding
rule to ignoretry?
inguard
statements.
Sega-Zero #1432Add
empty_enum_arguments
correctable rule that warns against using silent associated values inside acase
.
Marcelo Fabri #1425 #1549β Remove
file.zip
from thePods
directory when installing SwiftLint via CocoaPods.
Hesham Salman #1507Add
protocol_property_accessors_order
correctable rule that validates that the order of accessors isget set
when declaring variables in protocols.
Marcelo Fabri #1504π Make
Region
&Command
structs conform toEquatable
.
JP Simardπ Make
closure_spacing
aCorrectableRule
.
J. Cheyo Jimenez
π Bug Fixes
π
emoji
andcheckstyle
reporter output report sorted by file name.
norio-nomura #1429Prevent false positive in
shorthand_operator
rule.
sammy-SC #1254π Fix typo in
DiscardedNotificationCenterObserverRule
.
Spencer Kaiserπ Fix
empty_parameters
rule with Swift 3.
Marcelo Fabri #1460Prevent triggering
redundant_optional_initialization
rule on alazy var
since it needs initialization.
Marcelo Fabri #1334Fix
ignores_case_statements
key incyclomatic_complexity
description.
Jeff Blagdon #1434Fall back to reporting violations on line
1
if no line was provided for the violation's location, ensuring Xcode always displays the warning or error.
rjhodge JP Simard #1520π Fix crash or incorrect violation location with strings including multi-byte unicode characters.
Marcelo Fabri #1006π Fix false positive in
syntactic_sugar
rule when using nested types namedOptional
,ImplicitlyUnwrappedOptional
,Array
orDictionary
.
Marcelo Fabri #1508Fix false positives in
prohibited_super_call
&overridden_super_call
rules where calls tosuper
were done in nested scopes such asdefer
blocks.
JP Simard #1301π Fix non-root configurations logging configuration warnings more than once.
JP Simard #949π Fix some overlapping
// swiftlint
commands not being applied.
JP Simard #1388