SwiftLint v0.44.0 Release Notes

  • ๐Ÿ’ฅ Breaking

    • ๐Ÿ‘• SwiftLint now requires Swift 5.3 or higher to build.
      JP Simard

    Experimental

    • None.

    โœจ Enhancements

    • โž• Add configuration options to missing_docs rule:

      • excludes_extensions defaults to true to skip reporting violations for extensions with missing documentation comments.
      • excludes_inherited_types defaults to true to skip reporting violations for inherited declarations, like subclass overrides.
        Ben Fox
    • Fix false negative on redundant_optional_initialization rule when variable has observers.
      Isaac Ressler #3621

    • Make test_case_accessibility rule identify invalid test functions with parameters.
      Keith Smiley #3612

    • Add duplicated_key_in_dictionary_literal rule to warn against duplicated keys in dictionary literals.
      Marcelo Fabri

    • ๐Ÿ›  Fix the rule name from "Colon" to "Colon Spacing" to improve phrasing.
      Radu #3587

    • Add discouraged_none_name opt-in rule to discourage naming cases and static/class members "none", which can conflict with Swift's Optional<T>.none when checking equality.
      Kane Cheshire #3624

    • ๐Ÿ‘Œ Improve language and positioning of file_length warnings when ignore_comment_only_lines: true.
      Steven Grosmark #3654

    • Add anonymous_argument_in_multiline_closure opt-in rule to validate that named arguments are used in closures that span multiple lines.
      Marcelo Fabri

    ๐Ÿ› Bug Fixes

    • Fix false positives in empty_enum_arguments rule when comparing values with a static member (e.g. if number == .zero).
      Marcelo Fabri #3562

    • ๐Ÿ›  Fix the regex for expiring-todos.
      namolnad #3597

    • Fix type_contents_order initializer detection.
      StevenMagdy

    • ๐Ÿ›  Fix autocorrect when there's no space between the tuple the in keyword on unneeded_parentheses_in_closure_argument rule.
      p-x9 #3633

    • Fix unused_capture_list, empty_enum_arguments, implicit_return and explicit_type_interface rules when using Swift 5.4.
      Marcelo Fabri #3615 #3685

    • ๐Ÿ›  Fix Xcode build logs with spaces in paths preventing analyze from running.
      adamawolf