Skip to content
Snippets Groups Projects
Commit b18870db authored by q3k's avatar q3k Committed by q3k
Browse files

ci: move bulk of clang-tidy logic to tools/clang-tidy.sh

This should make it easier to run clang-check/clang-tidy locally.
parent 2a049b5d
No related branches found
No related tags found
No related merge requests found
...@@ -12,11 +12,8 @@ default: ...@@ -12,11 +12,8 @@ default:
clang-tidy: clang-tidy:
stage: check stage: check
variables:
IDF_TOOLCHAIN: "clang"
script: script:
- "idf.py build" - "bash tools/clang-tidy.sh"
- "idf.py clang-check"
- "python3 tools/codequal-report.py clang-tidy warnings.txt > cqual.json" - "python3 tools/codequal-report.py clang-tidy warnings.txt > cqual.json"
artifacts: artifacts:
when: always when: always
......
#!/usr/bin/env bash
set -e -x
if [ ! -f sdkconfig.defaults ] || [ ! -f recovery/sdkconfig.defaults ]; then
echo >/dev/stderr "Run this script for the root of the repository (ie. tools/clang-tidy.sh)."
exit 1
fi
export IDF_TOOLCHAIN=clang
idf.py -B clang-build reconfigure
# Minimum mpy build to generate includes.
( cd clang-build ;\
ninja genhdr/qstrdefs.generated.h ;\
ninja genhdr/root_pointers.h ;\
ninja genhdr/moduledefs.h )
idf.py -B clang-build clang-check
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment