Disabling StyleCop rules

后端 未结 3 623
天涯浪人
天涯浪人 2020-12-08 03:40

I\'m using StyleCop. But there a couple of rules I want to ignore, for instance using this. in front of class members.

How do I turn off a StyleCop rule

3条回答
  •  眼角桃花
    2020-12-08 04:25

    In your StyleCop install, there's a Settings.StyleCop file. You can edit this to turn off rules globally. Drag that file onto the Settings Editor executable in that file to edit it.

    You can also put copies of the settings file into your projects to override the global settings.

    If you're using Visual Studio integration and not just MSBuild integration, you should be able to get to the settings editor on a per-project basis by right clicking on your project and choosing StyleCop Settings or something like that.

提交回复
热议问题