Quantcast

[JavaScript] False positives on 'Sections of code should not be "commented out"' rule

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
9 messages Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

[JavaScript] False positives on 'Sections of code should not be "commented out"' rule

David RACODON
Hi,

We're facing false positives on JavaScript regarding the 'Sections of code should not be "commented out"' rule. For example:

Inline image 1

Do you know why?

We're running SonarQube 5.0 and JavaScript plugin 2.2.

Thank you

Regards,

David RACODON
Freelance QA Consultant
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: [JavaScript] False positives on 'Sections of code should not be "commented out"' rule

Dinesh Bolkensteyn-2
Hello David,

Commented out code is based on some heuristics, which are not perfect.

I understand that you are facing many false positives on this rule: Could you send more examples that trigger the rule?

We then will be able to adjust the heuristic to no longer detect those patterns.

Kind regards,


On Thu, Feb 12, 2015 at 4:48 PM, David Racodon <[hidden email]> wrote:
Hi,

We're facing false positives on JavaScript regarding the 'Sections of code should not be "commented out"' rule. For example:

Inline image 1

Do you know why?

We're running SonarQube 5.0 and JavaScript plugin 2.2.

Thank you

Regards,

David RACODON
Freelance QA Consultant

Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: [JavaScript] False positives on 'Sections of code should not be "commented out"' rule

David RACODON
Hi Dinesh,

Our false positives are on the same pattern for now:

Used in XXX // URL

Regards,

David RACODON
Freelance QA Consultant

On Thu, Feb 12, 2015 at 5:18 PM, Dinesh Bolkensteyn <[hidden email]> wrote:
Hello David,

Commented out code is based on some heuristics, which are not perfect.

I understand that you are facing many false positives on this rule: Could you send more examples that trigger the rule?

We then will be able to adjust the heuristic to no longer detect those patterns.

Kind regards,


On Thu, Feb 12, 2015 at 4:48 PM, David Racodon <[hidden email]> wrote:
Hi,

We're facing false positives on JavaScript regarding the 'Sections of code should not be "commented out"' rule. For example:

Inline image 1

Do you know why?

We're running SonarQube 5.0 and JavaScript plugin 2.2.

Thank you

Regards,

David RACODON
Freelance QA Consultant


Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: [JavaScript] False positives on 'Sections of code should not be "commented out"' rule

David RACODON
Hi,

Any improvement planned on this rule? Another similar false positive:

Inline image 1

Thank you

Regards,

David RACODON
Freelance QA Consultant

On Thu, Feb 12, 2015 at 5:26 PM, David Racodon <[hidden email]> wrote:
Hi Dinesh,

Our false positives are on the same pattern for now:

Used in XXX // URL

Regards,

David RACODON
Freelance QA Consultant

On Thu, Feb 12, 2015 at 5:18 PM, Dinesh Bolkensteyn <[hidden email]> wrote:
Hello David,

Commented out code is based on some heuristics, which are not perfect.

I understand that you are facing many false positives on this rule: Could you send more examples that trigger the rule?

We then will be able to adjust the heuristic to no longer detect those patterns.

Kind regards,


On Thu, Feb 12, 2015 at 4:48 PM, David Racodon <[hidden email]> wrote:
Hi,

We're facing false positives on JavaScript regarding the 'Sections of code should not be "commented out"' rule. For example:

Inline image 1

Do you know why?

We're running SonarQube 5.0 and JavaScript plugin 2.2.

Thank you

Regards,

David RACODON
Freelance QA Consultant



Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: [JavaScript] False positives on 'Sections of code should not be "commented out"' rule

Michel Pawlak
In reply to this post by Dinesh Bolkensteyn-2

Hi,

Here follows another false positive example :

             *              { 'xxXXX': 'AA0000011.000' }

But the following lines do not raise any issue :

             *              { 'xxXXX': 'AA0000011.000', 'copy': true }
...
             *              {'xxXXX' : { 'yyy' : 'A0000001' }}
...
             *              {'xxXXX' : { 'yyy' : ['0600000'], 'zzz' : ['123456A', '123456B', '123456C']}}

Thanks in advance

Michel
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: [JavaScript] False positives on 'Sections of code should not be "commented out"' rule

Linda Martin
Hello,

You can follow the resolution of this issue through the following ticket: SONARJS-388.

Regards,

Linda.

On 4 May 2015 at 17:25, Michel Pawlak <[hidden email]> wrote:
Hi,
Here follows another false positive example :
             *              { 'xxXXX': 'AA0000011.000' }
But the following lines do not raise any issue :
             *              { 'xxXXX': 'AA0000011.000', 'copy': true }...
*              {'xxXXX' : { 'yyy' : 'A0000001' }}...             *
{'xxXXX' : { 'yyy' : ['0600000'], 'zzz' : ['123456A', '123456B',
'123456C']}}
Thanks in advance
Michel



--
View this message in context: http://sonarqube.15.x6.nabble.com/JavaScript-False-positives-on-Sections-of-code-should-not-be-commented-out-rule-tp5032301p5034962.html
Sent from the SonarQube Users mailing list archive at Nabble.com.

---------------------------------------------------------------------
To unsubscribe from this list, please visit:

    http://xircles.codehaus.org/manage_email



Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: [JavaScript] False positives on 'Sections of code should not be "commented out"' rule

Michel Pawlak
Hello,

Thanks for the ticket, however will handle the false positives I reported ?

Kind regards,
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: [JavaScript] False positives on 'Sections of code should not be "commented out"' rule

David RACODON
In reply to this post by Linda Martin
Thanks Linda.

David RACODON
Freelance QA Consultant

On Wed, May 6, 2015 at 5:40 PM, Linda Martin <[hidden email]> wrote:
Hello,

You can follow the resolution of this issue through the following ticket: SONARJS-388.

Regards,

Linda.

On 4 May 2015 at 17:25, Michel Pawlak <[hidden email]> wrote:
Hi,
Here follows another false positive example :
             *              { 'xxXXX': 'AA0000011.000' }
But the following lines do not raise any issue :
             *              { 'xxXXX': 'AA0000011.000', 'copy': true }...
*              {'xxXXX' : { 'yyy' : 'A0000001' }}...             *
{'xxXXX' : { 'yyy' : ['0600000'], 'zzz' : ['123456A', '123456B',
'123456C']}}
Thanks in advance
Michel



--
View this message in context: http://sonarqube.15.x6.nabble.com/JavaScript-False-positives-on-Sections-of-code-should-not-be-commented-out-rule-tp5032301p5034962.html
Sent from the SonarQube Users mailing list archive at Nabble.com.

---------------------------------------------------------------------
To unsubscribe from this list, please visit:

    http://xircles.codehaus.org/manage_email




Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: [JavaScript] False positives on 'Sections of code should not be "commented out"' rule

Linda Martin
In reply to this post by Michel Pawlak
Hello Michel,

Sorry for the late reply. I don't see how the code example you gave is a false-positive, it looks like it is indeed commented code.
Maybe if you could give a larger code snippet including the whole comment I could understand the context.

Thank in advance,

Best regards,

Linda.

On 6 May 2015 at 18:23, Michel Pawlak <[hidden email]> wrote:
Hello,

Thanks for the ticket, however will handle the false positives I reported ?

Kind regards,



--
View this message in context: http://sonarqube.15.x6.nabble.com/JavaScript-False-positives-on-Sections-of-code-should-not-be-commented-out-rule-tp5032301p5035066.html
Sent from the SonarQube Users mailing list archive at Nabble.com.

---------------------------------------------------------------------
To unsubscribe from this list, please visit:

    http://xircles.codehaus.org/manage_email



Loading...