-
Notifications
You must be signed in to change notification settings - Fork 2
66 lines (60 loc) · 1.8 KB
/
lint.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
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
name: Linter
on:
push:
paths-ignore:
- "telemetry/**"
jobs:
clang-format:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Run clang-format style check
uses: jidicula/clang-format-action@v4.9.0
with:
clang-format-version: "13"
style: "file"
find-todos-fixme:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Run todo check
run: |
if grep -riE -n 'TODO|FIXME' * | grep -v -i 'TODOLater'; then
exit 1
else
echo "All good"
fi
find-missing-std:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Run check for missing std namespace prefix
run: |
IDENTIFIERS="uint8_t uint16_t uint32_t uint64_t int8_t int16_t int32_t int64_t size_t"
for identifier in $IDENTIFIERS; do
if grep -r -n "$identifier" | grep -v "std::" | grep -v "ssize_t" | grep -v "lint.yml"; then
echo "[ERROR] found $identifier without std:: prefix"
exit 1
fi
done
find-redundant-hyped:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Run check for extra hyped namespace prefix
run: |
if grep -riE -n "hyped::" | grep -v "namespace"; then
echo "[ERROR] found redundant hyped:: prefix"
exit 1
fi
working-directory: lib
check-header-pragma-once:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Run check for missing header pragma once
run: |
if grep -rL "#pragma once" --include \*.hpp | grep -v "lint.yml"; then
echo "[ERROR] found header without #pragma once"
exit 1
fi