Skip to content

Commit

Permalink
ci: Add Action to check for tabs in JSON files (#21)
Browse files Browse the repository at this point in the history
* ci: Add Action to check for tabs in JSON files

* temp: Test no CI by inserting tabs

* Revert "temp: Test no CI by inserting tabs"

This reverts commit 2870137.
  • Loading branch information
GeckoEidechse authored Jan 17, 2024
1 parent 2d3f21a commit 09e5bd7
Showing 1 changed file with 19 additions and 0 deletions.
19 changes: 19 additions & 0 deletions .github/workflows/no-tabs.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
name: Check for tabs in JSON files

on: [push, pull_request]

jobs:
check-for-tabs-in-json:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Check JSON files for tabs
run: |
set -e
for file in $(find . -type f -name '*.json'); do
if grep --perl-regexp --quiet '\t' "$file"; then
echo "Error: JSON file $file contains tabs."
exit 1
fi
done

0 comments on commit 09e5bd7

Please sign in to comment.