Please provide disable/clean option in SonaLint for eclipse

2,011 views
Skip to first unread message

leon....@gmail.com

unread,
Nov 4, 2016, 5:18:51 AM11/4/16
to SonarLint
Hi,

Thanks for your effort, SonarLint is a very useful tool for our projects.

We know your goal is to make SonarLint "configuration free", but as you know, there are many legacy projects we have to maintain, and we don't have time to correct every projects or use 2 eclipse for different projects.

I also tried to disable "Run SonaLint automatically" for some projects, but didn't clean SonaLint warnings. 

If you can provide disable/clean option in SonaLint for eclipse, it would be great!

Thanks,
Leon

Julien HENRY

unread,
Nov 7, 2016, 5:39:27 AM11/7/16
to leon....@gmail.com, SonarLint
Hi Leon,

2016-11-04 10:18 GMT+01:00 <leon....@gmail.com>:
I also tried to disable "Run SonaLint automatically" for some projects, but didn't clean SonaLint warnings. 

If you can provide disable/clean option in SonaLint for eclipse, it would be great!

Once you have disabled automatic analysis, you can simply delete all existing markers (in SonarLint Issues view, select the one you want to delete, right click -> delete).

++

Julien

Leon Chen

unread,
Nov 8, 2016, 2:20:34 AM11/8/16
to Julien HENRY, SonarLint
Got it, thanks! 

Julien HENRY <julien...@sonarsource.com> 於 2016年11月7日 週一 下午6:39寫道:

Oli Thissen

unread,
Nov 8, 2016, 6:11:01 AM11/8/16
to SonarLint, leon....@gmail.com
As a follow-up question: Automatic analysis is based on a per-project setting, defaulting to "true" if no such setting is available (according to the source).

Activating or deactivating automatic analysis for each project is quite tedious. Is there a faster way that I'm currently missing?

Thanks,
Oli

Julien HENRY

unread,
Nov 8, 2016, 6:49:09 AM11/8/16
to Oli Thissen, SonarLint, Leon Chen

2016-11-08 12:11 GMT+01:00 Oli Thissen <oli.t...@gmail.com>:
Activating or deactivating automatic analysis for each project is quite tedious. Is there a faster way that I'm currently missing?

Nope. In fact we don't expect disabling automatic analysis to be frequent. The only valid use case is for Maven root projects (waiting for a proper fix of https://jira.sonarsource.com/browse/SLE-65).

Among other reported cases there are performance issues, and the solution is not to disable automatic analysis (this could only be a temporary workaround). In case of performance issue, you should report it on the list so that we can investigate and fix.

Another problem is the annoyance of seeing too many issues for legacy projects, and for we are coming with improvements: next version of SLE will hide issues marked as won't fix/false positive on server side. And later we will probably have a filter to only show issues that are in the leak period.

++

Julien

Oli Thissen

unread,
Nov 8, 2016, 7:04:48 AM11/8/16
to SonarLint, oli.t...@gmail.com, leon....@gmail.com
A hughe Maven aggregator project is exactly what I'm facing here. I'll have a look at the suggested workaround and disable automatic analysis on the aggregator instead of all projects.

So I don't think we're facing any performance issues so far except Maven, Eclipse and SLE "blocking" each other.

Thanks!
Oli

Leon Chen

unread,
Nov 8, 2016, 10:20:11 AM11/8/16
to Oli Thissen, SonarLint
Dear Julien,

Just provide my use case for your reference.

For "legacy projects", I usually don't want to enable SonaQube, so I will not configure it on the server side. 
Since SonarLine is enabled by default, once I import the legacy projects, thousands of SonaQube issues in hundreds of source files are found, and it would cost much time to delete them in every source files.
But of course, in the same Eclipse, I will use SonaLint/SonaQube in my every new project, it is very useful!!! Thanks again!

So, at least in my use case, I am still looking for a disable/clean all options in SonaLint, just like chekcstyle plugin.

Thanks,
Leon




Oli Thissen <oli.t...@gmail.com> 於 2016年11月8日 週二 下午8:04寫道:

Matthias Kolley

unread,
Nov 9, 2016, 3:35:47 AM11/9/16
to SonarLint, oli.t...@gmail.com, leon....@gmail.com
You could add sonar.exclusions properties for the analyzer.

sonar.exclusions=**/*.js for example exludes all *.js Files
See this question at StackOverflow for reference: http://stackoverflow.com/q/33660091/3157899

In Eclipse --> Window-->Preferences-->SonarLint-->Analyzer Properties
Reply all
Reply to author
Forward
0 new messages