mirror of
https://github.com/gocsaf/csaf.git
synced 2025-12-22 05:40:11 +01:00
Use exit code 1 for general errors, fix documentation
This commit is contained in:
parent
df65ad13cb
commit
bc5d149f74
2 changed files with 5 additions and 4 deletions
|
|
@ -23,7 +23,7 @@ import (
|
|||
)
|
||||
|
||||
const (
|
||||
exitCodeSchemaInvalid = 1 << iota
|
||||
exitCodeSchemaInvalid = 2 << iota
|
||||
exitCodeNoRemoteValidator
|
||||
exitCodeFailedRemoteValidation
|
||||
exitCodeAllValid = 0
|
||||
|
|
|
|||
|
|
@ -5,9 +5,10 @@ is a tool to validate local advisories files against the JSON Schema and an opti
|
|||
### Exit codes
|
||||
If no fatal error occurs the program will exit with an exit code `n` with the following conditions:
|
||||
- `n == 0`: all valid
|
||||
- `(n / 2) % 1 == 1`: schema validation failed
|
||||
- `(n / 4) % 1 == 1`: no remote validator configured
|
||||
- `(n / 8) % 1 == 1`: failure in remote validation
|
||||
- `(n & 1) > 0`: general error, see logs
|
||||
- `(n & 2) > 0`: schema validation failed
|
||||
- `(n & 4) > 0`: no remote validator configured
|
||||
- `(n & 8) > 0`: failure in remote validation
|
||||
|
||||
### Usage
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue