Skip to content

Commit

Permalink
Exit immediately when linting with a version other than swift_version…
Browse files Browse the repository at this point in the history
… if defined (realm#2491)
  • Loading branch information
kimdv authored and sjavora committed Mar 9, 2019
1 parent 9b167d3 commit 8caa4b8
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 0 deletions.
5 changes: 5 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
1 change: 1 addition & 0 deletions Source/SwiftLintFramework/Models/Configuration.swift
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 8caa4b8

Please sign in to comment.