1
0
Fork 0

docs: include some examples, explicitly state success

This commit is contained in:
ssube 2019-06-15 18:56:42 -05:00
parent da85fb3f57
commit ac6de31e6e
4 changed files with 20 additions and 4 deletions

1
.gitignore vendored
View File

@ -3,6 +3,7 @@
.nyc_output/
node_modules/
out/
package-lock.json
yarn-error.log
*.bak

View File

@ -19,6 +19,7 @@ vendor/
Dockerfile
licensed.yml
Makefile
package-lock.json
renovate.json
tsconfig.json
yarn-*

View File

@ -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

View File

@ -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;
}
}