Is it possible to have SonarLint for IntelliJ IDEA enforce only the rules I have enabled on my Sonar server?
In Intellij — Go to File >> Plugins >> Type 'SonarLint' >> Install and Restart IDE. (2) we can choose the SonarQube rules. → To integrate SonarQube(server) and SonarLint in our IDE and run SonarQube code inspection rules per class to give results quickly.
As you discovered, we manage plugins, custom rules and quality profiles at a central place, in SonarQube, and SonarLint can benefit from that only in connected mode. Note that even though we call it connected mode, there is no active connection between SonarLint and SonarQube.
Open the “SonarLint Bindings” view in Eclipse, right click on your connection, and click “Update all projects bindings”. I know the root cause. It is because these rules are default not activated. I shoud copy the built-in profile and activate them, then Update All Project Bindings from SonarLint.
SonarLint 1.0 for Eclipse and IntelliJ do not allow to edit the quality profile (or set of rules) to be used for the analysis. Moreover, SonarLint 1.x works completely independently of a SonarQube server (having a SonarQube server is not a requirement), and therefore does not have the ability to reuse a quality profile defined there.
SonarLint 2.0 will have an optional mode that connects to a SonarQube server, and will offer this feature - but this isn't available yet.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With