All Versions
99
Latest Version
Avg Release Cycle
29 days
Latest Release
-

Changelog History
Page 3

  • v0.41.0 Changes

    November 08, 2020

    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

  • v0.40.3 Changes

    September 22, 2020

    πŸ’₯ Breaking

    • None.

    Experimental

    • None.

    ✨ Enhancements

    πŸ‘‰ Make the unused_declaration rule run 3-5 times faster, and
    enable it to detect more occurrences of unused declarations.
    JP Simard

    βœ‚ Remove unneeded internal locking overhead, leading to increased
    🐎 performance in multithreaded operations.
    JP Simard

    ⚠ Skip correcting file if the swift parser reports a warning or an
    error.
    JP Simard
    πŸ‘• #3343

    πŸ› Bug Fixes

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

    Rule multiple_closures_with_trailing_closure no longer triggers when Swift
    5.3's 'multiple trailing closures' feature is used.
    Jumhyn
    πŸ‘• #3295

  • v0.40.2 Changes

    September 11, 2020

    πŸ’₯ Breaking

    • None.

    Experimental

    • None.

    ✨ Enhancements

    Improve description for empty_enum_arguments.
    πŸ–¨ Lukas Schmidt

    Add support for excluded_match_kinds custom rule config parameter.
    Ryan Demo

    πŸ› Bug Fixes

    • None.
  • v0.40.1 Changes

    August 27, 2020

    πŸ’₯ Breaking

    • None.

    Experimental

    • None.

    ✨ Enhancements

    • βž• Add support for params files for file paths.
      keith

    πŸ› Bug Fixes

    • πŸ›  Fix .swift-version to use Swift 5.1.
      cfiken #3297

    • πŸ›  Fix test testDetectSwiftVersion for Swift 5.2.5.
      cfiken #3299

  • v0.40.0 Changes

    August 10, 2020

    πŸ’₯ Breaking

    • πŸ‘• SwiftLint now requires Swift 5.1 or higher to build.
      JP Simard

    • πŸ‘Œ Improve compile commands json file validation. If you previously provided invalid files or arguments, the command will now abort.
      Keith Smiley

    Experimental

    • None.

    ✨ Enhancements

    • πŸ‘ JUnit reporter for GitLab artifact:report:junit with better representation of found issues.
      krin-san #3177

    • Add opt-in ibinspectable_in_extension rule to lint against @IBInspectable properties in extensions.
      Keith Smiley

    • Add computed_accessors_order rule to validate the order of get and set accessors in computed properties and subscripts.
      Marcelo Fabri #3158

    • Extend empty_enum_arguments rule to support if case and guard case.
      Zsolt KovΓ‘cs #3103

    • Add prefer_zero_over_explicit_init opt-in rule to enforce using .zero instead of calling constructor with zero arguments (e.g. CGPoint(x: 0, y: 0)) when using CoreGraphics types.
      Anton Nazarov #3190

    • βž• Add swiftlint docs command to easily open online documentation.
      417-72KI

    • Add unneeded_notification_center_removal rule to warn against using NotificationCenter.removeObserver(self) in deinit since it's not required after iOS 9/macOS 10.11.
      Amzed #2755

    πŸ› Bug Fixes

    • πŸ›  Fix UnusedImportRule breaking transitive imports.
      keith

    • πŸ›  Fix severity level configuration for duplicate_imports.
      Yusuke Goto

    • Fixes false positives for multiline_parameters_brackets and multiline_arguments_brackets.
      Noah Gilmore #3167

    • Fix conflict of 'opening_brace' with 'implicit_return' for functions implicitly returning a closure.
      SimplyDanny #3034

    • Fix false positive on switch_case_on_newline rule with do/catch statements when using Swift 5.3.
      Marcelo Fabri #3253

    • πŸ›  Fix false positive uppercase enum case in raw_value_for_camel_cased_codable_enum rule.
      Teameh

    • Fix false positive in no_space_in_method_call rule with multiple trailing closures (Swift 5.3).
      Marcelo Fabri #3259

    • πŸ›  Fix false negative in explicit_acl rule when using extension with Swift 5.2+.
      Marcelo Fabri #3186

    • closure_parameter_position now triggers in closures that are not inside a function call and also validates captured variables.
      Marcelo Fabri #3225

    • πŸ›  Fix some cases where the output would be incomplete when running SwiftLint on Linux.
      Marcelo Fabri #3214

    • compiler_protocol_init now triggers on IndexSet(arrayLiteral:).
      Janak Shah #3284

    • Fix false positives in extension_access_modifier rule when using Swift 5.2.
      Marcelo Fabri #3150

  • v0.39.2 Changes

    April 04, 2020

    πŸš€ This is the last release to support building with Swift 5.0.x.

    πŸ’₯ Breaking

    • None.

    Experimental

    • None.

    ✨ Enhancements

    • βž• Add configuration options to the unused_import rule to require
      explicit import statements for each module referenced in a source
      file (require_explicit_imports). When this setting is enabled,
      an allowed_transitive_imports setting may also be specified to allow
      πŸ‘€ a mapping of modules to transitively imported modules. See PR for
      πŸ‘• details: #3123
      JP Simard
      πŸ‘• #3116

    πŸ› Bug Fixes

    πŸ›  Fix more false positives in implicit_getter rule in extensions when using
    Swift 5.2.
    Marcelo Fabri
    πŸ‘• #3149

    Fix false positives in redundant_objc_attribute rule in extensions when
    using Swift 5.2.
    Marcelo Fabri

    πŸ›  Fix false positives in attributes rule when using rethrows using
    Swift 5.2.
    JP Simard

    πŸ›  Fix false positives in valid_ibinspectable rule when defining inspectable
    properties in class extensions with computed properties using Swift 5.2.
    JP Simard

  • v0.39.1 Changes

    February 11, 2020

    πŸ’₯ Breaking

    • The new rules introduced in 0.39.0 that depend on SwiftSyntax have been temporarily removed as we work out release packaging issues.
      • prohibited_nan_comparison
      • return_value_from_void_function
      • tuple_pattern
      • void_function_in_ternary
        JP Simard #3105

    Experimental

    • None.

    ✨ Enhancements

    • None.

    πŸ› Bug Fixes

    • πŸ›  Fix unused_import rule reported locations and corrections when multiple @testable imports are involved.
      JP Simard
  • v0.39.0 Changes

    February 11, 2020

    πŸ’₯ Breaking

    • Replace all uses of Int/Int64/NSRange representing byte offsets to use newly introduced ByteCount and ByteRange values instead. This will minimize the risk of accidentally using a byte-based offset in character-based contexts.
      Paul Taykalo JP Simard

    • πŸ‘• SwiftLint now imports SwiftSyntax and requires Xcode 11.0 to build.
      Marcelo Fabri

    Experimental

    • None.

    ✨ Enhancements

    • βž• Add option to pass successfully if no files passed to SwiftLint are lintable.
      thedavidharris #2608i

    • Add deinitializer type content to type_contents_order rule instead of grouping it with initializers.
      Steven Magdy

    • πŸ‘• Inline test failure messages to make development of SwiftLint easier. Test failures in triggering and non-triggering examples will appear inline in their respective files so you can immediately see which cases are working and which are not.
      ZevEisenberg #3040

    • Introduce a new SyntaxRule that enables writing rules using SwiftSyntax.
      Marcelo Fabri

    • βž• Add tuple_pattern opt-in rule to warn against using assigning variables through a tuple pattern when the left side of the assignment contains labels.
      Marcelo Fabri #2203

    • Add return_value_from_void_function opt-in rule to warn against using return <expression> in a function that is Void.
      Marcelo Fabri

    • Add void_function_in_ternary opt-in rule to warn against using a ternary operator to call Void functions.
      Marcelo Fabri #2358

    • Add only_after_dot configuration option to empty_count rule. With the option enabled, empty_count rule will ignore variables named count. By default, this option is disabled.
      Zsolt KovΓ‘cs #827

    • Add prohibited_nan_comparison opt-in rule to validate using isNaN instead of comparing values to the .nan constant.
      Marcelo Fabri #2086

    • Add case preview_provider to the order list of file_types_order to fix an issue with false positives for PreviewProvider subclasses in SwiftUI.
      Cihat GΓΌndΓΌz #2860

    πŸ› Bug Fixes

    • πŸ›  Fix false positive in attributes rule with @autoclosure parameters when using Swift 5.2.
      Mateusz Matrejek #3079

    • Fix discarded_notification_center_observer false positives when capturing observers into an array.
      Petteri Huusko

    • πŸ›  Fix crash when non-closed #if was present in file.
      PaulTaykalo

    • πŸ›  Fix false positives when line ends with carriage return + line feed.
      John Mueller #3060

    • Implicit_return description now reports current config correctly. John Buckley

    • πŸ›  Fix false positive in implicit_getter rule in extensions when using Swift 5.2.
      Marcelo Fabri #3074

    • Do not trigger optional_enum_case_matching rule on _? as the ? might be required in some situations.
      Marcelo Fabri #3057

    • πŸ›  Fix false positive in attributes rule with @escaping parameters when using Swift 5.2.
      Marcelo Fabri #3079

    • πŸ›  Fix false positive in empty_string rule when using multiline string literals.
      Marcelo Fabri #3100

  • v0.38.2 Changes

    January 08, 2020

    πŸ’₯ Breaking

    • None.

    Experimental

    • None.

    ✨ Enhancements

    • βž• Add option to configure which kinds of expressions should omit their return keyword by introducing an included configuration for the implicit_return rule. Supported values are closure, function and getter. Defaults to all three.
      Sven MΓΌnnich #2870

    • βž• Add --correctable and --verbose arguments to the rules command to allow displaying only correctable rules, and to always print the full configuration details regardless of your terminal width.
      Optional Endeavors

    • Add capture_group option to custom_rules for more fine-grained placement of the location marker for violating code.
      pyrtsa

    • Add orphaned_doc_comment rule to catch doc comments that are not attached to any declarations.
      Marcelo Fabri #2989

    • βž• Add new indentation opt-in rule (indentation_width) checking for super-basic additive indentation pattern.
      Frederick Pietschmann #227

    • Catch previously missed violations in the optional_enum_case_matching rule when case expressions involved tuples.
      JP Simard

    • πŸ‘• API docs for SwiftLintFramework are now available at realm.github.io/SwiftLint. Rules.md now redirects to the rules directory in the API docs here. Contributors no longer need to update rule documentation in PRs as this is now done automatically. The rule documentation now includes the default configuration.
      JP Simard #1653 #1704 #2808 #2933 #2961

    πŸ› Bug Fixes

    • πŸ›  Fix issues in unused_import rule when correcting violations in files containing @testable imports where more than the unused imports would be removed.
      JP Simard
  • v0.38.1 Changes

    January 04, 2020

    πŸ’₯ Breaking

    • None.

    Experimental

    • None.

    ✨ Enhancements

    πŸ‘‰ Make weak_delegate rule correctable.
    MaxHaertwig

    πŸ‘ Allow SubstitutionCorrectableRule to return nil instead of a correction
    to indicate that a suitable correction couldn't be found for a specific case.
    MaxHaertwig

    Add enum_case_associated_value_count opt-in rule.
    lakpa
    πŸ‘• #2997

    Add optional_enum_case_matching opt-in rule to validate that
    optional enum cases are matched without using ? when using Swift 5.1 or
    πŸ‘€ above. See SR-7799 for more
    details.
    Marcelo Fabri

    Add prefer_self_type_over_type_of_self opt-in rule to enforce using
    Self instead of type(of: self) when using Swift 5.1 or above.
    Marcelo Fabri
    πŸ‘• #3003

    πŸ› Bug Fixes

    πŸ›  Fix crash in unused_import rule when unused imports have trailing
    comments.
    JP Simard
    πŸ‘• #2990

    Handle @_exported imports in unused_import rule.
    JP Simard
    πŸ‘• #2877

    πŸ›  Fix false positives from the unused_declaration rule involving
    functions in protocol extensions.
    JP Simard

    πŸ›  Fix parsing of SwiftLint commands containing a URL in their trailing comment.
    Sven MΓΌnnich

    βž• Added missing parameters to FileNameConfiguration.consoleDescription.
    timcmiller
    πŸ‘• #3009

    πŸ›  Fix crash when SourceKit returns out of bounds string byte offsets.
    JP Simard