-
Notifications
You must be signed in to change notification settings - Fork 365
sonar.cxx.errorRecoveryEnabled
Günter Wirth edited this page Jan 29, 2021
·
6 revisions
For the cxx plugin the error recovery mode can be defined.
A distinction is made between the two principal methods:
| mode | description |
|---|---|
| strict | Data is only transferred to SonarQube if all data is correct and error-free. This method is recommended when the focus is on reliable Quality Gates. |
| tolerant (default) | Data is transferred to SonarQube as quickly as possible, even if it is not necessarily complete and error-free. This method provides the developers with partial results as quickly as possible. Errors are ignored and the analysis is continued. |
The parameter sonar.cxx.errorRecoveryEnabled has impact on scanning the source files and reading report files:
-
sonar.cxx.errorRecoveryEnabled= True(tolerant mode)- erroneous reports: analysis is continued in case of errors in a report file
- source code parsing: syntax errors within a declaration are skipped, analysis is continued with next declaration in source code file (see Error Recovery)
-
sonar.cxx.errorRecoveryEnabled= False(strict mode)- erroneous reports: an error in a report file stops the analysis
- source code parsing: the analysis of the source code file fails after a syntax error, the whole source code file is ignored
The configuration of the error recovery mode parameter is done with sonar.cxx.errorRecoveryEnabled in the configuration file sonar-project.properties or SonarQube UI.
Sample for sonar-project.properties:
sonar.cxx.errorRecoveryEnabled=True