Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

how to write the word "todo" in javadoc without triggering the sonar alert?

I am trying to add a javadoc to explain what a class is doing but I am encountering a sonar alert.

Track uses of "TODO" tags (squid:S1135)

The thing is the word TODO is not used as a todo message or with @todo. Here is my javadoc :

/** Model which defines data from the oracle view V_THINGS_TODO which contains blabla */
public class ThingsTodo ... {

the word TODO is present in the javadoc but as a View name... So far I am using this workaround V_THINGS_T0D0 (as 0 1 2..) but It is kinda bad if someone try to search for this in the database.

Is there any magic trick I am not aware of to not trigger this alert with the todo word ?

Next time I will be more cautious about reserved word :-<

like image 887
rilent Avatar asked Nov 25 '25 09:11

rilent


1 Answers

Add the mention NOSONAR anywhere on the line for which you wish to disable Sonar inspection. Like that:

/** Model which defines data from the oracle view V_THINGS_TODO which contains blabla NOSONAR */
public class ThingsTodo ... {
like image 107
Adrien Brunelat Avatar answered Nov 26 '25 22:11

Adrien Brunelat



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!