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

**URL:** <https://community.sonarsource.com/t/java-s1135-track-uses-of-todo-tags-doesnot-work-for-test-java-classes/76711>\
**Category:** SonarQube Cloud\
**Tags:** java, sonarqube-cloud\
**Created:** [November 29, 2022, 1:45am UTC](https://community.sonarsource.com/t/java-s1135-track-uses-of-todo-tags-doesnot-work-for-test-java-classes/76711 "2022-11-29T01:45:22Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![joviegas](https://dub1.discourse-cdn.com/sonarsource/user_avatar/community.sonarsource.com/joviegas/32/39569_2.png) [@joviegas](https://community.sonarsource.com/u/joviegas)\
**Post date:** [November 29, 2022, 1:45am UTC](https://community.sonarsource.com/t/java-s1135-track-uses-of-todo-tags-doesnot-work-for-test-java-classes/76711/1 "2022-11-29T01:45:22Z")

</div>

- 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](https://github.com/aws/aws-sdk-java-v2/blob/master/services/s3/src/it/java/software/amazon/awssdk/services/s3/checksum/AsyncHttpChecksumIntegrationTest.java)

==\> 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

---

<div class="post-metadata">

**Author:** ![joviegas](https://dub1.discourse-cdn.com/sonarsource/user_avatar/community.sonarsource.com/joviegas/32/39569_2.png) [@joviegas](https://community.sonarsource.com/u/joviegas)\
**Post date:** [December 5, 2022, 11:43pm UTC](https://community.sonarsource.com/t/java-s1135-track-uses-of-todo-tags-doesnot-work-for-test-java-classes/76711/3 "2022-12-05T23:43:33Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![Colin](https://dub1.discourse-cdn.com/sonarsource/user_avatar/community.sonarsource.com/colin/32/55255_2.png) [@Colin](https://community.sonarsource.com/u/Colin)\
**Post date:** [December 6, 2022, 1:51pm UTC](https://community.sonarsource.com/t/java-s1135-track-uses-of-todo-tags-doesnot-work-for-test-java-classes/76711/4 "2022-12-06T13:51:21Z")

</div>

Hey there.

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

---

<div class="post-metadata">

**Author:** ![Dorian\_Burihabwa](https://dub1.discourse-cdn.com/sonarsource/user_avatar/community.sonarsource.com/dorian_burihabwa/32/18750_2.png) [@Dorian\_Burihabwa](https://community.sonarsource.com/u/Dorian_Burihabwa)\
**Post date:** [December 13, 2022, 1:24pm UTC](https://community.sonarsource.com/t/java-s1135-track-uses-of-todo-tags-doesnot-work-for-test-java-classes/76711/6 "2022-12-13T13:24:58Z")

</div>

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](https://sonarsource.atlassian.net/browse/SONARJAVA-4381) to make sure the documentation is consistent.

Best,

Dorian

---

<div class="post-metadata">

**Author:** ![joviegas](https://dub1.discourse-cdn.com/sonarsource/user_avatar/community.sonarsource.com/joviegas/32/39569_2.png) [@joviegas](https://community.sonarsource.com/u/joviegas)\
**Post date:** [December 20, 2022, 12:15am UTC](https://community.sonarsource.com/t/java-s1135-track-uses-of-todo-tags-doesnot-work-for-test-java-classes/76711/8 "2022-12-20T00:15:10Z")

</div>

Thank you Dorian for the update

---

<div class="post-metadata">

**Author:** ![joviegas](https://dub1.discourse-cdn.com/sonarsource/user_avatar/community.sonarsource.com/joviegas/32/39569_2.png) [@joviegas](https://community.sonarsource.com/u/joviegas)\
**Post date:** [January 10, 2023, 8:40pm UTC](https://community.sonarsource.com/t/java-s1135-track-uses-of-todo-tags-doesnot-work-for-test-java-classes/76711/9 "2023-01-10T20:40:43Z")

</div>

[[SONARJAVA-4381] - Jira](https://sonarsource.atlassian.net/browse/SONARJAVA-4381) says its resolved  
What will I have to do to take the fix ?

---

<div class="post-metadata">

**Author:** ![Dorian\_Burihabwa](https://dub1.discourse-cdn.com/sonarsource/user_avatar/community.sonarsource.com/dorian_burihabwa/32/18750_2.png) [@Dorian\_Burihabwa](https://community.sonarsource.com/u/Dorian_Burihabwa)\
**Post date:** [January 17, 2023, 2:53pm UTC](https://community.sonarsource.com/t/java-s1135-track-uses-of-todo-tags-doesnot-work-for-test-java-classes/76711/10 "2023-01-17T14:53:58Z")

</div>

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
