Skip to content

Releases: realm/SwiftLint

0.47.0-rc.2: Smart Appliance

16 Mar 14:37
67da5a0
Compare
Choose a tag to compare
Pre-release

This is a prerelease version. It won't be published to Homebrew or CocoaPods. But there are many other ways to install:

  • Downloading the attached SwiftLint.pkg installer and launching it
  • Downloading the attached portable_swiftlint.zip archive, extracting it and moving the binary from portable_swiftlint/swiftlint to /usr/local/bin or elsewhere in your PATH
  • Using Mint: mint install realm/[email protected]
  • Cloning and building from source: git clone https://github.com/realm/SwiftLint.git && cd SwiftLint && git checkout 0.47.0-rc.2 && make install
  • Docker: docker run -it -v `pwd`:`pwd` -w `pwd` ghcr.io/realm/swiftlint:0.47.0-rc.2

Changes from 0.46.5: 0.46.5...0.47.0-rc.2
Changes from 0.47.0-rc.1: 0.47.0-rc.1...0.47.0-rc.2

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

  • 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

  • Add IN_PROCESS_SOURCEKIT environment variable, which uses
    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

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

0.47.0-rc.1: Smart Appliance

09 Mar 02:13
fe8aa19
Compare
Choose a tag to compare
Pre-release

This is a prerelease version. It won't be published to Homebrew or CocoaPods. But there are many other ways to install:

  • Downloading the attached SwiftLint.pkg installer and launching it
  • Downloading the attached portable_swiftlint.zip archive, extracting it and moving the binary from portable_swiftlint/swiftlint to /usr/local/bin or elsewhere in your PATH
  • Using Mint: mint install realm/[email protected]
  • Cloning and building from source: git clone https://github.com/realm/SwiftLint.git && cd SwiftLint && git checkout 0.47.0-rc.1 && make install
  • Docker: docker run -it -v `pwd`:`pwd` -w `pwd` ghcr.io/realm/swiftlint:0.47.0-rc.1

Changes from 0.46.5: 0.46.5...0.47.0-rc.1

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

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

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