SwiftLint v0.13.1 Release Notes

  • ๐Ÿ’ฅ Breaking
    • None.
    โœจ Enhancements
    • โž• Add ImplicitGetterRule to warn against using get on computed read-only properties.
      Marcelo Fabri #57

    • โž• Add WeakDelegateRule rule to enforce delegate instance variables to be marked as weak.
      Olivier Halligon

    • โž• Add SyntacticSugar rule that enforces that shorthanded syntax should be used when possible, for example [Int] instead of Array<Int>.
      Marcelo Fabri #319

    • ๐Ÿ‘ Allow specifying multiple rule identifiers in comment commands. For example, // swiftlint:disable:next force_cast force_try. Works with all command types (disable/enable) and modifiers (next, this, previous or blank).
      JP Simard #861

    • โž• Add NimbleOperatorRule opt-in rule that enforces using operator overloads instead of free matcher functions when using Nimble.
      Marcelo Fabri #881

    • closure_spacing rule now accepts empty bodies with a space.
      Marcelo Fabri #875

    • โž• Add TrailingCommaRule to enforce/forbid trailing commas in arrays and dictionaries. The default is to forbid them, but this can be changed with the mandatory_comma configuration.
      Marcelo Fabri #883

    • โž• Add support for fileprivate in PrivateOutletRule and PrivateUnitTestRule.
      Marcelo Fabri #781 #831

    • ๐Ÿ‘‰ Make MarkRule correctable.
      kohtenko

    ๐Ÿ› Bug Fixes
    • Rule out a few invalid @IBInspectable cases in valid_ibinspectable.
      Daniel Duan

    • ๐Ÿ›  Fix a few edge cases where malformed MARK: comments wouldn't trigger a violation.
      JP Simard #805

    • ๐Ÿ‘• Now lints single files passed to --path even if this file is excluded from the configuration file (.swiftlint.yml).
      JP Simard

    • ๐Ÿ›  Fixed error severity configuration in colon rule.
      Marcelo Fabri #863

    • switch_case_on_newline rule should ignore trailing comments.
      Marcelo Fabri #874

    • switch_case_on_newline rule shouldn't trigger on enums.
      Marcelo Fabri #878

    • ๐Ÿ›  Fix regex bug in Comma Rule causing some violations to not be triggered when there were consecutive violations in the same expression.
      Savio Figueiredo #872