-
Notifications
You must be signed in to change notification settings - Fork 13
36 lines (33 loc) · 961 Bytes
/
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
name: Check formatting
on:
push:
branches: [ main, develop ]
pull_request:
branches: [ main, develop ]
jobs:
clang-format:
runs-on: ubuntu-24.04
steps:
- uses: actions/checkout@v2
- name: clang-format
run: |
sudo apt update
sudo apt install clang-format
for component in core dynamics physics
do
cd $component/src
clang-format --dry-run -Werror *cpp include/*hpp
cd -
done
cmake-lint:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: clang-format
run: |
pip install cmakelang
cmake-lint $(find . -name CMakeLists.txt) -c .cmake-lint-config.py
# NOTE: We ignore C0103, which would enforce that variables are all-caps
# NOTE: We ignore C0113, which would enforce that comments are used
# NOTE: We set the tab size to 4
# NOTE: We set the maximum line length to 100