Helper script to check for typos in deprecation group names

Signed-off-by: Clinton Wolfe <clintoncwolfe@gmail.com>
This commit is contained in:
Clinton Wolfe 2019-04-12 10:57:30 -04:00
parent fc1bc75358
commit c1660e8568
2 changed files with 10 additions and 0 deletions

2
.gitignore vendored
View file

@ -37,3 +37,5 @@ terraform.tfstate.backup
inspec-azure.plan
inspec-aws-*.plan
contrib/*
inspec-deprecations-in-cfg.txt
inspec-deprecations-in-lib.txt

View file

@ -0,0 +1,8 @@
#!/bin/bash
fgrep 'Inspec.deprecate' -r lib |cut -f2 -d'(' | cut -f1 -d',' | cut -f1 -d ')' | cut -f2 -d':' | sort -u > inspec-deprecations-in-lib.txt
jq -r '.groups|keys|.[]' < etc/deprecations.json | sort -u > inspec-deprecations-in-cfg.txt
echo '<< Only in cfg'
echo ' >> Only in lib/'
comm -3 inspec-deprecations-in-cfg.txt inspec-deprecations-in-lib.txt