Options

PE006 (TABLE HINT is used)

Would like this to be more granular.

When doing reporting I use the WITH (NOLOCK) to avoid locks on tables.

I would like to be able to disable specific warnings about specific hints.
Tagged:

Answers

  • Options
    RichardLRichardL Posts: 417 Gold 4
    Hi @BrienKing

    Thanks again for your post.

    This is not a feature that we are currently planning on implementing.

    You could make the suggestion on the uservoice page in the link below though, so that it can be considered if enough people want it.

    https://redgate.uservoice.com/forums/94413-sql-prompt
    Customer Support
    Redgate Software
  • Options
    jojojojojojo Posts: 1 New member
    Oh boy, this is annoying. All my scripts will be full of squiggly lines because of WITH(NOLOCK) hints... I thought this is best practice, not something you would flag
  • Options
    Mick_AylingMick_Ayling Posts: 1 New member
    I agree. This is super annoying. My DBA would pop an artery if I ran scripts without NOLOCK. I really devalues SQL Prompt as a productivity tool.
  • Options
    ramanahramanah Posts: 1 New member
    I wish I could go back to older version of redgate. This is annoying.
  • Options
    Hi @BrienKing @Mick_Ayling @jojojo and @ramanah

    Currently, SQL Prompt does not allow for exceptions to be defined for specific code analysis rules. However, one potential option is to modify the code analysis settings to your own preferences. This can be done by clicking SQL Prompt -> Manage Code Analysis Rules... From there, you can enable or disable rules to suit your particular needs.

    You can even save different sets of code analysis rule settings tailored to specific scenarios, such as when you're dealing with reporting and perhaps don't want code analysis to flag up your use of table hints. This can be done by clicking Save As...  You can then change which set of code analysis settings Prompt uses by using the file selector in the top right of the code analysis settings screen.

    If you would like to disable rules on specific lines of SQL code, would it be possible to vote on the following UserVoice request:
    https://redgate.uservoice.com/forums/94413-sql-prompt/suggestions/32531393-code-analysis-disable-rule-for-specific-cases

    If these solutions don't work for you, could you provide some more information so that we fully understand your needs?

    I hope this helps!

    Kind Regards,

    Tom Walsh
    Software Engineer for SQL Prompt
    Redgate Software
  • Options
    langfodlangfod Posts: 3 Bronze 1
    How would one keep Table Hints enabled but ignore the annoying NOLOCK warning?
Sign In or Register to comment.