Skip to content

Commit 21c122f

Browse files
committed
[Core] Add a new finding severity - convention
Identifies programming conventions such as for naming types and functions.
1 parent cb0a0fc commit 21c122f

File tree

2 files changed

+2
-0
lines changed

2 files changed

+2
-0
lines changed

Sources/SwiftFormatCore/Finding.swift

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@ public struct Finding {
1717
case warning
1818
case error
1919
case refactoring
20+
case convention
2021
}
2122

2223
/// The file path and location in that file where a finding was encountered.

Sources/swift-format/Utilities/DiagnosticsEngine.swift

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -117,6 +117,7 @@ final class DiagnosticsEngine {
117117
case .error: severity = .error
118118
case .warning: severity = .warning
119119
case .refactoring: severity = .warning
120+
case .convention: severity = .warning
120121
}
121122
return Diagnostic(
122123
severity: severity,

0 commit comments

Comments
 (0)