Skip to content

Commit

Permalink
Apply suggestions from code review
Browse files Browse the repository at this point in the history
Co-authored-by: Danny Mösch <[email protected]>
  • Loading branch information
alex-taffe and SimplyDanny authored Aug 5, 2024
1 parent 28e4bd4 commit 4682673
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 13 deletions.
4 changes: 2 additions & 2 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,8 @@

#### Enhancements

* Add new syntax to swiftlint_version configuration option to allow for minimum
and maximum versions
* Add new syntax to `swiftlint_version` configuration option to allow for minimum
and maximum versions.
[alex-taffe](https://github.com/alex-taffe)
[#5694](https://github.com/realm/SwiftLint/issues/5694)

Expand Down
22 changes: 11 additions & 11 deletions Source/SwiftLintCore/Models/Configuration.swift
Original file line number Diff line number Diff line change
Expand Up @@ -127,7 +127,7 @@ public struct Configuration {

/// Creates a `Configuration` by specifying its properties directly,
/// except that rules are still to be synthesized from rulesMode, ruleList & allRulesWrapped
/// and a check against the pinnedVersion/minimumVersion is performed if given.
/// and a check against the version in use is performed if a constraint is configured.
///
/// - parameter rulesMode: The `RulesMode` for this configuration.
/// - parameter allRulesWrapped: The rules with their own configurations already applied.
Expand Down Expand Up @@ -286,17 +286,17 @@ public struct Configuration {
}
}

/// Compares a supplied version to the version SwiftLint is currently running. If the version does not match,
/// or the version syntax is invalid, the method will abort.
/// The syntax for valid version strings is as follows:
/// 0.54.0
/// >0.54.0
/// >=0.54.0
/// <0.54.0
/// <=0.54.0
/// >0.54.0 <=0.60.0
/// Compares a supplied version to the version SwiftLint is currently running with. If the version does not match,
/// or the version syntax is invalid, the method will abort execution with an error. The syntax for valid version
/// strings is as follows:
///
/// - Parameter configurationVersion: The configuration version to compare against
/// * `0.54.0`
/// * `>0.54.0`
/// * `>=0.54.0`
/// * `<0.54.0`
/// * `<=0.54.0`
///
/// - Parameter configurationVersion: The configuration version to compare against.
static func compareVersion(to configurationVersion: String) { // swiftlint:disable:this function_body_length
let versions = configurationVersion
.trimmingCharacters(in: .whitespacesAndNewlines)
Expand Down

0 comments on commit 4682673

Please sign in to comment.