Skip to content

Commit

Permalink
Adjust case of severity in Code Climate reporter (realm#5523)
Browse files Browse the repository at this point in the history
  • Loading branch information
waitbutY authored Apr 7, 2024
1 parent dd8789b commit 745aec5
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 5 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,10 @@
Rename SwiftLintBuildToolPlugin.
Add Swift Package Manager installation instructions.
[garricn](https://github.com/garricn)

* Fix Code Climate reporter output by having lower case severity
values to comply with the Code Climate specification.
[waitButY](https://github.com/waitbutY)

* The `superfluous_disable_command` rule will now be enabled for the `analyze`
command, unless it has been disabled, and will warn about superfluous
Expand Down
2 changes: 1 addition & 1 deletion Source/SwiftLintCore/Reporters/CodeClimateReporter.swift
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ struct CodeClimateReporter: Reporter {
"end": violation.location.line ?? NSNull() as Any
]
],
"severity": violation.severity == .error ? "MAJOR" : "MINOR",
"severity": violation.severity == .error ? "major" : "minor",
"type": "issue"
]
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
},
"path" : "filename"
},
"severity" : "MINOR",
"severity" : "minor",
"type" : "issue"
},
{
Expand All @@ -26,7 +26,7 @@
},
"path" : "filename"
},
"severity" : "MAJOR",
"severity" : "major",
"type" : "issue"
},
{
Expand All @@ -41,7 +41,7 @@
},
"path" : "filename"
},
"severity" : "MAJOR",
"severity" : "major",
"type" : "issue"
},
{
Expand All @@ -56,7 +56,7 @@
},
"path" : null
},
"severity" : "MAJOR",
"severity" : "major",
"type" : "issue"
}
]

0 comments on commit 745aec5

Please sign in to comment.