Skip to content

Commit 769f905

Browse files
committed
Ruby: Serialize severities as lowercase
1 parent 6fbc826 commit 769f905

File tree

3 files changed

+4
-3
lines changed

3 files changed

+4
-3
lines changed

ruby/extractor/src/diagnostics.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ use std::io::Write;
33
use std::path::PathBuf;
44
/** SARIF severity */
55
#[derive(Serialize)]
6+
#[serde(rename_all = "lowercase")]
67
pub enum Severity {
78
Error,
89
Warning,

ruby/ql/integration-tests/all-platforms/diagnostics/syntax-error/diagnostics.expected

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
},
1212
"markdownMessage": "A parse error occurred. Check the syntax of the file. If the file is invalid, correct the error or [exclude](https://docs.github.com/en/code-security/code-scanning/automatically-scanning-your-code-for-vulnerabilities-and-errors/customizing-code-scanning) the file from analysis.",
1313
"plaintextMessage": "A parse error occurred. Check the syntax of the file. If the file is invalid, correct the error or exclude the file from analysis.",
14-
"severity": "Warning",
14+
"severity": "warning",
1515
"source": {
1616
"extractorName": "ruby",
1717
"id": "ruby/parse-error",
@@ -34,7 +34,7 @@
3434
},
3535
"markdownMessage": "A parse error occurred (expected `end` symbol). Check the syntax of the file. If the file is invalid, correct the error or [exclude](https://docs.github.com/en/code-security/code-scanning/automatically-scanning-your-code-for-vulnerabilities-and-errors/customizing-code-scanning) the file from analysis.",
3636
"plaintextMessage": "A parse error occurred (expected end symbol). Check the syntax of the file. If the file is invalid, correct the error or exclude the file from analysis.",
37-
"severity": "Warning",
37+
"severity": "warning",
3838
"source": {
3939
"extractorName": "ruby",
4040
"id": "ruby/parse-error",

ruby/ql/integration-tests/all-platforms/diagnostics/unknown-encoding/diagnostics.expected

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
},
88
"markdownMessage": "Unknown character encoding `silly` in `#encoding:` [directive](https://docs.ruby-lang.org/en/master/syntax/comments_rdoc.html#label-encoding+Directive).",
99
"plaintextMessage": "Unknown character encoding silly in #encoding: directive.",
10-
"severity": "Warning",
10+
"severity": "warning",
1111
"source": {
1212
"extractorName": "ruby",
1313
"id": "ruby/unknown-character-encoding",

0 commit comments

Comments
 (0)