From: Matthew Fernandez Date: Wed, 10 Mar 2021 04:41:47 +0000 (-0800) Subject: track metrics from pylint job in CI X-Git-Tag: 2.47.1~51^2 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=4c9d25084ac812299857fcc7be8edf4212d2c0d7;p=graphviz track metrics from pylint job in CI This replicates the metric tracking from some other CI jobs for the pylint task. This should make the number of pylint warnings appear in the metrics section of MRs, allowing us to track whether MRs increase or reduce the number of pylint warnings. --- diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 8716ebab0..0761cc0cd 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -813,4 +813,13 @@ lint_pylint: needs: - docker_build_ubuntu-20.10 script: - - python3 -m pylint --rcfile=.pylintrc `find . -name '*.py' | xargs` --exit-zero + - logfile=`mktemp` + - python3 -m pylint --rcfile=.pylintrc `find . -name '*.py' | xargs` --exit-zero |& tee $logfile + - echo "$CI_JOB_NAME-warnings `egrep -c '\<[CEW][[:digit:]]{4}\>' $logfile`" > metrics.txt + - rm $logfile + - cat metrics.txt + artifacts: + when: on_success + expire_in: 1 week + reports: + metrics: metrics.txt