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

Changelog History
Page 1

  • v0.47.1 Changes

    ๐Ÿ’ฅ Breaking

    • None.

    Experimental

    • None.

    โœจ Enhancements

    • โž• Add type-checked analyzer rule version of ArrayInitRule named TypesafeArrayInitRule with identifier typesafe_array_init that avoids the false positives present in the lint rule.
      SimplyDanny #3749

    • โž• Add the --in-process-sourcekit command line flag to lint and analyze commands, which has the same effect as setting the IN_PROCESS_SOURCEKIT environment variable.
      Juozas Valancius

    • โž• Add a new artifactbundle release asset containing swiftlint binaries for x86 & arm64 macOS.
      Juozas Valancius #3840

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

    • โš  Don't skip autocorrect on files that have parser warnings. Only files with errors reported by the Swift parser will be skipped.
      Marcelo Fabri #3343

    • Add accessibility_label_for_image rule to warn if a SwiftUI Image does not have an accessibility label and is not hidden from accessibility.
      Ryan Cole

    • โž• Add unavailable_condition rule to prefer using if #unavailable instead of if #available with an empty body and an else condition when using Swift 5.6 or later.
      Marcelo Fabri #3897

    • โž• Add comma_inheritance rule to validate that inheritance clauses use commas instead of &.
      Marcelo Fabri #3950

    ๐Ÿ› Bug Fixes

    • Fix false positives in unused_closure_parameter when using parameters with backticks.
      JP Simard #3628

    • ๐Ÿ‘Œ Improved the syntactic_sugar rule's detection accuracy and fixed some corrections leading to invalid code.
      Paul Taykalo #3866

    • ๐Ÿ›  Fix analyzer rules with Xcode 13.3 / Swift 5.6. Note that we've measured performance regressions compared to Swift 5.5 on the order of about 2x.
      JP Simard #3920

    • 0๏ธโƒฃ Error by default on bad expiring todo date formatting.
      Christopher Hale #3636

    • Avoid false-positive in let_var_whitespace rule by allowing custom attributes on lines directly before let/var declarations.
      SimplyDanny #2980

    • ๐Ÿ‘• Lint/analyze all files listed in the command even if the --path option is used.
      coffmark

  • v0.47.0 Changes

    ๐Ÿ’ฅ Breaking

    • ๐Ÿ‘• SwiftLint now requires Swift 5.5 or higher to build.
      JP Simard

    • ๐Ÿ‘• The SwiftLintFramework podspec has been removed. To our knowledge, this was completely unused by other projects and was not worth the complexity needed to justify its continued maintenance, especially in light of the integration of SwiftSyntax. The SwiftLint podspec is still supported.
      JP Simard

    • ๐Ÿ‘• SwiftLint now requires at least Swift 5.0 installed in order to lint files.
      Marcelo Fabri

    Experimental

    • ๐Ÿ“œ The force_cast rule and the comment command parsing mechanism have been updated to use SwiftSyntax instead of SourceKit. Please report any problems you encounter by opening a GitHub issue. If this is successful, more rules may use Swift Syntax in the future.
      JP Simard

    โœจ Enhancements

    • Empty files no longer trigger any violations.
      JP Simard #3854

    • ๐Ÿ‘Œ Support recursive globs.
      funzin JP Simard #3789 #3891

    • 0๏ธโƒฃ The legacy_random rule is now enabled by default.
      Marcelo Fabri

    • ๐Ÿš€ The deployment_target rule now supports the #unavailable syntax added in Swift 5.6.
      Marcelo Fabri #3896

    • ๐Ÿ–จ Set the IN_PROCESS_SOURCEKIT environment variable, which will use the in-process version of sourcekitd on macOS when Xcode 13 or later is selected. This avoids the use of XPC, which is prohibited in some sandboxed environments, such as in Swift Package Manager plugins.
      Juozas Valancius

    • โž• Add ability to run only one (focused) example.
      PaulTaykalo #3911

    ๐Ÿ› Bug Fixes

    • Extend class_delegate_protocol to correctly identify cases with the protocol body opening brace on a new line.
      Tobisaninfo

    • ๐Ÿ›  Fix SwiftLint.pkg installer installing multiple copies of SwiftLint.
      JP Simard #3815 #3887

  • v0.46.5 Changes

    ๐Ÿ’ฅ Breaking

    • None.

    Experimental

    • None.

    โœจ Enhancements

    • None.

    ๐Ÿ› Bug Fixes

    • Fix empty_parentheses_with_trailing_closure rule when using Swift 5.6.
      Marcelo Fabri #3846

    • Fix false negatives in closure_parameter_position rule with Swift 5.6.
      Marcelo Fabri #3845

    • ๐Ÿ›  Fix regression in last_where rule when using Swift 5.6.
      Marcelo Fabri #3847

    • ๐Ÿ›  Fix regression in unused_import rule when using Swift 5.6.
      JP Simard #3849

    • ๐Ÿ›  Fix regression in trailing_closure rule when using Swift 5.6.
      Marcelo Fabri #3848

  • v0.46.4 Changes

    ๐Ÿ’ฅ Breaking

    • None.

    Experimental

    • None.

    โœจ Enhancements

    • None.

    ๐Ÿ› Bug Fixes

    • Ignore meta class types in prefer_self_in_static_references rule.
      SimplyDanny #3804

    • Ignore MARK in multiline comment, fixing cases that would previously crash or produce invalid results when correcting.
      goranche #1749 #3841

    • ๐Ÿ›  Fix false positive in EmptyEnumArgumentsRule rule when using Swift 5.6.
      Marcelo Fabri #3850

  • v0.46.3 Changes

    ๐Ÿ’ฅ Breaking

    • None.

    Experimental

    • None.

    โœจ Enhancements

    • ๐Ÿ”„ Change fingerprint generation in CodeClimateReporter.swift to use the relative file path to better support CI/CD on multiple machines.
      HA Pors

    ๐Ÿ› Bug Fixes

    • Fix crash in the closure_end_indentation rule when linting with Swift 5.6.
      JP Simard #3830

    • ๐Ÿ›  Fix default rules section in documentation.
      Natan Rolnik #3857

  • v0.46.2 Changes

    ๐Ÿ’ฅ Breaking

    • None.

    Experimental

    • None.

    โœจ Enhancements

    • None.

    ๐Ÿ› Bug Fixes

    • ๐Ÿ›  Fix SwiftLint.pkg installer on macOS 11 or later.
      JP Simard #3815

    • Ignore prefer_self_in_static_references rule in extensions generally.
      SimplyDanny #3775

    • Fix class_delegate_protocol false positives when using where clause.
      Steven Magdy

  • v0.46.1 Changes

    ๐Ÿ’ฅ Breaking

    • The weak_delegate rule has been opt-in due to its high false positive rate.
      JP Simard #2786

    Experimental

    • None.

    โœจ Enhancements

    ๐Ÿ› Bug Fixes

    • ๐Ÿ›  Fix convenience_type false positives when using actors.
      JP Simard #3770

    • Fix false positives in the prefer_self_in_static_references rule.
      SimplyDanny #3768

    • ๐Ÿ›  Fix the regex for expiring TODO comments.
      Sergei Shirokov #3767

    • ๐Ÿ›  Fix crash when parsing multi-line attributes with the attributes rule.
      JP Simard #3761

    • Fix false positives in unused_closure_parameter when using list element bindings in SwiftUI.
      Paul Williamson #3790

    • ๐Ÿ›  Fix the cache path not being properly set when using nested configurations.
      Andrรฉs Cecilia Luque

  • v0.45.1 Changes

    ๐Ÿ’ฅ Breaking

    • None.

    Experimental

    • None.

    โœจ Enhancements

    • ๐Ÿ“š Update Rule list documentation to distinguish between opt-in and on-by-default rules.
      Benny Wong

    • Add opt-in prefer_self_in_static_references rule to warn if the type name is used to reference static members the same type. Prefer using Self instead which is not affected by renamings.
      SimplyDanny

    • โž• Add support for running SwiftLint as a pre-commit hook.
      Jesse Crocker Hannes Ljungberg

    ๐Ÿ› Bug Fixes

    • ๐Ÿ›  Fix unused_import rule incorrectly considering SwiftShims as a used import.
      JP Simard

    • ๐Ÿ›  Fix false positives on large_tuple rule when using async closures.
      Kaitlin Mahar #3753

    • Fix false positive on legacy_objc_type rule when using types with names that start with a legacy type name.
      Isaac Ressler #3555

  • v0.45.0 Changes

    ๐Ÿ’ฅ Breaking

    • ๐Ÿ‘• SwiftLint now requires Swift 5.4 or higher to build.
      JP Simard

    Experimental

    • None.

    โœจ Enhancements

    • Add self_in_property_initialization rule to catch uses of self inside an inline closure used for initializing a variable. In this case, self refers to the NSObject.self method and likely won't be what you expect. You can make the variable lazy to be able to refer to the current instance with self or use MyClass.self if you really want to reference the method.
      Marcelo Fabri

    • 0๏ธโƒฃ Exclude id from identifier_name by default.
      Artem Garmash #3651

    • ๐Ÿ– Handle get async and get throws (introduced in Swift 5.5) in the implicit_getter rule.
      Marcelo Fabri #3684

    • Speed up explicit type interface rule.
      PaulTaykalo #3745

    • Speed up analyzer rules.
      PaulTaykalo #3747

    ๐Ÿ› Bug Fixes

    • ๐Ÿ›  Fix a bug with the missing_docs rule where excludes_inherited_types would not be set.
      Ben Fox

    • Fix redundant_optional_initialization autocorrect broken in case observer's brace exists. Naruki Chigira #3718

    • Fix a false positive in the unneeded_break_in_switch rule when using do/catch.
      Marcelo Fabri #3724

    • Speed up Computed Accessors Order rule. PaulTaykalo #3727

    • [Colon Rule] Fix case when comment is used in function call. PaulTaykalo #3740

  • v0.44.0 Changes

    ๐Ÿ’ฅ Breaking

    • ๐Ÿ‘• SwiftLint now requires Swift 5.3 or higher to build.
      JP Simard

    Experimental

    • None.

    โœจ Enhancements

    • โž• Add configuration options to missing_docs rule:

      • excludes_extensions defaults to true to skip reporting violations for extensions with missing documentation comments.
      • excludes_inherited_types defaults to true to skip reporting violations for inherited declarations, like subclass overrides.
        Ben Fox
    • Fix false negative on redundant_optional_initialization rule when variable has observers.
      Isaac Ressler #3621

    • Make test_case_accessibility rule identify invalid test functions with parameters.
      Keith Smiley #3612

    • Add duplicated_key_in_dictionary_literal rule to warn against duplicated keys in dictionary literals.
      Marcelo Fabri

    • ๐Ÿ›  Fix the rule name from "Colon" to "Colon Spacing" to improve phrasing.
      Radu #3587

    • Add discouraged_none_name opt-in rule to discourage naming cases and static/class members "none", which can conflict with Swift's Optional<T>.none when checking equality.
      Kane Cheshire #3624

    • ๐Ÿ‘Œ Improve language and positioning of file_length warnings when ignore_comment_only_lines: true.
      Steven Grosmark #3654

    • Add anonymous_argument_in_multiline_closure opt-in rule to validate that named arguments are used in closures that span multiple lines.
      Marcelo Fabri

    ๐Ÿ› Bug Fixes

    • Fix false positives in empty_enum_arguments rule when comparing values with a static member (e.g. if number == .zero).
      Marcelo Fabri #3562

    • ๐Ÿ›  Fix the regex for expiring-todos.
      namolnad #3597

    • Fix type_contents_order initializer detection.
      StevenMagdy

    • ๐Ÿ›  Fix autocorrect when there's no space between the tuple the in keyword on unneeded_parentheses_in_closure_argument rule.
      p-x9 #3633

    • Fix unused_capture_list, empty_enum_arguments, implicit_return and explicit_type_interface rules when using Swift 5.4.
      Marcelo Fabri #3615 #3685

    • ๐Ÿ›  Fix Xcode build logs with spaces in paths preventing analyze from running.
      adamawolf