Skip to content

Commit

Permalink
Update validation workflow to print first occurances differently
Browse files Browse the repository at this point in the history
  • Loading branch information
MrTipson committed Jun 19, 2024
1 parent 4926301 commit 1475306
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion .github/workflows/validate-selectors.yml
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,7 @@ jobs:
- name: Compare repository selectors to reference
run: |
declare -A seen_classes
flag=true
blacklist="blacklist.txt"
differences=$(comm -13 reference.txt selectors.txt)
Expand All @@ -72,7 +73,13 @@ jobs:
class=$(echo $grep | cut -d ' ' -f 1 | cut -d ':' -f 2)
lines=$(echo ${grep//:$class/','} | tr -d '\r\n')
lines=${lines%','}
echo "::error file=$file:: $class [$lines] {$file}"
if [[ "${seen_classes[$class]}" ]]; then
level="::warning"
else
level="::error"
fi
echo "$level file=$file:: $class [$lines] {$file}"
seen_classes[$class]=true
fi
done
done
Expand Down

0 comments on commit 1475306

Please sign in to comment.