@jpsim jpsim released this Apr 8, 2018 · 413 commits to master since this release

Assets 5

This is the last release to support building with Swift 3.2 and Swift 3.3.
The next release will require Swift 4.0 or higher to build.

Breaking

  • None.

Enhancements

  • Add LowerACLThanParent rule.
    Keith Smiley
    #2136

  • Add UIOffsetMake to legacy_constructor rule.
    Nealon Young
    #2126

  • Add a new excluded config parameter to the explicit_type_interface rule
    to exempt certain types of variables from the rule.
    Rounak Jain
    #2028

  • Add empty_string opt-in rule to validate against comparing strings to ""
    instead of using .isEmpty.
    Davide Sibilio

  • Add untyped_error_in_catch opt-in rule to warn against declaring errors
    without an explicit type in catch statements instead of using the implicit
    error variable.
    Daniel Metzing
    #2045

  • Add all keyword for use in disable / enable statement:
    // swiftlint:disable all.
    It allows disabling SwiftLint entirely, in-code, for a particular section.
    fredpi
    #2071

  • Adds --force-exclude option to lint and autocorrect commands, which will
    force SwiftLint to exclude files specified in the config excluded even if
    they are explicitly specified with --path.
    Ash Furrow
    #2051

  • Adds discouraged_optional_collection opt-in rule to encourage the use of
    empty collections instead of optional collections.
    Ornithologist Coder
    #1885

  • Add 4.1.0, 4.1.1 and 4.2.0 to Swift version detection.
    Norio Nomura
    #2143

  • Support building with Swift 4.1.
    Norio Nomura
    #2038

Bug Fixes

  • Fixes an issue with the yoda_condition rule where the severity would always
    display as a warning, and the reason would display as the severity type.
    Twig

  • Fix TODOs lint message to state that TODOs should be resolved instead of
    avoided.
    Adonis Peralta
    #150

  • Fix some cases where colon rule wouldn't autocorrect dictionary literals.
    Marcelo Fabri
    #2050

  • Fix linux crash on sources with surrogate pair emojis as variable names.
    Cyril Lashkevich

  • Make legacy_constructor rule more reliable, especially for autocorrecting.
    Marcelo Fabri
    #2098

  • Fix colon rule autocorrect when preprocessor macros are present.
    Marcelo Fabri
    #2099

  • Fix crash when saving cache if there're entries referring to the same path
    but with different capitalization.
    Marcelo Fabri
    #2032

  • Fix several rules (empty_enum_arguments, explicit_init
    empty_parentheses_with_trailing_closure, joined_default_parameter,
    redundant_optional_initialization, redundant_void_return and
    unused_closure_parameter) rules autocorrection inside functions or other
    declarations.
    Marcelo Fabri

  • Fix redundant_void_return rule autocorrect when preprocessor macros are
    present.
    John Szumski
    #2115

  • Fix issue where the autocorrect done message used the plural form of "files"
    even if only 1 file changed.
    John Szumski

  • Fix false positives in attributes rule when using Swift 4.1.
    Marcelo Fabri
    #2125
    #2141