Quellcode durchsuchen

Merge branch 'ci/code_quality_report_allow_failure' into 'master'

ci: allow failure for code quality report

See merge request espressif/esp-idf!12392
Angus Gratton vor 5 Jahren
Ursprung
Commit
d06edf5c76
3 geänderte Dateien mit 9 neuen und 1 gelöschten Zeilen
  1. 1 0
      .gitlab/CODEOWNERS
  2. 4 0
      .gitlab/ci/rules.yml
  3. 4 1
      .gitlab/ci/static-code-analysis.yml

+ 1 - 0
.gitlab/CODEOWNERS

@@ -47,6 +47,7 @@
 * @esp-idf-codeowners/other
 
 /.*                                   @esp-idf-codeowners/tools
+/.gitlab/ci/                          @esp-idf-codeowners/ci
 /.gitlab-ci.yml                       @esp-idf-codeowners/ci
 /.pre-commit-config.yaml              @esp-idf-codeowners/ci
 /.readthedocs.yml                     @esp-idf-codeowners/docs

+ 4 - 0
.gitlab/ci/rules.yml

@@ -13,6 +13,7 @@
 
 .patterns-c-files: &patterns-c-files
   - ".gitlab/ci/static-code-analysis.yml"
+  - "tools/ci/static-analysis-rules.yml"
   - "**/*.{c,C}"
   - "**/*.{h,H}"
   - "components/**/Kconfig"
@@ -121,6 +122,9 @@
 
   - "tools/kconfig_new/**/*"
 
+  - "tools/detect_python.sh"
+  - "tools/detect_python.fish"
+
 .patterns-windows: &patterns-windows
   - "tools/windows/**/*"
 

+ 4 - 1
.gitlab/ci/static-code-analysis.yml

@@ -58,7 +58,8 @@ code_quality_check:
   extends:
     - .sonar_scan_template
     - .rules:patterns:static-code-analysis-preview
-  allow_failure: true
+  allow_failure: true  # since now it's using exit code to indicate the code analysis result,
+                       # we don't want to block ci when critical issues founded
   script:
     - export CI_MERGE_REQUEST_COMMITS=$(python ${CI_PROJECT_DIR}/tools/ci/ci_get_mr_info.py commits ${CI_COMMIT_REF_NAME} | tr '\n' ',')
     # test if this branch have merge request, if not, exit 0
@@ -88,6 +89,8 @@ code_quality_report:
   extends:
     - .sonar_scan_template
     - .rules:protected
+  allow_failure: true  # since now it's using exit code to indicate the code analysis result,
+                       # we don't want to block ci when critical issues founded
   script:
     - sonar-scanner
       -Dsonar.branch.name=$CI_COMMIT_REF_NAME