Code Inspect using sonar rules in conjunction with Webstorm
1. Purpose
In writing code will be limited by the company's sonar rules, do not want to write after the completion of the code inspect, back to a revision, time-consuming and laborious. Then, the following will detect the code through the codeinspect of the excellent Webstorm development tool, combined with the sonar plugin and the custom rules.
2. Installing and configuring Sonarqube
2.1 Installing Sonarqube
Webstorm->file->settings->plugin, specific installation
If you can't download it, you can download it manually and install it. Plug - ins:
http://plugins.jetbrains.com/plugin/7238
2.2 Adding Sonar Server
Webstorm->file->settings->other Settings->sonarqube, specific
2.3 Download Project Resources Wallet Master
3. Code detection
3.1 Configuring Sonar Detection rules
Code detection is consistent with the general webstorm process, but it needs to be configured for sonar detection, not the default Jshint, and so on.
Refer to the official note: Https://github.com/sonar-intellij-plugin/sonar-intellij-plugin.
Specific detection configuration
<select JS file>-Inspect Code
3.2 Performing Code detection
is the execution of code detection and detection results, there will be code prompt modification:
4. End
See the above description of the multi-figure, the basic can be solved by webstorm sonar code rule detection, and then enjoy it.
Code Inspect using sonar rules in conjunction with Webstorm