How can we help you today? How can we help you today?

Code Analysis Rules

Hi Redgate Team,

I appreciate the option enabling different code rules but I guess there is a general issue here.

Suppose I enabled the rule "unqualified column name" I will get a hint that a specific column is unqualified which is fine but I am not getting a hint to which object the column belongs to anymore cause the bubble is suppressed.

It would be nice to get the warning that there is a violation of the rule but still getting the hint where the column comes from.

Thanks!

Torsten
torsten.strauss
0

Comments

6 comments

  • hansjp
    Fully agree with Torsten.

    And I will add: The rule "unqualified column name" makes no sense when I use alias in ORDER BY clauses. But since SSMS understands and accepts the use of aliases (instead of very long computed statements), the rule should too.

    Thanks,
    Hans
    hansjp
    0
  • torsten.strauss
    Additionally I think the rule "unqualified column name" itself becomes some kind of obsolete if you enable Qualification in SQL Prompt anyway.
    torsten.strauss
    0
  • hansjp
    True. Making me check whether I had that, and ought to disable the rule.

    However, I often review legacy scripts, and in these cases it is really beneficial to have such lapses flagged! Often we only realize this sloppiness in WHERE clauses and JOINs when we augment SELECTs or alter the referenced tables so unique field names cease to be unique. I like to just maintain scripts when I work on them, instead of waiting for them to fail.
    hansjp
    0
  • krzysztofkroczak
    Hi @hansjp and @torsten.strauss ,

    We are aware of the contextual information in issues. We are hoping to add this in the future.

    Best regards,
    Krzysztof
    krzysztofkroczak
    0
  • torsten.strauss
    Hi Krzysztof,

    thanks for looking into this...
    torsten.strauss
    0
  • hansjp
    Sounds good. :)
    hansjp
    0

Add comment

Please sign in to leave a comment.