Suppress Static Code Analysis from 1 object RRS feed

  • Question

  • We like the SCA feature a lot.  We have most rules turned on with the "warnings treated as errors" setting on. 

    We run into situations, however, where we do not want a specific stored procedure, view, etc. to be checked with SCA.  They are rare but occur in most projects.  One scenario is when the project needs to include an object provided by a 3rd party and we don't control the coding syntax.  Another situation is where complying with SCA might complicate maintainability of the code.  For example - we have a couple of objects operating against small tables where a "LIKE %v#%$%" predicate is judged to be better than alternative syntax that would increase maintenance complexity beyond any gain in performance.

    The SCA feature in the VS C# editor allows a "[SuppressMessage]" decorator to be added to a method and SCA skips it.  Seems like a nice solution.  Is there anything similar or planned for SSDT?

    Not a show stopper but would be nice to have.


    Tuesday, June 12, 2012 10:03 PM


All replies