TODO tags in Spanish

  • What language is this for?
    T-SQL but I think it applies to all of them

  • Which rule?
    tsql:S1135

  • Why do you believe it’s a false-positive/false-negative?
    In Spanish the TODO word doesn’t have the same meaning as in English, therefore it may be useful to have a per project configuration to exclude, or even modify, this rule

  • Are you using

    • SonarCloud?
    • SonarQube - which version?
      Enterprise EditionVersion 9.9.2 (build 77730)
    • SonarLint - which IDE/version?
      • in connected mode with SonarQube or SonarCloud?
  • How can we reproduce the problem? Give us a self-contained snippet of code (formatted text, no screenshots)
    /*

    SP ENCARGADO DE MANDAR A MASS UPDATE LOS COMERCIOS Y DE RECUPERAR LOS ESTADOS DE MASS UPDATE PENDIENTES
    PARA ACTUALIZAR LA TABLA DE MODIFICACIONES, ASI COMO RECUPERAR LAS INSTALACIONES NUEVAS Y MARCARLAS EN LA TABLA
    DE MODIFICACIONES

    NO HACE FALTA UNA TRANSACCIÓN A ESE NIVEL, SI UNO DE LOS SP FALLA SE PUEDE VOLVER A EJECUTAR TODO SIN IMPACTO

    OJO!!! ES MUY IMPORTANTE EL ORDEN!!

*/

Hey there.

This is a tough one – see here:

And if we improved this, our idea would be to make it case-sensitive (flag TODO but not Todo or todo)… I guess that would’t help the example you give, but do you think it would help somewhat?

Hi!

Oh I see, I get your point but I do think it would be useful even in that way (perhaps we are the ones that shouldn’t be writing capitalized comments but SQL Devs are like that :sweat_smile:)

Thanks!

I’ll see if we can get a similar ticket crated for SQL that we made for Java. :slight_smile:

1 Like

Hi @mocres
As you pointed out, the issue is not language-specific, but it affects all languages supported by S1135.

However, in T-SQL and PL/SQL, the issue cannot be easily solved by making the check case-sensitive because comments are often written in capital letters, as they are for SQL commands.

We are discussing internally what is the best approach to go about this, as we ideally would like to have a consistent approach across all languages supported by the rule, which is challenging.

We will come back to you in the coming days. In the meantime, you can resolve the issue on SonarQube as False Positive, or disable the rule entirely for T-SQL, if it gets too noisy, by customizing your quality profile.

Hope it helps,
Best regards,
Antonio

1 Like