0.47.0-rc.4
版本发布时间: 2022-03-19 07:07:17
realm/SwiftLint最新发布版本:0.57.0(2024-09-09 00:02:39)
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.47.0-rc.4
- Cloning and building from source:
git clone https://github.com/realm/SwiftLint.git && cd SwiftLint && git checkout 0.47.0-rc.4 && make install
- Docker:
docker run -it -v `pwd`:`pwd` -w `pwd` ghcr.io/realm/swiftlint:0.47.0-rc.4
Changes from 0.46.5: https://github.com/realm/SwiftLint/compare/0.46.5...0.47.0-rc.4 Changes from 0.47.0-rc.3: https://github.com/realm/SwiftLint/compare/0.47.0-rc.3...0.47.0-rc.4
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. TheSwiftLint
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 -
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
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
1、 portable_swiftlint.zip 24.15MB
2、 SwiftLint.pkg 24.14MB
3、 swiftlint_linux.zip 29.56MB
4、 swiftlint_linux_swift_5_5.zip 28.82MB