Skip to content

Commit

Permalink
ci(lint): print line number of line with trailing whitespace
Browse files Browse the repository at this point in the history
  • Loading branch information
ErikSchierboom committed Jan 2, 2024
1 parent e27ac03 commit 50bce23
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion .github/bin/lint-whitespace
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ cd "${repo_root}" || exit
exit_status=0

# Check that each git-tracked non-binary file has no trailing whitespace.
trailing_whitespace="$(git grep --cached -I '[[:blank:]]$')"
trailing_whitespace="$(git grep --line-number --cached -I '[[:blank:]]$')"
if [ -n "${trailing_whitespace}" ]; then
echo "There is trailing whitespace on the below lines:"
echo "${trailing_whitespace}"
Expand Down

0 comments on commit 50bce23

Please sign in to comment.