Skip to content

Settings and activity

1 result found

  1. 4 votes

    We're glad you're here

    Please sign in to leave feedback

    Signed in as (Sign out)

    We’ll send you updates on this idea

    How important is this to you?

    We're glad you're here

    Please sign in to leave feedback

    Signed in as (Sign out)
    An error occurred while saving the comment
    Richard Wells commented  · 

    I've just started using Code Analysis systematically and also find, similar to what I'm used to in working with compiler warnings, that I'd like a pragma to disable a flagging of a specific Issue within a limited scope.

    For example, issue PE019 (Consider using EXISTS instead of IN) doesn't apply in a situations where I know the maximum size of the subquery result is tiny. (Probably why the message says "Consider ...".) I'd like to mute this Issue, perhaps like this, building on the similar control for formatting:

    ...
    AND t.someothercondition = 1
    -- sql prompt code analysis off PE019
    AND t.item IN ( SELECT SplitVal FROM fnSplit(',', @items) )
    -- sql prompt code analysis on PE019
    AND ...

    Richard Wells supported this idea  ·