mirror of
https://github.com/github/codeql.git
synced 2026-04-22 15:25:18 +02:00
diagnostics: use debug rather than hidden terminology, and leave gaps for other severities
This commit is contained in:
@@ -281,7 +281,7 @@ impl Visitor<'_> {
|
||||
"diagnostics",
|
||||
vec![
|
||||
Arg::Label(id),
|
||||
Arg::Int(3), // severity 3 = error
|
||||
Arg::Int(40), // severity 40 = error
|
||||
Arg::String("parse_error".to_string()),
|
||||
Arg::String(error_message),
|
||||
Arg::String(full_error_message),
|
||||
|
||||
@@ -645,10 +645,10 @@ fn create_diagnostics<'a>() -> (dbscheme::Case<'a>, dbscheme::Table<'a>) {
|
||||
],
|
||||
};
|
||||
let severities: Vec<(usize, &str)> = vec![
|
||||
(0, "diagnostic_hidden"),
|
||||
(1, "diagnostic_info"),
|
||||
(2, "diagnostic_warning"),
|
||||
(3, "diagnostic_error"),
|
||||
(10, "diagnostic_debug"),
|
||||
(20, "diagnostic_info"),
|
||||
(30, "diagnostic_warning"),
|
||||
(40, "diagnostic_error"),
|
||||
];
|
||||
let case = dbscheme::Case {
|
||||
name: "diagnostic",
|
||||
|
||||
@@ -17,13 +17,13 @@ class Diagnostic extends @diagnostic {
|
||||
|
||||
/** Gets a string representation of the severity of this diagnostic. */
|
||||
string getSeverityText() {
|
||||
severity = 0 and result = "Hidden"
|
||||
severity = 10 and result = "Debug"
|
||||
or
|
||||
severity = 1 and result = "Info"
|
||||
severity = 20 and result = "Info"
|
||||
or
|
||||
severity = 2 and result = "Warning"
|
||||
severity = 30 and result = "Warning"
|
||||
or
|
||||
severity = 3 and result = "Error"
|
||||
severity = 40 and result = "Error"
|
||||
}
|
||||
|
||||
/** Gets the error code associated with this diagnostic, e.g. parse_error. */
|
||||
|
||||
@@ -1247,10 +1247,10 @@ diagnostics(
|
||||
);
|
||||
|
||||
case @diagnostic.severity of
|
||||
0 = @diagnostic_hidden
|
||||
| 1 = @diagnostic_info
|
||||
| 2 = @diagnostic_warning
|
||||
| 3 = @diagnostic_error
|
||||
10 = @diagnostic_debug
|
||||
| 20 = @diagnostic_info
|
||||
| 30 = @diagnostic_warning
|
||||
| 40 = @diagnostic_error
|
||||
;
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user