File tree Expand file tree Collapse file tree 2 files changed +24
-0
lines changed Expand file tree Collapse file tree 2 files changed +24
-0
lines changed Original file line number Diff line number Diff line change @@ -52,3 +52,8 @@ class Diagnostic extends @diagnostic {
52
52
class ExtractionError extends Diagnostic {
53
53
ExtractionError ( ) { this .getTag ( ) = "parse_error" }
54
54
}
55
+
56
+ /** A diagnostic that is warning severity. */
57
+ class ExtractionWarning extends Diagnostic {
58
+ ExtractionWarning ( ) { this .getSeverity ( ) = 30 }
59
+ }
Original file line number Diff line number Diff line change
1
+ /**
2
+ * @name Extraction warnings
3
+ * @description List all extraction warnings for files in the source code directory.
4
+ * @kind diagnostic
5
+ * @id rust/diagnostics/extraction-warnings
6
+ */
7
+
8
+ import codeql.rust.Diagnostics
9
+ import codeql.files.FileSystem
10
+
11
+ /** Gets the SARIF severity to associate with a warning. */
12
+ int getSeverity ( ) { result = 1 }
13
+
14
+ from ExtractionWarning warning , File f
15
+ where
16
+ f = warning .getLocation ( ) .getFile ( ) and
17
+ exists ( f .getRelativePath ( ) )
18
+ select warning , "Extraction warning in " + f + " with message " + warning .getMessage ( ) ,
19
+ getSeverity ( )
You can’t perform that action at this time.
0 commit comments