CA1500 vs. SA1309 - Which one wins?

后端 未结 6 774
野性不改
野性不改 2021-01-01 12:36

I\'ll prefix by saying that I understand that both Code Analysis and StyleCop are meant as guidelines, and many people chose to ignore these anyway. But having said that, I

6条回答
  •  傲寒
    傲寒 (楼主)
    2021-01-01 13:01

    We turn off SA1309. The reasoning behind it is fairly weak.

    Our team feels that the well-accepted practice of private members starting with underscores far outweighs the idea that someone might use a different editor on the code, which never happens in our shop anyway. As to providing an "immediate differentiation", the underscore does that as well.

    If you really have developers that still use "m_" though and you still need to check for that, you could write a quick rule for just that.

提交回复
热议问题