Skip to content

Commit

Permalink
.github(lint-whitespace): print trailing whitespace line numbers (#846)
Browse files Browse the repository at this point in the history
Prefix the line number to matching lines.
  • Loading branch information
ErikSchierboom authored Jan 2, 2024
1 parent e27ac03 commit 48e3620
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 48e3620

Please sign in to comment.