-
Notifications
You must be signed in to change notification settings - Fork 660
40 lines (35 loc) · 1.17 KB
/
whitespace.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
name: Whitespace
on:
push:
paths-ignore:
- 'pendingchanges/**'
- 'tsc/meetings/**'
pull_request:
paths-ignore:
- 'pendingchanges/**'
- 'tsc/meetings/**'
# Allow subsequent pushes to the same PR or REF to cancel any previous jobs.
concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
cancel-in-progress: true
jobs:
# Search the git repository for any trailing spaces excluding meeting notes and auto-generated wlt files
trailingspaces:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: test
run: |
set +e
git grep -n -I -E '^.+[ ]+$' -- ':!tsc/meetings/*' ':!pendingchanges/*' ':!*.wlt'
test $? -eq 1
# Search for any tabs excluding meeting notes, image files and a few others
spacesnottabs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: test
run: |
set +e
git grep -n " " -- ':!*/whitespace.yml' ':!tsc/meetings/*' ':!*.svg' ':!*.cmd' ':!*.png' ':!pendingchanges/*' ':!*.wlt' ':!*.jpg' ':!*.gif' ':!*.mp4' ':!*.pt' ':!*.pth' ':!*.nvdb' ':!*.npz'
test $? -eq 1