--
You received this message because you are subscribed to the Google Groups "SonarQube" group.
To unsubscribe from this group and stop receiving emails from it, send an email to sonarqube+...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/sonarqube/091fd488-df33-4667-9d16-ca2f8a9595b5%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Mike,
Even more concerning is that I just figured out that there are only certain places where you can use @SuppressWarnings. Apparently, "Java annotations can only annotate declarations". Meaning. when you declare a:
But, you cannot use this in front of an arbitrary line of code. So, for example, if I have a line of code that violates the null pointer exception rule like so:TYPE,FIELD,METHOD,PARAMETER,CONSTRUCTOR,or LOCAL_VARIABLE
methodFooBar(item.getSomething());
The null pointer rule might complain that 'item' might be null. But if I know it can't be, I want to put an @SuppressWarnings("squid:RULEID") in front of this line of code to suppress that specific rule but I can't, because that not a legal location for a SuppressWarnings() annotation in Java.
Now, I can apparently add: //NOSONAR at the end of this line to suppress ALL Sonar rules on that line, but why isn't something supported to suppress only a single SonarRule for a single line like this?
Or is there some other way to do this?
-Dave
From: Dave Wichers
Sent: Tuesday, June 21, 2016 5:34 PM
To: mle...@gmail.com
Subject: RE: Ability to disable specific Sonar rules on specific lines of code?
Mike,
I'm finally getting a change to test this out. The first thing I noticed when doing something like this:
@SuppressWarnings("squid:S2068")
some code
Is that Eclipse is now showing a warning:
Unsupported@SuppressWarnings("squid:S2068") on the line where I just added it. Is there a way to configure Eclipse so it realizes this is OK?
Thanks, Dave
From: Dave Wichers [dave.w...@owasp.org]
Sent: Tuesday, May 17, 2016 10:27 AM
To: mle...@gmail.com
Cc: Dave Wichers
Subject: Fwd: Ability to disable specific Sonar rules on specific lines of code?
To view this discussion on the web visit https://groups.google.com/d/msgid/sonarqube/CAEi9rUJsSMfvoAsyGyFJyU8ah10C7-ZZRpkdASwq4G2Qq9qzhQ%40mail.gmail.com.
But how does that help if I have 50 branches of the same code base? And so 50 sonar projects?
Dave
-------- Original Message --------
Subject: Re: Ability to disable specific Sonar rules on specific lines of code?
From: "G. Ann Campbell" <ann.ca...@sonarsource.com>
Date: Jun 23, 2016, 5:35 AM
To: Dave Wichers <dave.w...@aspectsecurity.com>,SonarQube <sona...@googlegroups.com>
Ok. So how do I suppress this issue in 50 branches today?
Dave
-------- Original Message --------
Subject: Re: Ability to disable specific Sonar rules on specific lines of code?
From: "G. Ann Campbell" <ann.ca...@sonarsource.com>
Date: Jun 23, 2016, 9:08 AM
Ok. So how do I suppress this issue in 50 branches today?
Dave
-------- Original Message --------
Subject: Re: Ability to disable specific Sonar rules on specific lines of code?
From: "G. Ann Campbell" <ann.ca...@sonarsource.com>
Date: Jun 23, 2016, 9:08 AM
To: Dave Wichers <dave.wichers@aspectsecurity.com>
Hi Dave,
Please reply to the group as a whole. Others may benefit from the conversation too.
To answer your question, it doesn't. Yet.
We've never had meaty, full-featured branch support in SonarQube but we're planning to tackle that this year.
Ann
On Thu, Jun 23, 2016 at 2:56 PM, Dave Wichers <dave.wichers@aspectsecurity.com> wrote:
But how does that help if I have 50 branches of the same code base? And so 50 sonar projects?
Dave
-------- Original Message --------
Subject: Re: Ability to disable specific Sonar rules on specific lines of code?
From: "G. Ann Campbell" <ann.ca...@sonarsource.com>
Date: Jun 23, 2016, 5:35 AM
To: Dave Wichers <dave.wichers@aspectsecurity.com>,SonarQube <sona...@googlegroups.com>
Hi Dave,
That's why you can mark issues False Positive in the interface.
Ann
To unsubscribe from this group and stop receiving emails from it, send an email to sonarqube+unsubscribe@googlegroups.com.
To: Dave Wichers <dave.w...@aspectsecurity.com>
Hi Dave,
Please reply to the group as a whole. Others may benefit from the conversation too.
To answer your question, it doesn't. Yet.
We've never had meaty, full-featured branch support in SonarQube but we're planning to tackle that this year.
Ann
On Thu, Jun 23, 2016 at 2:56 PM, Dave Wichers <dave.w...@aspectsecurity.com> wrote:
But how does that help if I have 50 branches of the same code base? And so 50 sonar projects?
Dave
-------- Original Message --------
Subject: Re: Ability to disable specific Sonar rules on specific lines of code?
From: "G. Ann Campbell" <ann.ca...@sonarsource.com>
Date: Jun 23, 2016, 5:35 AM
To: Dave Wichers <dave.w...@aspectsecurity.com>,SonarQube <sona...@googlegroups.com>
Hi Dave,
That's why you can mark issues False Positive in the interface.
Ann
To unsubscribe from this group and stop receiving emails from it, send an email to sonarqube+...@googlegroups.com.
--
You received this message because you are subscribed to a topic in the Google Groups "SonarQube" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/sonarqube/szJ7EXbevHk/unsubscribe.
To unsubscribe from this group and all its topics, send an email to sonarqube+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/sonarqube/25cb1782-fc94-4911-9334-2e776dfc56a1%40googlegroups.com.