Skip to content

Commit

Permalink
Add Action to check for mixed whitespaces (#16)
Browse files Browse the repository at this point in the history
  • Loading branch information
GeckoEidechse authored Sep 19, 2024
1 parent 1ad3a8d commit e957470
Showing 1 changed file with 22 additions and 0 deletions.
22 changes: 22 additions & 0 deletions .github/workflows/formatting.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
name: Formatting

on: [push, pull_request]

jobs:
consistent-whitespace:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v4

- name: Check for tabs
run: |
echo "Checking for tabs..."
TABBED_FILES=$(grep --recursive --binary-files=without-match --perl-regexp --files-with-matches "\t" --exclude-dir=.git . || true)
if [ -n "$TABBED_FILES" ]; then
echo "Error: Tabs found in the following files:"
echo "$TABBED_FILES"
exit 1
else
echo "No tabs found."
fi

0 comments on commit e957470

Please sign in to comment.