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

Changelog History
Page 6

  • v0.25.0 Changes

    πŸ’₯ Breaking

    • None.

    ✨ Enhancements

    πŸ› Bug Fixes

    • πŸ›  Fix some cases where colon rule wouldn't be autocorrected.
      Manabu Nakazawa

    • πŸ›  Fix false positives in explicit_acl rule when declaring functions and properties in protocols or implementing deinit.
      Marcelo Fabri #2014

    • Fix false negatives in unneeded_parentheses_in_closure_argument rule when using _ as one of the closure arguments.
      Marcelo Fabri #2017

    • πŸ›  Fix several rules that use attributes when linting with a Swift 4.1 toolchain.
      Marcelo Fabri #2019

    • Don't trigger violations in let_var_whitespace rule when using local variables when linting with a Swift 4.1 toolchain.
      Marcelo Fabri #2021

    • πŸ‘Œ Improve type_name rule violations to be positioned on the type name.
      Marcelo Fabri #2021

    • πŸ‘‰ Use SourceKit to validate associatedtype and typealias in type_name rule when linting with Swift 4.1.
      Marcelo Fabri #2021

    • πŸ›  Fix some cases where violations would still be triggered when using the Β ignores_function_declarations configuration of line_length rule.
      Β Manabu Nakazawa

    • Fix false positive in empty_enum_arguments rule when using closures.
      Marcelo Fabri #2041

    • πŸ›  Fix false positives in force_unwrapping rule when declaring functions that return implicitly unwrapped collections (for example [Int]! or [AnyHashable: Any]!).
      Marcelo Fabri #2042

    • πŸ›  Fix directories with a .swift suffix being treated as files.
      Jamie Edge #1948

  • v0.24.2 Changes

    πŸ’₯ Breaking

    • None.

    ✨ Enhancements

    • None.

    πŸ› Bug Fixes

    • πŸ”§ No longer log if the indentation key isn't set in the configuration file.
      JP Simard #1998
  • v0.24.1 Changes

    πŸ’₯ Breaking
    • None.
    ✨ Enhancements
    • Invalidate cache when Swift patch version changes.
      Norio Nomura

    • βž• Add private_action opt-in rule which warns against public @IBAction methods.
      Ornithologist Coder #1931

    • βž• Add yoda_condition opt-in rule which warns when Yoda conditions are used. That is, when the constant portion of the expression is on the left side of a conditional statement.
      Daniel Metzing #1924

    • πŸ”§ Indentation can now be specified via a configuration file.
      Noah McCann RubenSandwich #319

    • Add required_enum_case opt-in rule which allows enums that conform to protocols to require one or more cases. Useful for result enums.
      Donald Ritter

    • Add discouraged_object_literal opt-in rule which encourages initializers over object literals.
      Ornithologist Coder #1987

    • Adds prefixed_toplevel_constant opt-in rule which encourages top-level constants to be prefixed by k.
      Ornithologist Coder #1907

    • βž• Added explicit_acl opt-in rule to enforce explicit access control levels.
      Josep Rodriguez #1822

    πŸ› Bug Fixes
    • πŸ›  Fix false positives in control_statement rule when methods with keyword names are used.
      Marcelo Fabri #1946

    • πŸ›  Fix false positives in for_where rule when pattern matching (if case) is used.
      Marcelo Fabri #1968

    • Fix false positives in unused_closure_parameter rule when closure is wrapped in parentheses.
      JP Simard #1979

  • v0.24.0 Changes

    πŸ’₯ Breaking
    • πŸ‘• SwiftLint now requires Xcode 9 and Swift 3.2+ to build.
      Marcelo Fabri

    • βœ‚ Remove SwiftExpressionKind.other.
      Marcelo Fabri

    ✨ Enhancements
    • Add sorted_first_last opt-in rule to encourage using min() or max() over sorted().first or sorted().last.
      Tom Quist #1932

    • Add quick_discouraged_focused_test opt-in rule which warns against focused tests in Quick tests.
      Ornithologist Coder #1905

    • Add override_in_extension opt-in rule that warns against overriding declarations in an extension.
      Marcelo Fabri #1884

    • Add [f,x]{describe, context, itBehavesLike} to quick_discouraged_call rule.
      Ornithologist Coder #1903

    • Add quick_discouraged_pending_test opt-in rule which warns against pending tests in Quick tests.
      Ornithologist Coder #1909

    • πŸ”§ Speed up equality tests for [Rule] and Configuration values.
      JP Simard

    • πŸ”§ Make Configuration conform to Hashable.
      JP Simard

    • Speed up reading cached results by about 200%.
      JP Simard

    • βž• Add catch to the statements checked by the control_statement rule.
      JP Simard

    • πŸ‘‰ Make sorted_imports correctable.
      Samuel Susla JP Simard #1822

    • πŸ‘‰ Make sorted_imports only validate within "groups" of imports on directly adjacent lines.
      Samuel Susla JP Simard #1822

    πŸ› Bug Fixes
    • Extend first_where and contains_over_first_not_nil rules to also detect cases where calls to filter and first are parenthesized.
      Tom Quist

    • πŸ”§ Correct equality tests for Configuration values. They previously didn't account for warningThreshold or cachePath.
      JP Simard

    • πŸ›  Fix false positive in multiline_parameters rule when parameter is a closure with default value.
      Ornithologist Coder #1912

    • πŸ›  Fix caching on Linux.
      JP Simard

    • πŸ›  Fix crashes due to races.
      JP Simard

    • πŸ›  Fix String.characters deprecation warnings when compiling with Swift 4.0.2.
      JP Simard

  • v0.23.1 Changes

    πŸ’₯ Breaking
    • None.
    ✨ Enhancements
    • None.
    πŸ› Bug Fixes
    • πŸ›  Fix false positive in array_init rule when using a map that doesn't take a closure.
      Marcelo Fabri #1878

    • superfluous_disable_command rule can now be disabled as expected when using // swiftlint:disable superfluous_disable_command.
      Marcelo Fabri #1890

  • v0.23.0 Changes

    πŸ’₯ Breaking
    • None.
    ✨ Enhancements
    • πŸ›  Fix csv reporter to output records with new lines.
      atetlaw

    • Add contains_over_first_not_nil rule to encourage using contains over first(where:) != nil.
      Samuel Susla #1514

    • βž• Add fallthrough rule that flags usage of fallthrough.
      Marcelo Fabri #1834

    • πŸ‘Œ Improve colon rule to catch violations in dictionary types (e.g. [String: Int]), when using Any and on function calls.
      Marcelo Fabri #1074 #1389

    • Add switch_case_alignment rule to validate that case and default statements are vertically aligned with their enclosing switch statement.
      Austin Lu

    • βž• Add array_init opt-in rule to validate that Array(foo) should be preferred over foo.map({ $0 }).
      Marcelo Fabri #1271

    • πŸ”§ Truncate long configuration console descriptions to fit in the console window when running swiftlint rules.
      JP Simard #1002

    • βž• Add multiline_arguments opt-in rule that warns to either keep all the arguments of a function call on the same line, or one per line.
      Marcel Jackwerth

    • Add unneeded_break_in_switch rule to validate that no extra breaks are added in switch statements.
      Marcelo Fabri #1870

    • Add literal_expression_end_indentation opt-in rule to validate that array and dictionary literals ends have the same indentation as the line that started them.
      Marcelo Fabri #1435

    πŸ› Bug Fixes
    • πŸ‘Œ Improve how opening_brace rule reports violations locations.
      Marcelo Fabri #1811

    • Fix false negatives in unneeded_parentheses_in_closure_argument rule when using capture lists.
      Marcelo Fabri #1817

    • Fix handling of attributes (lazy, objc, etc.) for the let_var_whitespace rule.
      David Catmull #1770 #1812

    • πŸ›  Fix false positives in for_where rule when using if var inside for.
      Marcelo Fabri #1838

    • Fix false positive in class_delegate_protocol rule when using Swift 4.0.1.
      Marcelo Fabri #1856

    • πŸ”§ Print multi-line configuration values in a single line when running swiftlint rules to avoid breaking the table format.
      JP Simard #1002

    • πŸ‘• Ignore SwiftLint commands (swiftlint:(disable|enable)) in file_header rule, making it work better with superfluous_disable_command rule.
      Marcelo Fabri #1810

    • Fix false negatives in generic_type_name, identifier_name and type_name rules when using allowed_symbols.
      Marcelo Fabri

  • v0.22.0 Changes

    πŸ’₯ Breaking
    ✨ Enhancements
    • βž• Add is_disjoint rule to encourage using Set.isDisjoint(with:) over Set.intersection(_:).isEmpty.
      JP Simard

    • βž• Add xctfail_message rule to enforce XCTFail calls to include a description of the assertion.
      Ornithologist Coder #1370

    • 0️⃣ Add joined_default_parameter correctable opt-in rule to discourage explicit usage of the default separator.
      Ornithologist Coder #1093 #1757

    • Files with extensions other than .swift can now be used as arguments to --file when linting or autocorrecting.
      Marcelo Fabri #1721

    • πŸ‘ Allow ()?, Void?, ()!, and Void! as return types in redundant_void_return rule.
      Ryan Booker #1761

    • βœ… Add single_test_class opt-in rule to validate that test files only contain a single QuickSpec or XCTestCase subclass.
      Ornithologist Coder #1779

    • πŸ‘• Produce an error when a // swiftlint:disable command does not silence any violations.
      JP Simard #1102

    • Add quick_discouraged_call opt-in rule to discourage calls and object initialization inside 'describe' and 'context' block in Quick tests.
      Ornithologist Coder #1781

    • Invalidate cache when Swift version changes.
      Marcelo Fabri

    • Add pattern_matching_keywords opt-in rule to enforce moving let and var keywords outside tuples in a switch.
      Marcelo Fabri #202

    • Add explicit_enum_raw_value opt-in rule to allow refactoring the Swift API without breaking the API contract.
      Mazyod #1778

    • Add no_grouping_extension opt-in rule to disallow the use of extensions for code grouping purposes within the same file.
      Mazyod #1767

    • πŸ‘Œ Improve syntactic_sugar violation message to be type-specific.
      Marcelo Fabri #1803

    • Add multiple_closures_with_trailing_closure rule that disallows trailing closure syntax when passing more than one closure argument to a function.
      Erik Strottmann #1801

    πŸ› Bug Fixes
    • πŸ›  Fix false positive on force_unwrapping rule when declaring local variable with implicity unwrapped type.
      OtΓ‘vio Lima #1710

    • πŸ›  Fix the warning message and autocorrection of vertical_whitespace rule to display the maximum empty lines allowed if max_empty_lines is greater than 1.
      Hossam Ghareeb #1763

    • πŸ›  Fix for the wrong configuration being used when using --path and a configuration exists in a parent directory.
      Marcelo Fabri #1744

    • πŸ›  Fix false positive on unused_enumerated rule with complex variable bindings.
      Marcelo Fabri #1787

    • πŸ›  Fix incorrect violations and autocorrections on unneeded_parentheses_in_closure_argument rule that were generated in some cases (mainly when using chained method calls with closures).
      Marcelo Fabri

  • v0.21.0 Changes

    πŸ’₯ Breaking
    • πŸ— Xcode 8.3 or later and Swift 3.1 or later are required to build.
      Norio Nomura
    ✨ Enhancements
    • πŸ’… Rules are now categorized as lint, idiomatic, style, metrics or performance. Currently this is just used for documentation purposes when you run swiftlint rules or swiftlint generate-docs.
      Marcelo Fabri

    • βž• Add [rules documentation](Rules.md) generation.
      Marcelo Fabri #1078

    • Add private_over_fileprivate correctable rule to check for top-level usages of fileprivate and recommend private instead. This is in line with SE-0169's goal "for fileprivate to be used rarely". There is a also a new strict_fileprivate opt-in rule that will mark every fileprivate as a violation (especially useful with Swift 4).
      Jose Cheyo Jimenez Marcelo Fabri #1469 #1058

    • Add let_var_whitespace opt-in rule to enforce that let/var declarations should be separated from other statements by a single blank line.
      Uncommon #1461

    • πŸ‘Œ Improve performance when linting and correcting on Linux, matching macOS behavior.
      JP Simard #1577

    • Don't trigger implicit_getter violations when attributes (such as mutating or @inline) are present.
      Marcelo Fabri #1309 #1589

    • βž• Add --use-tabs option to AutoCorrectOptions, enabling formatting using tabs over spaces.
      Cody Winton #1327

    • πŸ‘Œ Improve autocorrect performance by running it in parallel.
      Marcelo Fabri #1578

    • πŸ‘Œ Support building with Xcode 9 beta 3 in Swift 3.2 mode.
      JP Simard

    • βž• Add support for optional error severity level configuration.
      Jamie Edge Marcelo Fabri #1647

    • Add unneeded_parentheses_in_closure_argument opt-in correctable rule that warns against using parentheses around argument declarations in closures.
      Marcelo Fabri #1483

    • βž• Add --disabled flag to swiftlint rules to print only rules that are not enabled in the configuration.
      Marcelo Fabri

    • Add ignore_comment_only_lines boolean configuration option to file_length rule. With the option enabled, file_length will ignore lines which have only comments.
      Samuel Susla #1165

    • πŸ‘Œ Improve file_header rule description.
      Marcelo Fabri #1492

    • βž• Add trailing_closure opt-in rule that validates that trailing closure syntax should be used whenever possible.
      Marcelo Fabri #54

    • Shebang (#!) in the beginning of a file is now ignored by all rules.
      Marcelo Fabri #1294

    • Add block_based_kvo rule that enforces the usage of the new block based KVO API added when linting with Swift 3.2 or later.
      Marcelo Fabri #1714

    • πŸ‘‰ Make file_header rule ignore doc comments.
      Marcelo Fabri #1719

    • πŸ‘ Allow using environment variables in a configuration file in the form of ${SOME_VARIABLE}. The variables will be expanded when the configuration is first loaded.
      Marcelo Fabri #1512

    • Treat yes, no, on and off as strings (and not booleans) when loading configuration files.
      Marcelo Fabri #1424

    • Add discouraged_direct_init rule that discourages direct initialization of certain types.
      Ornithologist Coder #1306

    πŸ› Bug Fixes
    • Fix false positive on redundant_discardable_let rule when using while statements.
      Marcelo Fabri #1669

    • πŸ›  Fix all custom rules not being applied when any rule is configured incorrectly.
      Jamie Edge #1586

    • πŸ›  Fix crash when using --config with a relative path and --path with a file.
      Marcelo Fabri #1694

    • πŸ›  Fix mark rule corrections generating invalid code in some cases.
      Marcelo Fabri #1029

    • Fix false positive in empty_enum_arguments rule when using wildcards and where clauses.
      Marcelo Fabri #1722

    • πŸ›  Fix false positive in large_tuple rule when using throwing closure.
      Liquidsoul

    • Make vertical_parameter_alignment more robust, fixing false positives and detecting previously missed violations.
      JP Simard #1488

  • v0.20.1 Changes

    πŸ’₯ Breaking
    • None.
    ✨ Enhancements
    • None.
    πŸ› Bug Fixes
    • πŸ›  Fix typo in FatalErrorMessageRule.
      Alexander Lash

    • Don't trigger an extension_access_modifier violation when all extension members are open, as open extension is not supported by Swift.
      Marcelo Fabri #1629

    • Don't trigger a vertical_parameter_alignment_on_call violation when trailing closures are used.
      Marcelo Fabri #1635

    • Make vertical_parameter_alignment_on_call more flexible when multiline parameters are used.
      Marcelo Fabri #1630 #1643

    • πŸ‘• Use the directory's .swiftlint.yml when --path is used.
      Marcelo Fabri #1631

  • v0.20.0 Changes

    πŸ’₯ Breaking
    • None.
    ✨ Enhancements
    • Detect more violations of force_unwrapping when using subscripts.
      OtΓ‘vio Lima

    • Match (Void) as return type in the void_return rule.
      Anders Hasselqvist

    • βž• Add multiline_parameters opt-in rule that warns to either keep all the parameters of a method or function on the same line, or one per line.
      Ornithologist Coder

    • Update function_parameter_count rule to ignore overridden methods.
      Markus Gasser #1562

    • Skip files with valid cache & no violations when auto correcting.
      Marcelo Fabri #1554

    • Don't trigger violations from the private_unit_test rule when a method has parameters.
      Marcelo Fabri #1532

    • Don't trigger violations from the discarded_notification_center_observer rule when the observer is being returned from a function that is not marked as @discardableResult.
      Marcelo Fabri #1525

    • Add extension_access_modifier opt-in rule validating that if all the declarations in a given extension have the same Access Control Level, the ACL keyword should be applied to the top-level extension.
      Marcelo Fabri #1546

    • Add vertical_parameter_alignment_on_call opt-in rule that validates that parameters are vertically aligned on a method call.
      Marcelo Fabri #1037

    • Add code_literal and image_literal boolean configuration options to object_literal rule. They allow to only check for one or the other literal type instead of both together.
      Cihat GΓΌndΓΌz #1587

    πŸ› Bug Fixes
    • Fix false positive in empty_enum_arguments rule when calling methods.
      Marcelo Fabri #1597

    • Fix crash in unused_closure_parameter rule when using unicode identifiers.
      Woo-Sik Byun Marcelo Fabri

    • πŸ›  Fix two false positives in force_unwrapping rule.
      OtΓ‘vio Lima #614 #977 #1614

    • πŸ›  Fix custom rules not working correctly with comment commands.
      JP Simard #1558

    • πŸ›  Fix incorrectly using configuration files named .swiftlint.yml when they are located in the same directory as a differently-named, user-provided custom configuration file.
      JP Simard #1531

    • πŸ›  Fix empty_count rule false positive in words that include "count".
      Marcelo Fabri #1622

    • Use validates_start_with_lowercase key when decoding configurations for generic_type_name, identifier_name and type_name rules. This key was used on the docs, but internally validates_start_lowercase was used.
      Marcelo Fabri #1626