inspec/support/list_deprecation_groups.sh
Clinton Wolfe c1660e8568 Helper script to check for typos in deprecation group names
Signed-off-by: Clinton Wolfe <clintoncwolfe@gmail.com>
2019-04-12 10:57:30 -04:00

8 lines
No EOL
367 B
Bash
Executable file

#!/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