tests: better detect rule name

from https://github.com/mandiant/capa-rules/pull/647
This commit is contained in:
Willi Ballenthin 2023-01-03 11:41:04 +01:00 committed by GitHub
parent 63b63f856d
commit 5ea634af7f
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -69,7 +69,7 @@ jobs:
cd rules/
for changed_file in ${{ steps.files.outputs.added_modified }} ${{ steps.files.outputs.renamed }}; do
if [[ ! $changed_file =~ .git|.md ]]; then
tag=$(grep 'name:' $changed_file | sed 's/^.*: //')
tag=$(grep '\sname:' $changed_file | sed 's/^.*: //')
python ../scripts/lint.py --thorough -t "$tag" -v .
fi
done