Skip to content

Implement usethis tool sonarqube #93

@nathanjmcdougall

Description

@nathanjmcdougall

Motivation
We use sonarqube at my organization so it would be great to support it.

Summary of desired enhancement
A few things needed:

  • Need a CI already configured - we will add to any (supported) we find; just bitbucket to begin with via if-statement
  • 3 environment variables to be set: the Host URL, Token, and the project key. These should be entered at the bitbucket (or whatever) level, and the user should be informed accordingly.
  • Create a bespoke configuration file sonar-projects.properties. Rather than having this sit in version control, as suggested in a comment below, the information could live in pyproject.toml and then get exported to the sonar-projects.properties file dynamcially in CI.
  • For Bitbucket: use a pipe (similar to pre-commit hook - points to an external repo) from here: https://bitbucket.org/sonarsource/sonarqube-scan/src/master/
  • Configure the pipe in each CI config to accept the relevant information from the 3 environment variables and to point to the properties file
  • Need to hard-code the versions of Python supported - fine, we already do this with Bitbucket anyway. Re-running usethis tool sonarqube with a change to the supported versions should update the config file in the relevant sonar.python.version field.
  • Should be added to the bitbucket pipelines as a final step.

Metadata

Metadata

Labels

ciIssues relating to continuous integration support as a featureenhancementNew feature or requeststretchLikely out of scope, but might be worth reaching toward one day

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions