-
-
Notifications
You must be signed in to change notification settings - Fork 49
48 lines (48 loc) · 1.66 KB
/
linting.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
name: Linting
on: pull_request
jobs:
clang-format:
name: clang-format style
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Run clang-format style check for C/C++/Protobuf programs.
uses: jidicula/[email protected]
with:
clang-format-version: 16
# Some files can be excluded from the clang-format style check, like 3rd party driver files,
# as their licenses may not allow us to modify them, such as if they are LGPL licensed.
# The exclude-regex option can be used to exclude these files from the style check:
exclude-regex: ^.*(PCANBasic\.h|libusb\.h|InnoMakerUsb2CanLib\.h|arduino_example\.ino)$
cmake-format:
name: cmake-format style
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: 3.11
cache: "pip"
- name: Install lint tool
run: |
python -m pip install --upgrade pip
pip install cmake-format pyyaml
- name: Check cmake-lint
run: find . -name CMakeLists.txt | xargs cmake-lint
- name: Run cmake-format
run: find . -name CMakeLists.txt | xargs cmake-format -i
- name: Check cmake-format
run: git diff --patch-with-stat --exit-code
doxygen:
name: verify doxygen
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Generate Doxygen Documentation
uses: mattnotmitt/doxygen-action@edge
with:
doxyfile-path: "doxyfile"