mirror of
https://github.com/realm/SwiftLint.git
synced 2026-06-06 20:18:40 +00:00
Exit immediately when linting with a version other than swift_version if defined (#2491)
This commit is contained in:
@@ -39,6 +39,11 @@
|
||||
[Timofey Solonin](https://github.com/biboran)
|
||||
[#2435](https://github.com/realm/SwiftLint/issues/2435)
|
||||
|
||||
* The `lint` command now exits with a code of 2 when not using pinned
|
||||
version defined as `swiftlint_version` in the configuration file.
|
||||
[Timofey Solonin](https://github.com/kimdv)
|
||||
[#2074](https://github.com/realm/SwiftLint/issues/2074)
|
||||
|
||||
#### Bug Fixes
|
||||
|
||||
* Fix false positive in `nimble_operator` rule.
|
||||
|
||||
@@ -58,6 +58,7 @@ public struct Configuration: Hashable {
|
||||
if let pinnedVersion = swiftlintVersion, pinnedVersion != Version.current.value {
|
||||
queuedPrintError("Currently running SwiftLint \(Version.current.value) but " +
|
||||
"configuration specified version \(pinnedVersion).")
|
||||
exit(2)
|
||||
}
|
||||
|
||||
let configuredRules = configuredRules
|
||||
|
||||
Reference in New Issue
Block a user