squid:S1135 too restrictive with 'todo' in java for Spanish comments

We are getting lots of squid:S1135 issues due to the word ‘todo’ (similar to ‘all’ or ‘everything’ in spanish) is in lots of comments written in Spanish. Could this be more specific, like using all caps like Eclipse does (only a TODO would trip the rule), or maybe only if it’s at the beginning of a comment…

1 Like

Hello David, thanks for the feedback.

The problem here is that, if we modify the rule for Spanish, we loose precision and may enter in conflict with other languages, it is not possible on our side to suits all language specific needs. This is why we decided to stick with the convention and target English in priority. Adding a configurable parameters for this rule seems too much (imagine having to configure one parameters for the 500+ rules of SonarJava)?

I agree that this could be annoying for Spanish users, however I don’t see a good alternative other than de-activating the rule if it generates too many FP on your side.

Best,
Quentin

The point would be to apply the same rules as Eclipse does, that is, “TODO” in uppercase is a “To Do” comment, while “todo” in lowercase, is not.

As a spaniard, I would suggest to apply this rule in SonarLint like this too.

Hi @Jesus_Lunar_Perez,
In intellij idea, the “todo” detection pattern is not sensitive to the case by default. I think the java analyzer should have the same default behavior. So I only created the ticket SONARJAVA-4076 to make the pattern of the rule S1135 configurable by the user.
Gracias por todo
Alban

1 Like

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.