17

I want to add sonarlint plugin to my project. When I build with maven, the plugin should be automatically enabled without my intervention. Is there a way I could do it?

naugler
  • 1,060
  • 10
  • 31
pramod kumar
  • 275
  • 2
  • 12
  • 1
    What do you mean enabled? SonarLint is used in the IDE and must be installed in each IDE. – Duarte Meneses Jan 29 '16 at 09:07
  • I mean plugin should be automatically installed into ide. when maven is building the project,by putting something in pluginmanagement tag of pom.xml – pramod kumar Jan 29 '16 at 09:13
  • Can you suggest me some way, i could do it by adding some jars or anything that could help, basically i dont want to install it from eclipse marketeclipse – pramod kumar Jan 29 '16 at 11:59
  • 1
    SonarLint is not a maven plugin; You need to install the plugin in Eclipse or IntelliJ. In both IDEs, you can install it from a local file, if that makes any difference. If you want to trigger an analysis with maven and send the results to your instance of SonarQube, you can use the maven sonar plugin. – Duarte Meneses Jan 29 '16 at 13:43
  • 2
    What i want to do is , perform continuous integration with sonar lint – pramod kumar Jan 30 '16 at 04:34
  • Most likely you would have to find some way to call sonar-java-plugin which is the heart of sonarlint's static analyzer. – rveach Oct 29 '18 at 19:49

1 Answers1

2

SonarLint is a local plugin that can be embedded in your IDE. In the plugin setting you can put the "Automatically trigger analysis" in order to have feedback while writing.
In order to perform continuous integration you should use SonarQube, it is possible to integrate it with Jenkins or Codemagic and also with Maven. It is possible to add SonarQube to your pull requests as well.
You can see the doc here

You can find more information about the difference between SonarLint and SonarQube here