SwiftLint v0.45.0 Release Notes
-
๐ฅ Breaking
- ๐ SwiftLint now requires Swift 5.4 or higher to build.
JP Simard
Experimental
- None.
โจ Enhancements
Add
self_in_property_initialization
rule to catch uses ofself
inside an inline closure used for initializing a variable. In this case,self
refers to theNSObject.self
method and likely won't be what you expect. You can make the variablelazy
to be able to refer to the current instance withself
or useMyClass.self
if you really want to reference the method.
Marcelo Fabri0๏ธโฃ Exclude
id
fromidentifier_name
by default.
Artem Garmash #3651๐ Handle
get async
andget throws
(introduced in Swift 5.5) in theimplicit_getter
rule.
Marcelo Fabri #3684Speed up explicit type interface rule.
PaulTaykalo #3745Speed up analyzer rules.
PaulTaykalo #3747
๐ Bug Fixes
๐ Fix a bug with the
missing_docs
rule whereexcludes_inherited_types
would not be set.
Ben FoxFix redundant_optional_initialization autocorrect broken in case observer's brace exists. Naruki Chigira #3718
Fix a false positive in the
unneeded_break_in_switch
rule when usingdo/catch
.
Marcelo Fabri #3724Speed up Computed Accessors Order rule. PaulTaykalo #3727
[Colon Rule] Fix case when comment is used in function call. PaulTaykalo #3740
- ๐ SwiftLint now requires Swift 5.4 or higher to build.