Fix incorrect violation message for line length violations (#3406)

This commit is contained in:
JP Simard
2020-11-07 18:01:04 -05:00
committed by GitHub
parent 865b59f0c8
commit c8d8d913b9
2 changed files with 5 additions and 2 deletions
+4
View File
@@ -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),