How to organize projects in SonarQube?

I am learning how to organize projects in SonarQube and find out what I have to pay for such a thing: http://www.sonarqube.org/bring-a-new-dimension-to-sonar-with-the-views-plugin/ . In Jenkins, in everything that is free, this product starts to amaze me. Is there any other free plugin for this purpose? Another thing is that I am trying to get a license to evaluate PL / SQL (I will have to pay for it too), but did not receive a response after two days. Guess that this product has no competitors.

+5
source share
1 answer

SonarQube is free. You perform project analysis (after receiving / running unit tests, analyzing static code, covering jacoco / cobertura code, testing jmeter performance, etc.) or any analysis using the sonar-based analysis engine.

Free commercial plugins are available in SonarQube, which you can download / install (trial / full license) and get what the commercial plugin offers.

One of these plugins is the Portfolio Viewer Plugin. Easy to download / install (check out the SonarQube documentation on how to get / install plugins).

To organize projects, you need to create new dashboards, views, measures and use them in widgets. Be the first to watch this: http://docs.sonarqube.org/display/PLUG/Views+plugin and http://www.sonarqube.org/everythings-a-component/

When the Views plugin is installed, you should do the following:

  • Make sure you are using the latest / newest version of SonarQube 5.1.x and sonar-runner 2.4 +

  • Install the latest / stable presentation portfolio plugin.

  • Create new views, subviews (inside the view).

  • Create new measures and filters. See a few posts / links below.

  • Perform sonar analysis (for example: run the sonarRunner task in Gradle or an offline sonar runner analysis in the project workspace) for some / all of your projects.

  • Run the " sonar host views " (create Jenkins work). This will populate all the Views / subviews you created using the latest sonar data.

  • At this point, create a new Dashboards / default dashboard for each team, for each type of project, for each location, etc. and use filters, views, measures in widgets .

  • Each time you run sonarqube analysis in a project, you need to assign this project to ONE from View or its Sub-View and make sure again that you run “sonar runner views” (using the / $ prompt command or through the Jenkins Execute build step Shell).

NOTE. The portfolio view plugin does not apply to all sonar project metrics as components, but most of these project metrics can be viewed / read using the portfolio view plugin as “components”.

For an example: see here SonarQube - Portfolio views aka Helicopter View nemo - Combined indicators of all projects

Other useful links: SonarQube - Portfolio view plugin - Project and filter movement diagram as well as SonarQube - Portfolio views Portfolio plugin aka Helicopter View nemo - Combined all project indicators

+3
source

Source: https://habr.com/ru/post/1240574/


All Articles