@@ -27,22 +27,19 @@ check_pylint:
2727 extends :
2828 - .pre_check_template
2929 - .rules:patterns:python-files
30- - .before_script_minimal
31- image : $SONARQUBE_SCANNER_IMAGE
3230 artifacts :
3331 when : always
34- paths :
35- - pylint-report.txt
32+ reports :
33+ codequality : pylint.json
3634 expire_in : 1 week
3735 script :
38- - export PYTHONPATH="$IDF_PATH/tools:$IDF_PATH/tools/ci/python_packages:$PYTHONPATH"
3936 - |
4037 if [ -n "$CI_MERGE_REQUEST_IID" ]; then
4138 export files=$(python ${CI_PROJECT_DIR}/tools/ci/ci_get_mr_info.py files ${CI_MERGE_REQUEST_SOURCE_BRANCH_NAME} | grep ".py");
4239 else
4340 export files=$(find . -iname "*.py" -print);
4441 fi
45- - pylint --rcfile=.pylintrc $files -r n --output-format=parseable > pylint-report.txt || exit 0
42+ - run_cmd pylint --exit-zero --load-plugins=pylint_gitlab --output-format=gitlab-codeclimate:pylint.json $files
4643
4744# build stage
4845# Sonarqube related jobs put here for this reason:
@@ -83,7 +80,6 @@ check_pylint:
8380 expire_in : 1 week
8481 dependencies : # Here is not a hard dependency relationship, could be skipped when only python files changed. so we do not use "needs" here.
8582 - clang_tidy_check
86- - check_pylint
8783
8884code_quality_check :
8985 extends :
@@ -107,7 +103,6 @@ code_quality_check:
107103 -Dsonar.gitlab.ref_name=$CI_MERGE_REQUEST_SOURCE_BRANCH_NAME
108104 -Dsonar.host.url=$SONAR_HOST_URL
109105 -Dsonar.login=$SONAR_LOGIN
110- -Dsonar.python.pylint.reportPath=pylint-report.txt
111106
112107code_quality_report :
113108 extends :
@@ -124,4 +119,3 @@ code_quality_report:
124119 -Dsonar.gitlab.ref_name=$CI_COMMIT_REF_NAME
125120 -Dsonar.host.url=$SONAR_HOST_URL
126121 -Dsonar.login=$SONAR_LOGIN
127- -Dsonar.python.pylint.reportPath=pylint-report.txt
0 commit comments