none
How do I eliminate the "Naming rule violation" feature? RRS feed

  • Question

  • I typically add chars in front of function names.  For example, "boTestValue()" indicates the return value will be boolean.  An "stFindName()" indicates the return value will be a string.

    With Visual Studio 2019, I get an error, "Naming rule violation: These words must begin with upper case chars."  How do I disable this new feature?


    bhs67

    Saturday, October 26, 2019 6:02 PM

Answers

  • Is there a simple "disable"?

    bhs67

    The simple method is to use the example shown from Wizend link


    Please remember to mark the replies as answers if they help and unmarked them if they provide no help, this will help others who are looking for solutions to the same or similar problem. Contact via my Twitter (Karen Payne) or Facebook (Karen Payne) via my MSDN profile but will not answer coding question on either.

    NuGet BaseConnectionLibrary for database connections.

    StackOverFlow
    profile for Karen Payne on Stack Exchange

    • Marked as answer by bhs67 Tuesday, October 29, 2019 11:42 AM
    Sunday, October 27, 2019 4:27 PM
    Moderator

All replies

  • Take a look at this post How to get rid of Naming rule violation messages in Visual Studio? in Stackoverflow and its answer. It might help you as well.

    wizend

    • Proposed as answer by EckiS Sunday, October 27, 2019 6:26 PM
    Saturday, October 26, 2019 7:24 PM
  • Here is a good post on naming conventions and more

    https://developercommunity.visualstudio.com/content/problem/386415/ide1006-naming-rule-violation-these-words-must-beg.html


    Please remember to mark the replies as answers if they help and unmarked them if they provide no help, this will help others who are looking for solutions to the same or similar problem. Contact via my Twitter (Karen Payne) or Facebook (Karen Payne) via my MSDN profile but will not answer coding question on either.

    NuGet BaseConnectionLibrary for database connections.

    StackOverFlow
    profile for Karen Payne on Stack Exchange

    Saturday, October 26, 2019 9:42 PM
    Moderator
  • Is there a simple "disable"?

    bhs67

    Sunday, October 27, 2019 2:37 PM
  • Is there a simple "disable"?

    bhs67

    The simple method is to use the example shown from Wizend link


    Please remember to mark the replies as answers if they help and unmarked them if they provide no help, this will help others who are looking for solutions to the same or similar problem. Contact via my Twitter (Karen Payne) or Facebook (Karen Payne) via my MSDN profile but will not answer coding question on either.

    NuGet BaseConnectionLibrary for database connections.

    StackOverFlow
    profile for Karen Payne on Stack Exchange

    • Marked as answer by bhs67 Tuesday, October 29, 2019 11:42 AM
    Sunday, October 27, 2019 4:27 PM
    Moderator
  • I suggest to follow that Learn more link on that Options/Text Editor/C#/Code Style/Naming tab. You'll be guided to an overview showing you how to enable or disable individual .Net coding conventions or how to adjust them to your needs.
    Monday, October 28, 2019 8:52 AM
  • Karen,  I don't see Suppress, etc.

    Wizend,  It is difficult to read and understand that website. If it's in there, it is buried someplace!

    I'm baffled that there is no simple way to disable the "advice".  Let us write code as we have done for many years.


    bhs67

    Monday, October 28, 2019 6:23 PM
  • Karen,  I don't see Suppress, etc.

    Wizend,  It is difficult to read and understand that website. If it's in there, it is buried someplace!

    I'm baffled that there is no simple way to disable the "advice".  Let us write code as we have done for many years.


    bhs67

    And the reason you just can't ignore it is what? Or better yet, why can't you just simply make the first character upper case and be done with it?
    Monday, October 28, 2019 8:14 PM
  • Hi bhs67, 

    Thank you for posting here.

    As Kareninstructor suggested, you can use the following steps to suppress warnings.

    First of all, click the ‘boTestValue’, and you can see a bulb on the left.

    Then click the bulb, and you can find ‘in Suppression File’ option ( Configure and Suppress issues -> Suppress IDE1006 -> in Suppression File )

    Finally, click the option, and the warning will be suppressed.

    Best Regards,

    Xingyu Zhao


    MSDN Community Support
    Please remember to click "Mark as Answer" the responses that resolved your issue, and to click "Unmark as Answer" if not. This can be beneficial to other community members reading this thread. If you have any compliments or complaints to MSDN Support, feel free to contact MSDNFSF@microsoft.com.

    Tuesday, October 29, 2019 9:31 AM
    Moderator
  • DA924x, I do that to make the code more readable (as described in my first post).  In addition, it would take a significant amount of time to change 20 years of C# code.

    Xingyu (and Karen), I was not clicking on the code number.  It works now!


    bhs67

    Tuesday, October 29, 2019 11:42 AM