Skip to content

Commit bbbef6f

Browse files
authored
Create tabs.yml (#864)
1 parent 91f9bc4 commit bbbef6f

File tree

1 file changed

+17
-0
lines changed

1 file changed

+17
-0
lines changed

.github/workflows/tabs.yml

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
name: Check for Tabs
2+
on: [push, pull_request]
3+
4+
jobs:
5+
no-tabs:
6+
runs-on: ubuntu-latest
7+
steps:
8+
- name: Checkout code
9+
uses: actions/checkout@v4
10+
11+
- name: Fail if tabs are found in source files
12+
# Exclude specific file types if necessary (e.g., binaries, .md files, etc.)
13+
run: |
14+
if grep -qP "\t" $(git ls-files Common/ SerialPrograms/ | grep -E "\.(.h|.c|.cpp|.tpp)$"); then
15+
echo "::error::Tabs found in source code! Please use spaces."
16+
exit 1
17+
fi

0 commit comments

Comments
 (0)