Esp folder layout #1
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: ESP-IDF Code Style Check | |
on: | |
pull_request: | |
paths: | |
- esp/** | |
push: | |
branches: | |
- main | |
paths: | |
- esp/** | |
jobs: | |
format-check: | |
name: Format & Style Check | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v2 | |
- name: Install clang-format and clang-tidy | |
run: | | |
sudo apt-get install -y clang-format clang-tidy | |
- name: Run clang-format check | |
run: | | |
find . -name '*.h' -o -name '*.c' | xargs clang-format -i | |
git diff --exit-code | |
- name: Run clang-tidy check | |
run: | | |
find . -name '*.c' | xargs clang-tidy --warnings-as-errors=* | |
- name: Report results | |
if: failure() | |
run: echo "Format or style issues detected. Please fix them and push again." |