Skip to content

Releases: realm/SwiftLint

0.46.5: Laundry Studio

08 Mar 21:21
e8ef21f
Compare
Choose a tag to compare

Breaking

  • None.

Experimental

  • None.

Enhancements

  • None.

Bug Fixes

0.46.4: Detergent Tray

07 Mar 16:16
f3712b2
Compare
Choose a tag to compare

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

0.46.3: Detergent Spill

22 Feb 20:30
9c81e1a
Compare
Choose a tag to compare

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

0.46.2: Detergent Package

27 Jan 14:17
b4a54f3
Compare
Choose a tag to compare

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

0.46.1: Detergent Container

21 Jan 22:02
61c5351
Compare
Choose a tag to compare

Breaking

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

Experimental

  • None.

Enhancements

Bug Fixes

0.46.0: Detergent Container

21 Jan 20:59
17779cb
Compare
Choose a tag to compare

Breaking

  • The weak_delegate rule has been deprecated due to its high false
    positive rate. The identifier will become invalid in a future
    release.
    JP Simard
    #2786

Experimental

  • None.

Enhancements

Bug Fixes

0.45.1: Clothes Drying Hooks

29 Nov 21:52
9534937
Compare
Choose a tag to compare

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

0.45.0: Effectful Apparel

18 Oct 15:58
99465e6
Compare
Choose a tag to compare

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

  • 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

0.44.0: Travel Size Lint Roller

09 Sep 22:00
e820e75
Compare
Choose a tag to compare

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

0.43.1: Laundroformat

15 Mar 16:03
180d941
Compare
Choose a tag to compare

Breaking

  • None.

Experimental

  • None.

Enhancements

  • None.

Bug Fixes

  • Fix the File Length rule name.
    onato
    #3560

  • Re-add --format flag to reformat Swift files using SourceKit.
    Only applied with --fix/--autocorrect.
    JP Simard
    #3571