Question

Actually in our project, we are planning to start developing code (with SONAR to analyze from beginning only) , So we are making use of sonar plugin in eclipse. We know how to analyze code by configuring project to SONARQUEBE and making use of maven build tool as well as using sonarrunner. Instead of building maven for every code changes and analysing , is there any way that prompts (as well as show error lines ) sonar to immediately analyze just after saving the java file ?

Help will be appreciated..... Thanks in advance

Was it helpful?

Solution

There is currently no way to tie an sonar analysis to a save action.

However, you do not need to run the maven based analysis. Assuming you use a recent version of SonarQube and SonarQube ide (4+ and 3.3), you can simply run the analysis using the shortcut (ALT-Ctrl-Q, by default).

Using incremental mode with SonarQube 4+, this is actually really fast, because it analyzes only the changed files as compared to the last successful SonarQube run.

Of course, you need make sure that your buildserver regularily runs your full SonarQube builds as well.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top