Skip to content

Commit 277a6a0

Browse files
committed
diagnostics: use debug rather than hidden terminology, and leave gaps for other severities
1 parent acdbd98 commit 277a6a0

4 files changed

Lines changed: 13 additions & 13 deletions

File tree

extractor/src/extractor.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -281,7 +281,7 @@ impl Visitor<'_> {
281281
"diagnostics",
282282
vec![
283283
Arg::Label(id),
284-
Arg::Int(3), // severity 3 = error
284+
Arg::Int(40), // severity 40 = error
285285
Arg::String("parse_error".to_string()),
286286
Arg::String(error_message),
287287
Arg::String(full_error_message),

generator/src/main.rs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -645,10 +645,10 @@ fn create_diagnostics<'a>() -> (dbscheme::Case<'a>, dbscheme::Table<'a>) {
645645
],
646646
};
647647
let severities: Vec<(usize, &str)> = vec![
648-
(0, "diagnostic_hidden"),
649-
(1, "diagnostic_info"),
650-
(2, "diagnostic_warning"),
651-
(3, "diagnostic_error"),
648+
(10, "diagnostic_debug"),
649+
(20, "diagnostic_info"),
650+
(30, "diagnostic_warning"),
651+
(40, "diagnostic_error"),
652652
];
653653
let case = dbscheme::Case {
654654
name: "diagnostic",

ql/src/codeql_ruby/Diagnostics.qll

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -17,13 +17,13 @@ class Diagnostic extends @diagnostic {
1717

1818
/** Gets a string representation of the severity of this diagnostic. */
1919
string getSeverityText() {
20-
severity = 0 and result = "Hidden"
20+
severity = 10 and result = "Debug"
2121
or
22-
severity = 1 and result = "Info"
22+
severity = 20 and result = "Info"
2323
or
24-
severity = 2 and result = "Warning"
24+
severity = 30 and result = "Warning"
2525
or
26-
severity = 3 and result = "Error"
26+
severity = 40 and result = "Error"
2727
}
2828

2929
/** Gets the error code associated with this diagnostic, e.g. parse_error. */

ql/src/ruby.dbscheme

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1247,10 +1247,10 @@ diagnostics(
12471247
);
12481248

12491249
case @diagnostic.severity of
1250-
0 = @diagnostic_hidden
1251-
| 1 = @diagnostic_info
1252-
| 2 = @diagnostic_warning
1253-
| 3 = @diagnostic_error
1250+
10 = @diagnostic_debug
1251+
| 20 = @diagnostic_info
1252+
| 30 = @diagnostic_warning
1253+
| 40 = @diagnostic_error
12541254
;
12551255

12561256

0 commit comments

Comments
 (0)