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 of self inside an inline closure used for initializing a variable. In this case, self refers to the NSObject.self method and likely won't be what you expect. You can make the variable lazy to be able to refer to the current instance with self or use MyClass.self if you really want to reference the method.
      Marcelo Fabri

    • 0๏ธโƒฃ Exclude id from identifier_name by default.
      Artem Garmash #3651

    • ๐Ÿ– Handle get async and get throws (introduced in Swift 5.5) in the implicit_getter rule.
      Marcelo Fabri #3684

    • Speed up explicit type interface rule.
      PaulTaykalo #3745

    • Speed up analyzer rules.
      PaulTaykalo #3747

    ๐Ÿ› Bug Fixes

    • ๐Ÿ›  Fix a bug with the missing_docs rule where excludes_inherited_types would not be set.
      Ben Fox

    • Fix 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 using do/catch.
      Marcelo Fabri #3724

    • Speed up Computed Accessors Order rule. PaulTaykalo #3727

    • [Colon Rule] Fix case when comment is used in function call. PaulTaykalo #3740