Ignore inline whitelist comments, pass checkid to filter ignores specifically for checks

This commit is contained in:
Urjit Singh Bhatia
2020-04-14 17:29:36 -07:00
parent 56a4fd813c
commit bf72025b9b
2 changed files with 8 additions and 2 deletions

View File

@@ -107,7 +107,12 @@ textFail(){
## ignore whitelists for current check
level="FAIL"
for i in $IGNORES; do
ignore_check_name="${i%:*}"
ignore_value="${i#*${CHECK_NAME}:}"
if [[ ${ignore_check_name} != "${CHECK_NAME}" ]]; then
# not for this check
continue
fi
if [[ $1 =~ ${ignore_value} ]]; then
level="WARNING"
break