SwiftLint v0.23.0 Release Notes

  • ๐Ÿ’ฅ Breaking
    • None.
    โœจ Enhancements
    • ๐Ÿ›  Fix csv reporter to output records with new lines.
      atetlaw

    • Add contains_over_first_not_nil rule to encourage using contains over first(where:) != nil.
      Samuel Susla #1514

    • โž• Add fallthrough rule that flags usage of fallthrough.
      Marcelo Fabri #1834

    • ๐Ÿ‘Œ Improve colon rule to catch violations in dictionary types (e.g. [String: Int]), when using Any and on function calls.
      Marcelo Fabri #1074 #1389

    • Add switch_case_alignment rule to validate that case and default statements are vertically aligned with their enclosing switch statement.
      Austin Lu

    • โž• Add array_init opt-in rule to validate that Array(foo) should be preferred over foo.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 Jackwerth

    • Add unneeded_break_in_switch rule to validate that no extra breaks are added in switch statements.
      Marcelo Fabri #1870

    • Add 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 #1811

    • Fix false negatives in unneeded_parentheses_in_closure_argument rule when using capture lists.
      Marcelo Fabri #1817

    • Fix handling of attributes (lazy, objc, etc.) for the let_var_whitespace rule.
      David Catmull #1770 #1812

    • ๐Ÿ›  Fix false positives in for_where rule when using if var inside for.
      Marcelo Fabri #1838

    • Fix 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)) in file_header rule, making it work better with superfluous_disable_command rule.
      Marcelo Fabri #1810

    • Fix false negatives in generic_type_name, identifier_name and type_name rules when using allowed_symbols.
      Marcelo Fabri