【发布时间】:2023-09-22 20:20:01
【问题描述】:
我在所有属性名和 sql 列名中都使用了 ID(大写)。现在我已经开始纠正所有代码分析警告,以在团队中强制执行新的编码准则。
有没有办法将 ID 添加到不会生成警告的字典中(例如 CA1709)?
示例 -
Warning 4 CA1709 : Microsoft.Naming : Correct the casing of 'ID' in member name 'City.CityID' by changing it to 'Id'.
'Id' is an abbreviation and therefore is not subject to acronym casing guideline.
【问题讨论】:
-
甚至可能是"custom dictionary"?
标签: c# .net code-analysis fxcop