-
Notifications
You must be signed in to change notification settings - Fork 0
31 lines (27 loc) · 889 Bytes
/
Copy pathformat.yml
File metadata and controls
31 lines (27 loc) · 889 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
29
30
31
name: Check code formatting
on:
pull_request:
branches:
- main
jobs:
clang-format:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Install clang-format
run: sudo apt-get update && sudo apt-get install -y clang-format-18
- name: Check formatting
working-directory: NUSense
run: |
FILES=$(find \
Core/Src/device \
Core/Src/dynamixel \
Core/Src/nusense \
Core/Src/uart \
Core/Src/usb \
Core/Src/utility \
-type f \( -name "*.c" -o -name "*.cpp" -o -name "*.h" -o -name "*.hpp" \) \
! -path "*/protobuf/*")
FILES="$FILES Core/Src/main.cpp Core/Src/fan_controller.c Core/Src/imu.cpp Core/Src/test_hw.hpp"
clang-format-18 --dry-run --Werror -style=file $FILES