Option to disable a certain warning?

875 views
Skip to first unread message

s.si...@techdivision.com

unread,
Oct 14, 2016, 5:13:28 AM10/14/16
to SonarLint
I installed the SonarLint Plugin in PhpStorm 2016.
When I'm working on JavaScript-Files, I'd like to paste a comment above any code line that should be excluded from code analysis.

For example with this snippet I'd ignore the warning "Either remove this useless object instantiation of "Ajax.Request" or use it":

/** @sonarIgnore **/
new Ajax.Request({...});


Is it possible to do this in some way or could you implement it?

Pierre-Yves Nicolas

unread,
Oct 14, 2016, 5:48:37 AM10/14/16
to s.si...@techdivision.com, SonarLint
You may add "// NOSONAR" at the end of the line.

The rule which bothers you was removed from the default quality profile in version 2.16 of the JavaScript plugin. That means that future versions of SonarLint will not run this rule unless you add it to a quality profile on a SonarQube server.


--
You received this message because you are subscribed to the Google Groups "SonarLint" group.
To unsubscribe from this group and stop receiving emails from it, send an email to sonarlint+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/sonarlint/568af300-8b21-4e09-8cdc-e8881ad5ab96%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

s.si...@techdivision.com

unread,
Oct 14, 2016, 5:55:05 AM10/14/16
to SonarLint, s.si...@techdivision.com
Thank you for your answer. Unfortunately this won't work on a multi-line statement. I've installed the latest version of SonarLint (2.3.2), is there any information about when the new version will get published?

Am Freitag, 14. Oktober 2016 11:48:37 UTC+2 schrieb pierre-yves.nicolas:
You may add "// NOSONAR" at the end of the line.

The rule which bothers you was removed from the default quality profile in version 2.16 of the JavaScript plugin. That means that future versions of SonarLint will not run this rule unless you add it to a quality profile on a SonarQube server.

On 14 October 2016 at 11:13, <s.si...@techdivision.com> wrote:
I installed the SonarLint Plugin in PhpStorm 2016.
When I'm working on JavaScript-Files, I'd like to paste a comment above any code line that should be excluded from code analysis.

For example with this snippet I'd ignore the warning "Either remove this useless object instantiation of "Ajax.Request" or use it":

/** @sonarIgnore **/
new Ajax.Request({...});


Is it possible to do this in some way or could you implement it?

--
You received this message because you are subscribed to the Google Groups "SonarLint" group.
To unsubscribe from this group and stop receiving emails from it, send an email to sonarlint+...@googlegroups.com.
Reply all
Reply to author
Forward
0 new messages