| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -50,7 +50,7 @@ private newtype TExtractionProblem = | |||
| 50 | 50 | /** | |
| 51 | 51 | * Superclass for the extraction problem hierarchy. | |
| 52 | 52 | */ | |
| 53 | - class ExtractionProblem extends TExtractionProblem { | ||
| 53 | + abstract class ExtractionProblem extends TExtractionProblem { | ||
| 54 | 54 | /** Gets the string representation of the problem. */ | |
| 55 | 55 | string toString() { none() } | |
| 56 | 56 | ||
@@ -65,6 +65,9 @@ class ExtractionProblem extends TExtractionProblem { | |||
| 65 | 65 | ||
| 66 | 66 | /** Gets the SARIF severity of this problem. */ | |
| 67 | 67 | int getSeverity() { none() } | |
| 68 | + | ||
| 69 | + /** Gets the `Compilation` the problem is associated with. */ | ||
| 70 | + abstract Compilation getCompilation(); | ||
| 68 | 71 | } | |
| 69 | 72 | ||
| 70 | 73 | /** | |
@@ -96,6 +99,8 @@ class ExtractionUnrecoverableError extends ExtractionProblem, TCompilationFailed | |||
| 96 | 99 | // [errors](https://docs.oasis-open.org/sarif/sarif/v2.1.0/csprd01/sarif-v2.1.0-csprd01.html#_Toc10541338). | |
| 97 | 100 | result = 2 | |
| 98 | 101 | } | |
| 102 | + | ||
| 103 | + override Compilation getCompilation() { result = c } | ||
| 99 | 104 | } | |
| 100 | 105 | ||
| 101 | 106 | /** | |
@@ -122,6 +127,8 @@ class ExtractionRecoverableWarning extends ExtractionProblem, TReportableWarning | |||
| 122 | 127 | // [warnings](https://docs.oasis-open.org/sarif/sarif/v2.1.0/csprd01/sarif-v2.1.0-csprd01.html#_Toc10541338). | |
| 123 | 128 | result = 1 | |
| 124 | 129 | } | |
| 130 | + | ||
| 131 | + override Compilation getCompilation() { result = err.getCompilation() } | ||
| 125 | 132 | } | |
| 126 | 133 | ||
| 127 | 134 | /** | |
@@ -148,4 +155,6 @@ class ExtractionUnknownProblem extends ExtractionProblem, TUnknownProblem { | |||
| 148 | 155 | // [warnings](https://docs.oasis-open.org/sarif/sarif/v2.1.0/csprd01/sarif-v2.1.0-csprd01.html#_Toc10541338). | |
| 149 | 156 | result = 1 | |
| 150 | 157 | } | |
| 158 | + | ||
| 159 | + override Compilation getCompilation() { result = err.getCompilation() } | ||
| 151 | 160 | } | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -10,7 +10,9 @@ import ExtractionProblems | |||
| 10 | 10 | ||
| 11 | 11 | from ExtractionProblem warning | |
| 12 | 12 | where | |
| 13 | - warning instanceof ExtractionRecoverableWarning and exists(warning.getFile().getRelativePath()) | ||
| 13 | + warning instanceof ExtractionRecoverableWarning and | ||
| 14 | + exists(warning.getFile().getRelativePath()) and | ||
| 15 | + not warning.getCompilation().buildModeNone() | ||
| 14 | 16 | or | |
| 15 | 17 | warning instanceof ExtractionUnknownProblem | |
| 16 | 18 | select warning, | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -0,0 +1,4 @@ | |||
| 1 | + --- | ||
| 2 | + category: minorAnalysis | ||
| 3 | + --- | ||
| 4 | + * The "Extraction warnings" (`cpp/diagnostics/extraction-warnings`) diagnostics query no longer yields `ExtractionRecoverableWarning`s for `build-mode: none` databases. The results were found to significantly increase the sizes of the produced SARIF files, making them unprocessable in some cases. | ||
| Back | FazBrowse Home | New Git URL |
0 commit comments