forked from CSUS-LLVM/OptSched
-
Notifications
You must be signed in to change notification settings - Fork 1
28 lines (23 loc) · 789 Bytes
/
westconst.yml
File metadata and controls
28 lines (23 loc) · 789 Bytes
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
name: Reject East Const
on:
push:
branches: [ master ]
pull_request:
branches: [ master ]
jobs:
verify:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Gather failures
id: eastconst
# The second grep strips away false positives against keywords. These may not always be
# applicable, but it's still safe to test against them.
run: grep -E '[a-zA-Z_0-9]+ const\b' --with-filename -n -r include lib unittests
| grep -Ev '(static|constexpr|inline|virtual|else|new|sizeof|typedef|typename|volatile|consteval|constinit)\s+const\b'
| tee eastconst.txt
- name: Verify no failures
shell: python
run: |
text = open('eastconst.txt', 'r').read()
exit(int(len(text) > 0))