Dashboards can be a very efficient communication tool for a team, between managers and business units. It enables an organization around a vision to share common goals. It can also be useful to identify weaknesses in processes and adapt your strategy according to them.
<%- toc(str, [options]) %>
Installation and Configuration
The first step is to download the plugin directly from Github here.
Find the latest release.
Copy it in your Sonar extension folder.
Restart the server
Restart the server by calling the commands (here on linux)
➜ sonarqube-6.0 ./bin/linux-x86-64/sonar.sh stop Stopping SonarQube... Waiting for SonarQube to exit... Stopped SonarQube. ➜ sonarqube-6.0 ./bin/linux-x86-64/sonar.sh start
Enabling custom rules in SonarQube
Don’t forget to modify your SonarQube profile to enable the new ESLint rules :
Preparing your project
Handling SonarQube Scanner
Creates a file
sonar-project.properties̀ into your project.
Copy-paste this content and modify it :
Don’t forget the line
OK! SonarQube Scanner is configured!
ESLint is thereby often upgraded and contains through its extension system, rules and frameworks that you won’t find in the regular SonarQube installation.
If you haven’t created yet an ESLint configuration file, here is the commands :
You can try the configuration by launching ESLint ony your project. It may warn you that some extensions are missing. Install them with NPM or Yarn.
Usually, the ReactJS extension is missing of your project. You can add them like developer extensions (
--save-dev) or globally (
With the right configuration and ESLint installation, the scan of a JSX File should work :
OK! ESLint is configured!
Launching SonarQube Scanner
Launchs the SonarQube scanner with the command :
And the analysis is running …
Controlling the results
Go to your Sonar interface, and jump directly to the dashboard.
Our project has been analyzed.
We observe that the violation’s number is increasing with the new rules.
Hourra, our JSX files are analyzed !
Some time ago, I organized a talk on “Code Quality and why developers should care about” for my company. In that presentation, I demonstrate some tools, unfamiliar for the audience : young developers and battle-hardened IT developers. One among these tools has brought to me a lot of questions : Codacy. I will present its features and perform a comparison between Codacy and SonarQube from SonarSource.