[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/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
run: |
. 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
for directory in sorted(set(idedata["includes"]["build"])):
# skip our own directories, we add those later
if not directory.startswith(f"{root_path}/") or directory.startswith(
f"{root_path}/.pio/"
if (
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])