gpt4 book ai didi

ndepend - 使用 NDepend 查找魔数(Magic Number)

转载 作者:行者123 更新时间:2023-12-04 21:12:36 26 4
gpt4 key购买 nike

有谁知道我如何使用 NDepend 中的 CQL 查询在源代码中找到魔数(Magic Number)?这与 this question 是同一个问题, 但我不想尽可能使用正则表达式。

所以我想找到所有像

这样的语句
Int32 someValue = 23;
Double anotherValue = 1;

但不是

for (int i = 0; i < array.length; i++)

最佳答案

我确认,目前 NDepend 和 CQLinq 对此无能为力。我建议你使用 Mono.Cecil 做一个小应用程序, 并搜索魔数(Magic Number)和字符串。您会看到,Mono.Cecil API 棒极了!

关于ndepend - 使用 NDepend 查找魔数(Magic Number),我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/2469387/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com