Skip to content

Commit

Permalink
fx
Browse files Browse the repository at this point in the history
Signed-off-by: Ali Caglayan <[email protected]>

<!-- ps-id: 56342511-dc5b-49c6-87ac-08def4397d93 -->
  • Loading branch information
Alizter committed Mar 6, 2024
1 parent 314dac6 commit a174fa1
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions .github/workflows/whitespace.yml
Original file line number Diff line number Diff line change
Expand Up @@ -49,11 +49,14 @@ jobs:
- name: git log --check
id: check_out
run: |
log=
log=
base_commit=$(git rev-parse FETCH_HEAD)
while IFS= read -r line; do
log="${log}\n${line}"
echo "::error file=${line%%:*},line=${line#*:}::Whitespace issue: ${line}"
if [[ $line =~ ^-[^-] ]]; then
file_line=$(echo "$line" | cut -c 2-)
echo "::error file=${file_line%%:*},line=${file_line#*:}::Whitespace issue: ${file_line}"
fi
done <<< "$(git diff --check $base_commit ${{ github.sha }} | grep '^-[^-]')"
if [ -n "${log}" ]; then
Expand Down

0 comments on commit a174fa1

Please sign in to comment.