Quantcast

[Java] Issue raised on a line containing a NOSONAR tag

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

[Java] Issue raised on a line containing a NOSONAR tag

David RACODON
Hi,

How's it possible to get an issue on a line containing a NOSONAR tag?

Inline image 2

Notes: 
  • I confirm that NOSONAR contains 'O' letters, not '0' digits.
  • The code should be written differently and the NOSONAR tag removed but this is not the purpose of this thread.
Configuration:
  • SonarQube 5.0
  • Java plugin 3.1

Thank you very much

Regards,

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

Re: [Java] Issue raised on a line containing a NOSONAR tag

David RACODON
Also, when activated, the NOSONAR rule doesn't raise an issue on this line. So, it looks like the NOSONAR tag detection mechanism fails in this case.
Tell me what you would need to investigate.

David RACODON
Freelance QA Consultant

On Wed, May 20, 2015 at 8:37 AM, David Racodon <[hidden email]> wrote:
Hi,

How's it possible to get an issue on a line containing a NOSONAR tag?

Inline image 2

Notes: 
  • I confirm that NOSONAR contains 'O' letters, not '0' digits.
  • The code should be written differently and the NOSONAR tag removed but this is not the purpose of this thread.
Configuration:
  • SonarQube 5.0
  • Java plugin 3.1

Thank you very much

Regards,

David RACODON
Freelance QA Consultant

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

Re: [Java] Issue raised on a line containing a NOSONAR tag

David RACODON
This FindBugs issue is raised on a test file. Those test files should not be analyzed by SonarQube as source code. They don't seem to be by having a look at the log (test files are in "testsrc" directory).

-------------  Scan xxx origin/master
2015-05-08 11:13:25 11:13:25.341 INFO  - Load module settings
...
2015-05-08 11:13:25 11:13:25.557 INFO  - Source paths: src, hmc/src
2015-05-08 11:13:25 11:13:25.557 INFO  - Test paths: testsrc
2015-05-08 11:13:25 11:13:25.557 INFO  - Source encoding: UTF-8, default locale: en_US
...

and by the fact that NOSONAR issue is not raised on this file.

So, it looks like the FindBugs analysis reported an issue on this test file and SonarQube decorated this test file with the issue. How is it possible?

Thank you

David RACODON
Freelance QA Consultant

On Wed, May 20, 2015 at 8:54 AM, David Racodon <[hidden email]> wrote:
Also, when activated, the NOSONAR rule doesn't raise an issue on this line. So, it looks like the NOSONAR tag detection mechanism fails in this case.
Tell me what you would need to investigate.

David RACODON
Freelance QA Consultant

On Wed, May 20, 2015 at 8:37 AM, David Racodon <[hidden email]> wrote:
Hi,

How's it possible to get an issue on a line containing a NOSONAR tag?

Inline image 2

Notes: 
  • I confirm that NOSONAR contains 'O' letters, not '0' digits.
  • The code should be written differently and the NOSONAR tag removed but this is not the purpose of this thread.
Configuration:
  • SonarQube 5.0
  • Java plugin 3.1

Thank you very much

Regards,

David RACODON
Freelance QA Consultant


Loading...