Skip to content
This repository has been archived by the owner on Feb 21, 2020. It is now read-only.

Add support for quality profiles (add, remove, set inheritance and activate rules) #67

Open
frodoslaw opened this issue Mar 3, 2016 · 1 comment

Comments

@frodoslaw
Copy link

Add support for quality profiles by adding custom puppet type and provider: qualityprofile.

Type description

This type should manage quality profiles (add, remove, set inheritance and activate rules).

sonarqube::qualityprofile { 'Nearly all SonarQube rules':
  ensure   => 'present',
  default  => true,
  language => 'java',
  inherits => 'Sonar way',
  rules    => {
    'squid:CallToFileDeleteOnExitMethod' => 'default', # use default severity from SonarQube
    'squid:S2096' => 'major', # sets Major severity
    # [...]
  },
}

Provider description

There should be a default provider that will use SonarQube API https://nemo.sonarqube.org/api_documentation/api/qualityprofiles

Below are listed required API functions that should fulfil type contract:

  • POST api/qualityprofiles/activate_rule or POST api/qualityprofiles/activate_rules - Since 4.4
  • POST api/qualityprofiles/add_project - Since 5.2
  • POST api/qualityprofiles/change_parent
  • POST api/qualityprofiles/create - Since 5.2
  • POST api/qualityprofiles/deactivate_rule - Since 4.4 or POST api/qualityprofiles/deactivate_rules
  • POST api/qualityprofiles/delete - Since 5.2
  • GET api/qualityprofiles/inheritance - Since 5.2
  • GET api/qualityprofiles/projects - Since 5.2
  • POST api/qualityprofiles/remove_project - Since 5.2
  • POST api/qualityprofiles/restore_built_in
  • POST api/qualityprofiles/set_default - Since 5.2
  • GET api/qualityprofiles/search - Since 5.2

This provider will support SonarQube ver. >= 5.2

@Cosaquee
Copy link

Cosaquee commented Mar 3, 2016

@coi-gov-pl will make it happen, we will submit PR.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants