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.
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