Exit immediately when linting with a version other than swift_version if defined (#2491)

This commit is contained in:
Kim de Vos
2018-11-29 21:40:29 +01:00
committed by JP Simard
parent a855ac27b0
commit bf97e08fa7
2 changed files with 6 additions and 0 deletions
+5
View File
@@ -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