Commit ba739988 authored by Guilhem Bonnefille's avatar Guilhem Bonnefille
Browse files

feat(lint): add a report for SonarQube

SonarQube is able to ingest pylint reports: 
https://docs.sonarqube.org/latest/analysis/external-issues/
Add a dedicated pylint run to generate this report.
parent 10457484
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -73,6 +73,7 @@ It is bound to the `build` stage, and uses the following variables:
This job produces the following artifacts, kept for one day:

* Code quality json report in code climate format.
* Pylint report for SonarQube (if `SONAR_URL` is defined).

### Test jobs

+6 −0
Original line number Diff line number Diff line
@@ -599,6 +599,12 @@ py-lint:
        # success: generate empty codeclimate report (required by GitLab :( )
        echo "[]" > reports/pylint-codeclimate.json
      fi
    - |
      if [ -n "$SONAR_URL" ]
      then
        # SonarQube is configured, export analysis report
        _run pylint --ignore=.cache --output-format=parseable  ${PYLINT_ARGS} ${PYLINT_FILES:-$(find -type f -name "*.py")} > reports/pylint.txt
      fi
  artifacts:
    name: "$CI_JOB_NAME artifacts from $CI_PROJECT_NAME on $CI_COMMIT_REF_SLUG"
    expire_in: 1 day