mirror of
https://github.com/realm/SwiftLint.git
synced 2026-05-07 20:12:49 +00:00
Fix incorrect violation message for line length violations (#3406)
This commit is contained in:
@@ -77,6 +77,10 @@
|
||||
[Quinn Taylor](https://github.com/quinntaylor)
|
||||
[#3374](https://github.com/realm/SwiftLint/issues/3374)
|
||||
|
||||
* Fix incorrect violation message for line length violations.
|
||||
[JP Simard](https://github.com/jpsim)
|
||||
[#3333](https://github.com/realm/SwiftLint/issues/3333)
|
||||
|
||||
## 0.40.3: Greased Up Drum Bearings
|
||||
|
||||
#### Breaking
|
||||
|
||||
@@ -76,8 +76,7 @@ public struct LineLengthRule: ConfigurationProviderRule {
|
||||
let length = strippedString.count
|
||||
|
||||
for param in configuration.params where length > param.value {
|
||||
let reason = "Line should be \(configuration.length.warning) characters or less: " +
|
||||
"currently \(length) characters"
|
||||
let reason = "Line should be \(param.value) characters or less: currently \(length) characters"
|
||||
return StyleViolation(ruleDescription: Self.description,
|
||||
severity: param.severity,
|
||||
location: Location(file: file.path, line: line.index),
|
||||
|
||||
Reference in New Issue
Block a user