Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
Cppcheck是分析我们的 CPP 代码的工具。我想为 Cppcheck 创建自定义规则以检查所有函数是否都有注释。为此,我需要一个 PCRE(珍珠正则表达式)模式。或任何其他预定义的规则来解决这种情况。
有一些预定义的规则可用@installerlocation\cfg,它的目的是什么?我们是否可以使用它而不是工具来编写规则?
我是一名 cppcheck 作者。是的,您可以使用 PCRE 表达式编写规则。但据我所知,您看不到规则中是否有评论。据我所知,在执行任何规则之前,所有注释和缩进都会被删除。