We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 0f73400 commit 67fe2dbCopy full SHA for 67fe2db
.github/workflows/whitespace.yml
@@ -16,9 +16,11 @@ jobs:
16
17
- name: Check for trailing whitespaces
18
run: |
19
- if git grep --cached -n --ignore-case --perl-regexp '\s$' :; then
20
- echo "Trailing whitespaces found. Please remove with:\
21
- etc/fix_trailing_whitespace.sh"
+ TRAILING_WHITESPACES=$(git grep -l -z -E '\s+$' | xargs -0 sed -n '/\s$/p')
+ if [ -n "$TRAILING_WHITESPACES" ]; then
+ echo "Trailing whitespaces found in the following files:"
22
+ echo "$TRAILING_WHITESPACES"
23
+ echo "Please remove them."
24
exit 1
25
fi
26
0 commit comments