diff --git a/README.md b/README.md index f08e7da..68aaef6 100644 --- a/README.md +++ b/README.md @@ -81,6 +81,46 @@ circumstances. ⚠️**Use at your own risk, you have been warned...** ⚠️ +# 💪 Tips and tips + +## ⏩ One liners + +Most of use love short and efficient command lines. Here are some ready to use ones : + +### Piping `json` summary through `jq` + +``` +yamlfixer --jsonsummary bad.yml 2>&1 | jq +``` + +So you can get a nicely colored (and vlidated `json` output) : + +```json + "filestofix": 1, + "passedstrictmode": 1, + "modified": 0, + "skipped": 0, + "notwriteable": 0, + "unknown": 0, + "details": { + "/home/jerome/yamlfixer/bad.yml": { + "status": "PASSED", + "issues": 0, + "handled": 0 + } + } +} +``` + +### Check if `yamlfixer` could fix a `yaml` and get the exit code + +See how piping fixing and linting can be intersting... and get exit code +so you can go furher in automation : + +``` +yamlfixer