espressif / clang-tidy-runner

MIT License
9 stars 5 forks source link

Exit code from `run-clang-tidy.py` not preserved with `idf.py clang-check` (IDFGH-10534) #34

Closed johnboiles closed 1 year ago

johnboiles commented 1 year ago

When running run-clang-tidy.py and there are files that have errors, run-clang-tidy.py will return a non-zero exit code. However, idf.py clang-check seems to swallow up that exit code and return a 0 exit code.

This make it difficult to know if there were errors in the clang-tidy run. For example, it is difficult to fail a check in CI if clang-tidy was unable to run successfully.

johnboiles commented 1 year ago

This could probably be solved by using expect_returncode=[0] perhaps that should be behind a --fail-on-error flag or something