From ac6de31e6e7d2d89ad65c636622a6d7e00b3be1d Mon Sep 17 00:00:00 2001 From: ssube Date: Sat, 15 Jun 2019 18:56:42 -0500 Subject: [PATCH] docs: include some examples, explicitly state success --- .gitignore | 1 + .npmignore | 1 + README.md | 21 +++++++++++++++++---- src/index.ts | 1 + 4 files changed, 20 insertions(+), 4 deletions(-) diff --git a/.gitignore b/.gitignore index bad756e..0c72c08 100644 --- a/.gitignore +++ b/.gitignore @@ -3,6 +3,7 @@ .nyc_output/ node_modules/ out/ +package-lock.json yarn-error.log *.bak diff --git a/.npmignore b/.npmignore index 2b2f122..7129d29 100644 --- a/.npmignore +++ b/.npmignore @@ -19,6 +19,7 @@ vendor/ Dockerfile licensed.yml Makefile +package-lock.json renovate.json tsconfig.json yarn-* diff --git a/README.md b/README.md index a50f79d..a977cf4 100644 --- a/README.md +++ b/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 diff --git a/src/index.ts b/src/index.ts index d2ba698..bff1611 100644 --- a/src/index.ts +++ b/src/index.ts @@ -99,6 +99,7 @@ export async function main(argv: Array): Promise { return STATUS_ERROR; } } else { + logger.info('all rules passed'); return STATUS_SUCCESS; } }