docs: include some examples, explicitly state success
This commit is contained in:
parent
da85fb3f57
commit
ac6de31e6e
|
@ -3,6 +3,7 @@
|
|||
.nyc_output/
|
||||
node_modules/
|
||||
out/
|
||||
package-lock.json
|
||||
yarn-error.log
|
||||
|
||||
*.bak
|
||||
|
|
|
@ -19,6 +19,7 @@ vendor/
|
|||
Dockerfile
|
||||
licensed.yml
|
||||
Makefile
|
||||
package-lock.json
|
||||
renovate.json
|
||||
tsconfig.json
|
||||
yarn-*
|
||||
|
|
21
README.md
21
README.md
|
@ -28,10 +28,23 @@ fields, and other **g**ood stuff.
|
|||
## Usage
|
||||
|
||||
```shell
|
||||
> cat rules/examples/kubernetes-require-resources-pass.yml | salty-dog \
|
||||
--rules rules/kubernetes.yml \
|
||||
--source - \
|
||||
--tag important
|
||||
> cat rules/examples/kubernetes-require-resources-fail.yml |\
|
||||
salty-dog \
|
||||
--rules rules/kubernetes.yml \
|
||||
--source - \
|
||||
--tag important |\
|
||||
./node_modules/.bin/bunyan
|
||||
|
||||
[2019-06-15T23:56:04.764Z] ERROR: salty-dog/22211 on cerberus: some rules failed (errors=1)
|
||||
|
||||
> cat rules/examples/kubernetes-require-resources-pass.yml |\
|
||||
salty-dog \
|
||||
--rules rules/kubernetes.yml \
|
||||
--source - \
|
||||
--tag important |\
|
||||
./node_modules/.bin/bunyan
|
||||
|
||||
[2019-06-15T23:53:34.223Z] INFO: salty-dog/19839 on cerberus: all rules passed
|
||||
```
|
||||
|
||||
### Options
|
||||
|
|
|
@ -99,6 +99,7 @@ export async function main(argv: Array<string>): Promise<number> {
|
|||
return STATUS_ERROR;
|
||||
}
|
||||
} else {
|
||||
logger.info('all rules passed');
|
||||
return STATUS_SUCCESS;
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue