diff --git a/.gitlab/ci/rules.yml b/.gitlab/ci/rules.yml index 716a0f2efc..5ae4151f5c 100644 --- a/.gitlab/ci/rules.yml +++ b/.gitlab/ci/rules.yml @@ -13,6 +13,9 @@ - ".gitlab/ci/static-code-analysis.yml" - "**/*.py" +.patterns-sonarqube-files: &patterns-sonarqube-files + - "tools/ci/sonar_exclude_list.txt" + .patterns-example_test: &patterns-example_test - "tools/ci/python_packages/gitlab_api.py" - "tools/ci/python_packages/idf_http_server_test/**/*" @@ -237,6 +240,8 @@ changes: *patterns-c-files - <<: *if-dev-push changes: *patterns-python-files + - <<: *if-dev-push + changes: *patterns-sonarqube-files # !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! # DO NOT place comments or maintain any code from this line diff --git a/.gitlab/ci/static-code-analysis.yml b/.gitlab/ci/static-code-analysis.yml index 94a0b02b3d..ecf0c319ef 100644 --- a/.gitlab/ci/static-code-analysis.yml +++ b/.gitlab/ci/static-code-analysis.yml @@ -42,8 +42,8 @@ clang_tidy_check: - export SUBMODULES=$(get_all_submodules) # get all exclude paths specified in tools/ci/sonar_exclude_list.txt | ignore lines start with # | xargs | replace all to - export CUSTOM_EXCLUDES=$(cat $CI_PROJECT_DIR/tools/ci/sonar_exclude_list.txt | grep -v '^#' | xargs | sed -e 's/ /,/g') - # Exclude the report dir - - export EXCLUSIONS="$SUBMODULES,$REPORT_DIR/**,docs/_static/**,**/*.png,**/*.jpg" + # Exclude the report dir as well + - export EXCLUSIONS="$CUSTOM_EXCLUDES,$SUBMODULES,$REPORT_DIR/**,docs/_static/**,**/*.png,**/*.jpg" - python $NORMALIZE_CLANGTIDY_PY $CI_PROJECT_DIR/$REPORT_DIR/warnings.txt $CI_PROJECT_DIR/$REPORT_DIR/clang_tidy_report.txt $CI_PROJECT_DIR variables: GIT_DEPTH: 0 diff --git a/tools/ci/sonar_exclude_list.txt b/tools/ci/sonar_exclude_list.txt index f4f38d69f0..a91e445f52 100644 --- a/tools/ci/sonar_exclude_list.txt +++ b/tools/ci/sonar_exclude_list.txt @@ -11,5 +11,5 @@ components/freertos/*.c components/freertos/include/freertos/*.h # wpa_supplicant upstream code -components/wpa_supplicant/src/* -components/wpa_supplicant/include/*.h +components/wpa_supplicant/src/** +components/wpa_supplicant/include/**