java:S1135 "Track uses of "TODO" tags" doesnot work for Test Java Classes

  • ALM used ==> GitHub

  • CI system used ==> Travis CI

  • Scanner command used when applicable (private details masked)

  • Languages of the repository: Java

  • Steps to reproduce
    ==> Add a TODO in a TestJava File for example add a// TODO in this file

==> Run the Sonalint Analyze from Intellij with java:S1135 enabled.

==> Expected : Check should detect code Smell
==> Actual behaviour ==> No code smell detected.

This works fine for src Java classes. However the Description of this CodeSmell says it should work for Test Classes too but its not working.

  • Potential workaround : NONE

How do we get in touch with dev team to report this issue.
Looks like this is a bug.

Hey there.

You’ve done the right thing by posting it here, and somebody will look at it soon.

1 Like

Hi @joviegas.
Thanks for raising the issue. There is indeed some inconsistency between the documentation and the implementation.
While we discuss if the rule should be raising issues on test code, I have created a ticket to make sure the documentation is consistent.

Best,

Dorian

1 Like

Thank you Dorian for the update

[SONARJAVA-4381] - Jira says its resolved
What will I have to do to take the fix ?

Hi @joviegas ,
Just to be clear, the rule has not been updated.
The ticket mentioned above only updated our documentation to resolve the ambiguity. This documentation update should already be available on SonarCloud.

Cheers,

Dorian