@jpsim jpsim released this Jun 22, 2018 · 219 commits to master since this release

Assets 5

Breaking

Enhancements

  • Add optional filename verification to the file_header rule.
    All occurrences in the pattern of the SWIFTLINT_CURRENT_FILENAME
    placeholder are replaced by the name of the validated file.
    Anders Hasselqvist
    #1079

  • Updates the untyped_error_in_catch rule to support autocorrection.
    Daniel Metzing

  • Add no_fallthrough_only rule to check that case statements do not
    contain only a fallthrough.
    Austin Belknap

  • Add indented_cases support to switch_case_alignment rule.
    Shai Mishali
    #2119

  • Add opt-in modifier_order to enforce the order of declaration modifiers.
    Requires Swift 4.1 or later.
    Jose Cheyo Jimenez
    Daniel Metzing
    #1472
    #1585

  • Validate implicit subscript getter in implicit_getter rule when using
    Swift 4.1 or later.
    Marcelo Fabri
    #898

  • Add unavailable_function opt-in rule to validate that functions that are
    currently unimplemented (using a placeholder fatalError) are marked with
    @available(*, unavailable).
    Marcelo Fabri
    #2127

  • Updates the closure_end_indentation rule to support autocorrection.
    Eric Horacek

  • Updates the literal_expression_end_indentation rule to support
    autocorrection.
    Eric Horacek

  • Add a new multiline_function_chains rule to validate that chained function
    calls start either on the same line or one per line.
    Eric Horacek
    #2214

  • Improves the mark rule's autocorrection.
    Eric Horacek

  • Add redundant_set_access_control rule to warn against using redundant
    setter ACLs on variable declarations.
    Marcelo Fabri
    #1869

  • Add a new ignores_interpolated_strings config parameter to the line_length
    rule to ignore lines that include interpolated strings from this rule.
    Michael Gray
    #2100

  • Add a new ignores_default_parameters config parameter to the
    function_parameter_count rule to ignore default parameter when calculating
    parameter count. True by default.
    Varun P M
    #2171

  • Add empty_xctest_method opt-in rule which warns against empty
    XCTest methods.
    Ornithologist Coder
    #2190

  • Add function_default_parameter_at_end opt-in rule to validate that
    parameters with defaults are located toward the end of the parameter list in a
    function declaration.
    Marcelo Fabri
    #2176

  • Add file_name opt-in rule validating that file names contain the name of a
    type or extension declared in the file (if any).
    JP Simard
    #1420

  • Add convenience_type opt-in rule to validate that types hosting only static
    members should be enums to avoid instantiation.
    Marcelo Fabri
    #1871

Bug Fixes

  • Update LowerACLThanParent rule to not lint extensions.
    Keith Smiley
    #2164

  • Fix operator usage spacing nested generics false positive.
    Eric Horacek
    #1341
    #1897

  • Fix autocorrection for several rules
    (empty_parentheses_with_trailing_closure, explicit_init,
    joined_default_parameter, redundant_optional_initialization and
    unused_closure_parameter) when used with preprocessor macros.
    John Szumski
    Marcelo Fabri

  • Fix unneeded_parentheses_in_closure_argument false negatives when multiple
    violations are nested.
    Marcelo Fabri
    #2188

  • Fix false negatives in implicit_return rule when using closures as
    function arguments.
    Marcelo Fabri
    #2187

  • Fix false positives in attributes rule when @testable is used.
    Marcelo Fabri
    #2211

  • Fix false positives in prohibited_super_call rule.
    Marcelo Fabri
    #2212

  • Fix a false positive in unused_closure_parameter rule when a parameter
    is used in a string interpolation.
    Marcelo Fabri
    #2062

  • Fixes a case where the closure_end_indentation rule wouldn't lint the end
    indentation of non-trailing closure parameters.
    Eric Horacek
    #2121