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 fromportable_swiftlint/swiftlint
to/usr/local/bin
or elsewhere in yourPATH
- Using Mint:
mint install realm/SwiftLint@0.43.0-rc.3
- Cloning and building from source:
git clone https://github.com/realm/SwiftLint.git && cd SwiftLint && git checkout 0.43.0-rc.3 && make install
Changes from 0.43.0-rc.2: 0.43.0-rc.2...0.43.0-rc.3
Breaking
- The command line syntax has slightly changed due to migrating from the
Commandant command line parsing library to swift-argument-parser.
For the most part the breaking changes are all to make the syntax more
unix compliant and intuitive to use. For example, commands such as
swiftlint --help
orswiftlint -h
now work as expected.
The help output from various commands has greatly improved as well.
Notably:swiftlint autocorrect
was removed in favor of
swiftlint --fix
.
Previous commands should continue to work temporarily to help with the
transition. Please let us know if there's a command that no longer
works and we'll attempt to add a bridge to help with its transition.
JP Simard
Experimental
- None.
Enhancements
-
Added
allows_single_line
option inmultiline_parameters
rule
configuration. Defaults totrue
. This enforces parameters in a method
with multiple parameters to always be in different lines.
Otavio Cordeiro -
Support relative paths in compilation databases for SwiftLint analyzer
rules.
JP Simard -
Add opt-in rule
discouraged_assert
to encourage the use of
assertionFailure()
and/orpreconditionFailure()
over
assert(false)
.
Otavio Cordeiro -
Add opt-in rule
private_subject
rule which warns against
public Combine subjects.
Otavio Cordeiro -
Allow configuring related USRs to skip in UnusedDeclarationRule by
specifying a list of USRs in therelated_usrs_to_skip
key.
For example you might have custom source tooling that does something
with types conforming to a procotol even if that type is never
explicitly referenced by other code.
JP Simard