首页 > 解决方案 > NDepend 查找没有文档的私有方法

问题描述

我是 ndepend 的新手,我想要一个 cqlinq 规则来查找所有未记录的方法。那是我当前的查询,但没有记录的属性。

from m in Application.Methods 
.Where(m => !m.IsGeneratedByCompiler && m.Visibility == Visibility.Private && m.??Documentation?? == false)

select new { m, m.Visibility }

有任何想法吗?新年快乐... :-)

标签: c#xml-documentationndependcqlinq

解决方案


这个代码查询呢?

from m in JustMyCode.Methods
where m.IsPrivate
&& m.NbLinesOfCode > 5 // Adjust to your needs
&& m.NbLinesOfComment == 0
select new { m, m.NbLinesOfCode }

将未注释的私有方法与 ndepend 匹配


推荐阅读