C++ Rule Track uses of "TODO" tags reports FP when it is inside a word

Hello

We have a false positives when “todo” is inside a word, like the spanish “Metodo” which stands for Method.

We understand it is impossible to adapt all the regex and rules for any language but could be easy to avoid this behaviour in general when looking for the keyword.

Regards
Javier

  • C++ code
  • Developer Edition Version 8.6 (build 39681)
  • Latest SonarScanner

Hello @jggundin,

I have checked in the code and in our tests, but both rules we have about TODO (S1707 and S1135) only consider full words. So in both cases, Metodo should not be detected as a “TODO”.

Do you have a sample code that reproduces this strange behaviour? Do you have analysis logs?

Thank you!