Skip to content

[feat] add linter ci #5

[feat] add linter ci

[feat] add linter ci #5

Workflow file for this run

name: Lint
on:
pull_request:
types: [opened, synchronize]
jobs:
lint:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: '3.10'
- name: Install Python linter
run: pip install ruff==0.4.4
- name: Run Python linter
run: ruff check .
- name: Install clang-tidy
run: sudo apt-get update && sudo apt-get install -y clang-tidy
- name: Run clang-tidy on C++ files
run: |
find . -type f \( -name '*.cpp' -o -name '*.cc' -o -name '*.h' \) \
-exec clang-tidy {} -- -std=c++17 \;
- name: Run clang-format on C++ files
run: |
find . -type f \( -name '*.cpp' -o -name '*.cc' -o -name '*.h' \) \
-exec clang-format -i {} \;