[CI] Allow clang-tidy to see IDF components (#6903)

* Allow clang-tidy to see IDF components

* Remove camera, add tflite-micro
This commit is contained in:
Keith Burzinski 2024-06-13 05:15:38 -05:00 committed by GitHub
parent b29e1acab8
commit 761aae6f89
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
3 changed files with 20 additions and 2 deletions

View file

@ -387,6 +387,13 @@ jobs:
echo "::add-matcher::.github/workflows/matchers/gcc.json" echo "::add-matcher::.github/workflows/matchers/gcc.json"
echo "::add-matcher::.github/workflows/matchers/clang-tidy.json" echo "::add-matcher::.github/workflows/matchers/clang-tidy.json"
- name: Run 'pio run --list-targets -e esp32-idf-tidy'
if: matrix.name == 'Run script/clang-tidy for ESP32 IDF'
run: |
. venv/bin/activate
mkdir -p .temp
pio run --list-targets -e esp32-idf-tidy
- name: Run clang-tidy - name: Run clang-tidy
run: | run: |
. venv/bin/activate . venv/bin/activate

View file

@ -0,0 +1,9 @@
dependencies:
esp-tflite-micro:
git: https://github.com/espressif/esp-tflite-micro.git
mdns:
git: https://github.com/espressif/esp-protocols.git
version: mdns-v1.2.5
path: components/mdns
rules:
- if: "idf_version >=5.0"

View file

@ -101,8 +101,10 @@ def clang_options(idedata):
# add library include directories using -isystem to suppress their errors # add library include directories using -isystem to suppress their errors
for directory in sorted(set(idedata["includes"]["build"])): for directory in sorted(set(idedata["includes"]["build"])):
# skip our own directories, we add those later # skip our own directories, we add those later
if not directory.startswith(f"{root_path}/") or directory.startswith( if (
f"{root_path}/.pio/" not directory.startswith(f"{root_path}/")
or directory.startswith(f"{root_path}/.pio/")
or directory.startswith(f"{root_path}/managed_components/")
): ):
cmd.extend(["-isystem", directory]) cmd.extend(["-isystem", directory])