You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: sonar-java-plugin/src/main/resources/static/documentation.md
+7Lines changed: 7 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -101,6 +101,13 @@ You can control this behavior with the analysis parameter `sonar.java.skipUnchan
101
101
* setting it to `false` will **never** make rules skip unchanged files, even if the context is a PR analysis
102
102
* not setting this parameter lets the server decide whether the optimization should be enabled, by default it will be enabled for PR analyses.
103
103
104
+
## Handling analysis runtime errors
105
+
By default, the Java analyzer only halts the analysis when an `AnalysisException` or a `java.lang.Error` (non-recoverable error) is thrown.
106
+
Generic runtime exceptions (like `NullPointerException`, `ArrayIndexOutOfBoundsException`, etc.) are caught and logged but do not stop the analysis.
107
+
This behavior can be changed by setting two different analysis parameters:
108
+
*`sonar.internal.analysis.failFast` - when set to `true`, any runtime exception will halt the analysis
109
+
*`sonar.java.internal.failOnStackOverflow` - `true` by default, can be set to `false` to avoid halting the analysis on `StackOverflowError` (this overrides the `failFast` option)
110
+
104
111
## Cache-enabled rules (experimental)
105
112
Starting from April 2022, the Java analyzer offers rule developers a SQ cache that can be used to store and retrieve information from one analysis to the other.
106
113
The cache is provided by the underlying SonarQube instance and is branch-specific.
0 commit comments