SwiftLint v0.41.0 Release Notes

Release Date: 2020-11-08 // over 3 years ago
  • laundromat voting

    πŸ’₯ Breaking

    πŸ”„ Changed behavior of strict option on lint and analyze to treat
    ⚠ all warnings as errors instead of only changing the exit code.
    Jeehut
    πŸ‘• #3312

    Removed the unneeded_notification_center_removal rule because it was
    based on an incorrect premise.
    JP Simard
    πŸ‘• #3338

    πŸ”§ The whitelist_rules configuration key has been renamed to
    only_rules.
    Dalton Claybrook

    Experimental

    • None.

    ✨ Enhancements

    βž• Add use-alternative-excluding option to speed up linting in cases
    πŸ‘• described in #3325.
    This option yields different exclusion behavior.
    JohnReeze
    πŸ‘• #3304

    Add test_case_accessibility rule.
    Keith Smiley
    πŸ‘• #3376

    βž• Add more details to CONTRIBUTING.md.
    mknabbe
    πŸ‘• #1280

    βœ‚ Remove @IBOutlet and @IBInspectable from UnusedDeclarationRule.
    Keith Smiley
    πŸ‘• #3184

    Add allow_multiline_func configuration option to opening_brace
    rule, to allow placing { on new line in case of multiline function.
    0️⃣ Defaults to false.
    Zsolt KovΓ‘cs
    πŸ‘• #1921

    ⚑️ Update the nslocalizedstring_key rule to validate the comment
    argument in addition to the key argument.
    Dalton Claybrook
    πŸ‘• #3334

    βž• Add inclusive_language rule to encourage the use of inclusive
    language that avoids discrimination against groups of people.
    Dalton Claybrook

    βž• Add prefer_nimble opt-in rule to encourage using Nimble matchers
    βœ… over the XCTest ones.
    Marcelo Fabri
    πŸ‘• #3293

    unused_closure_parameter rule now validates closures outside of
    function calls.
    Marcelo Fabri
    πŸ‘• #1082

    πŸ‘Œ Improve documentation for running SwiftLint as Xcode build phase.
    Christian Mitteldorf
    πŸ‘• #3169

    Add skip_aligned_constants (defaults to true) and
    lines_look_around (defaults to 2) configuration parameters to the
    operator_usage_whitespace rule.
    Paul Taykalo
    πŸ‘• #3388

    πŸ› Bug Fixes

    πŸ›  Fix parsing of Xcode 12 compiler logs for analyzer rules.
    JP Simard
    πŸ‘• #3365

    πŸ›  Fix some SwiftUI unused declaration rule false positives.
    JP Simard
    πŸ‘• #3365

    πŸ›  Fix some false positives in rule explicit_self.
    Sven MΓΌnnich

    Fix incorrect autocorrection in prefer_zero_over_explicit_init rule.
    Paul Taykalo

    Rule unused_capture_list should not be triggered by unowned self
    keyword.
    hank121314
    πŸ‘• #3389

    πŸ›  Fix severity configuration for indentation_width.
    Samasaur1
    πŸ‘• #3346

    πŸ›  Fix DuplicateImportsRule's support for import attributes.
    Keith Smiley
    πŸ‘• #3402

    πŸ‘ Allow "allowed symbols" as first character in identifier_name.
    JP Simard
    πŸ‘• #3306

    πŸ›  Fix false positives with parameterized attributes in attributes.
    JP Simard
    πŸ‘• #3316

    πŸ›  Fix some missed cases in rule unavailable_function.
    Quinn Taylor
    πŸ‘• #3374

    πŸ›  Fix incorrect violation message for line length violations.
    JP Simard
    πŸ‘• #3333

    Fix inconsistency in operator_usage_whitespace rule.
    Paul Taykalo
    πŸ‘• #3321

    πŸ›  Fix false positives in convenience_type rule for types that cannot
    be converted to enums.
    ZevEisenberg
    πŸ‘• #3033

    πŸ›  Fix finding a nested config when a single file path is passed.
    Seth Friedman

    πŸ›  Fix incorrect calculation of the root path when a directory in the
    tree is passed in as a path argument.
    Seth Friedman
    πŸ‘• #3383

    πŸ›  Fix rare false positive in toggle_bool rule.
    Marcelo Fabri
    πŸ‘• #3398