@@ -27,22 +27,19 @@ check_pylint:
27
27
extends :
28
28
- .pre_check_template
29
29
- .rules:patterns:python-files
30
- - .before_script_minimal
31
- image : $SONARQUBE_SCANNER_IMAGE
32
30
artifacts :
33
31
when : always
34
- paths :
35
- - pylint-report.txt
32
+ reports :
33
+ codequality : pylint.json
36
34
expire_in : 1 week
37
35
script :
38
- - export PYTHONPATH="$IDF_PATH/tools:$IDF_PATH/tools/ci/python_packages:$PYTHONPATH"
39
36
- |
40
37
if [ -n "$CI_MERGE_REQUEST_IID" ]; then
41
38
export files=$(python ${CI_PROJECT_DIR}/tools/ci/ci_get_mr_info.py files ${CI_MERGE_REQUEST_SOURCE_BRANCH_NAME} | grep ".py");
42
39
else
43
40
export files=$(find . -iname "*.py" -print);
44
41
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
46
43
47
44
# build stage
48
45
# Sonarqube related jobs put here for this reason:
@@ -83,7 +80,6 @@ check_pylint:
83
80
expire_in : 1 week
84
81
dependencies : # Here is not a hard dependency relationship, could be skipped when only python files changed. so we do not use "needs" here.
85
82
- clang_tidy_check
86
- - check_pylint
87
83
88
84
code_quality_check :
89
85
extends :
@@ -107,7 +103,6 @@ code_quality_check:
107
103
-Dsonar.gitlab.ref_name=$CI_MERGE_REQUEST_SOURCE_BRANCH_NAME
108
104
-Dsonar.host.url=$SONAR_HOST_URL
109
105
-Dsonar.login=$SONAR_LOGIN
110
- -Dsonar.python.pylint.reportPath=pylint-report.txt
111
106
112
107
code_quality_report :
113
108
extends :
@@ -124,4 +119,3 @@ code_quality_report:
124
119
-Dsonar.gitlab.ref_name=$CI_COMMIT_REF_NAME
125
120
-Dsonar.host.url=$SONAR_HOST_URL
126
121
-Dsonar.login=$SONAR_LOGIN
127
- -Dsonar.python.pylint.reportPath=pylint-report.txt
0 commit comments