我工作的一个客户已经开始使用 NDepend 作为 FXCop 的替代品,并且“架构师”编制了一份实际上无法使用的 CQL 查询列表,我猜他是从 NDepend 网站的建议中获取的。
“我认为”是无用查询的一个例子
WARN IF Count > 0 IN
SELECT METHODS WHERE PercentageComment < 20
AND NbLinesOfCode > 10
,即:每 10 行代码必须至少有 2 行注释
所以我试图收集的是一组我们可以使用的有用查询作为开发人员使用。
每个回复请仅提供单个查询(带有描述),以便可以进行相应的投票。
每个回复请仅提供一个查询(带有描述),以便可以进行相应的投票。
A client I work for has begun using NDepend as a replacement for FXCop, and the "architect" has compiled a list of practically unusable CQL queries, which I gather he has taken from advice from the NDepend website.
An example of what "I think" is an unhelpful query
WARN IF Count > 0 IN
SELECT METHODS WHERE PercentageComment < 20
AND NbLinesOfCode > 10
ie: must have at least 2 lines of comment for each 10 lines of code
So what I trying to gather is a useful set of queries that we can use as developers.
Please only provide a single query per response (with description) so that it can be voted accordingly.
Please only provide a single query per response (with description) so that it can be voted accordingly.
发布评论
评论(1)
Xian,现在 CQLinq(基于 LINQ 查询的代码规则)已发布,提供了数十个新的默认规则,并且大多数现有规则都得到了增强。
以下是我最喜欢的十个:
Xian, now that CQLinq (Code Rule over LINQ Query) is released, dozens of new default rules are available and most existing ones have been enhanced.
Here are ten of my preferred ones: