Skip to content

Commit 3a8cb9c

Browse files
committed
Add exit codes doc
1 parent 1775523 commit 3a8cb9c

File tree

1 file changed

+13
-9
lines changed

1 file changed

+13
-9
lines changed

README.md

Lines changed: 13 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,8 @@ Using login/password is not possible.
5353
The user corresponding to the token must have enough permissions to achieve the tool tasks
5454
- `-v` : Logging verbosity level (`WARN`, `ÌNFO` or `DEBUG`). The default is `INFO`.
5555
`ERROR` and above is always active.
56-
-
56+
57+
See common [error exit codes](#exit-codes) at the bottom of this page
5758

5859
# <a name="sonar-audit"></a>sonar-audit
5960

@@ -243,16 +244,19 @@ export SONAR_TOKEN=15ee09df11fb9b8234b7a1f1ac5fce2e4e93d75d
243244
sonar-projects-import -f exported_projects.csv
244245
```
245246

246-
# Tools coming soon
247-
248-
## sonar-issues-recover
247+
# <a name="exit-codes"></a>Exit codes
249248

250-
Tries to recover issues that were mistakenly closed following a scan with incorrect parameters. This tool is only useful for SonarQube instances in version 7.9.x and lower since this feature is built-in with SonarQube 8.x and higher
249+
When tools complete successfully they return exit code 0. En case of fatal error the following exit codes may be returned:
250+
- Code 1: Authentication error (Incorrect token provided)
251+
- Code 2: Authorization error (provided token has insufficient permissions)
252+
- Code 3: Other general Sonar API HTTP error
253+
- Code 4: No token provided
254+
- Code 5: Non existing project key provided
255+
- Code 6: Incorrect finding search criteria provided
256+
- Code 7: Unsupported operation requested (because of SonarQube edition or configuration)
257+
- Code 8: Audit rule loading failed (at startup)
258+
- Code 9: SIF audit error (file not found, can't open file, not a legit JSON file, ...)
251259

252-
Issue recovery means:
253-
- Reapplying all transitions to the issue to reach its final state before close (Usually *False positive* or *Won't Fix*)
254-
- Reapplying all manual comments
255-
- Reapplying all severity or issue type change
256260

257261
### :information_source: Limitations
258262
- The script has to be run before the closed issue purge period (SonarQube parameter `sonar.dbcleaner.daysBeforeDeletingClosedIssues` whose default value is **30 days**)

0 commit comments

Comments
 (0)