Download Latest Version 0.59.1_ Crisp Spring Clean source code.tar.gz (845.8 kB)
Email in envelope

Get an email when there's a new version of SwiftLint

Home / 0.58.0
Name Modified Size InfoDownloads / Week
Parent folder
bazel.tar.gz 2025-01-12 477.7 kB
bazel.tar.gz.sha256 2025-01-12 116 Bytes
portable_swiftlint.zip 2025-01-12 9.4 MB
SwiftLint.pkg 2025-01-12 9.4 MB
swiftlint_linux.zip 2025-01-12 30.0 MB
SwiftLintBinary.artifactbundle.zip 2025-01-12 39.4 MB
0.58.0_ New Year_s Fresh Fold source code.tar.gz 2025-01-12 831.9 kB
0.58.0_ New Year_s Fresh Fold source code.zip 2025-01-12 1.2 MB
README.md 2025-01-12 4.9 kB
Totals: 9 Items   90.6 MB 2

Breaking

  • The command plugin now requires write permissions so that it works with the --fix option without an error.
    SimplyDanny

  • The artifact bundle name has changed. SwiftLintBinary-macos.artifactbundle.zip is now called SwiftLintBinary.artifactbundle.zip. It now includes an AMD64 Linux binary. Bradley Mackey #5514

  • The inert_defer and unused_capture_list rules have completely been removed after being deprecated for 2 years.
    SimplyDanny

  • SwiftLint now requires a Swift 5.10 or higher compiler to build. The Swift Package Manager plugins continue to work with Swift 5.9.
    SimplyDanny

  • The private_unit_test rule's deprecated regex configuration option has been removed after 2 years.
    Martin Redington #5912

Experimental

  • None.

Enhancements

  • Add Xcode command plugin allowing to run SwiftLint from within Xcode.
    SimplyDanny

  • Add new async_without_await opt-in rule that checks if an async declaration contains at least one await.
    Jan Kolarik #5082

  • Support replacing identity expressions with \.self in prefer_key_path rule from Swift 6 on.
    SimplyDanny

  • Support linting only provided file paths with command plugins.
    DanSkeel

  • Add new category for @IBSegueAction to type_contents_order rule.
    dk-talks SimplyDanny

  • Add option to disable redundant_discardable_let rule in SwiftUI view bodies.
    SimplyDanny #3855

  • Add new redundant_sendable rule that triggers on Sendable conformances of types that are implicitly already Sendable due to being actor-isolated. It is enabled by default.
    SimplyDanny

  • Improve performance when exclude patterns resolve to a large set of files.
    SimplyDanny #5018

Bug Fixes

  • Ignore TipKit's #Rule macro in empty_count rule.
    Ueeek #5883

  • Ignore super calls with trailing closures in unneeded_override rule.
    SimplyDanny #5886

  • If violations are detected by lint or analyze, still perform an update check for new versions of SwiftLint if requested.
    Martin Redington #5904


Using Bazel

With bzlmod:

// Pending BCR update
bazel_dep(name = "swiftlint", version = "0.58.0", repo_name = "SwiftLint")

Without bzlmod, put this in your WORKSPACE:

WORKSPACE :::python load("@bazel_tools//tools/build_defs/repo:http.bzl", "http_archive") http_archive( name = "build_bazel_rules_apple", sha256 = "9e26307516c4d5f2ad4aee90ac01eb8cd31f9b8d6ea93619fc64b3cbc81b0944", url = "https://github.com/bazelbuild/rules_apple/releases/download/2.2.0/rules_apple.2.2.0.tar.gz", ) load( "@build_bazel_rules_apple//apple:repositories.bzl", "apple_rules_dependencies", ) apple_rules_dependencies() load( "@build_bazel_rules_swift//swift:repositories.bzl", "swift_rules_dependencies", ) swift_rules_dependencies() load( "@build_bazel_rules_swift//swift:extras.bzl", "swift_rules_extra_dependencies", ) swift_rules_extra_dependencies() http_archive( name = "SwiftLint", sha256 = "7f069bc44c548896f78b80cdf223643f6f6da5093a934e834dd7f68eaf1d1940", url = "https://github.com/realm/SwiftLint/releases/download/0.58.0/bazel.tar.gz", ) load("@SwiftLint//bazel:repos.bzl", "swiftlint_repos") swiftlint_repos() load("@SwiftLint//bazel:deps.bzl", "swiftlint_deps") swiftlint_deps()

Then you can run SwiftLint in the current directory with this command:

:::console
bazel run @SwiftLint//:swiftlint -- --help
Source: README.md, updated 2025-01-12