简体   繁体   English

使用Cppcheck检查非标准文件扩展名

[英]Checking non-standard file extensions with Cppcheck

Is there a way to pass custom file extensions to Cppcheck ? 有没有办法将自定义文件扩展名传递给Cppcheck For example, *.pc . 例如, *.pc

sure. 当然。 cppcheck will check any file that you give it. cppcheck将检查您提供的任何文件。

check the file xyz.pc: 检查文件xyz.pc:

cppcheck xyz.pc

check all files with extension pc in folder srcfolder (this at least works in linux): 检查文件夹srcfolder中所有扩展名为pc的文件(至少在Linux中有效):

cppcheck srcfolder/*.pc

the --file-list flag may also be useful. --file-list标志也可能有用。 you could generate the list of files that you want to check using an arbitrary script. 您可以使用任意脚本生成要检查的文件列表。 and then run cppcheck on that file list. 然后在该文件列表上运行cppcheck。

cppcheck --file-list=files.txt

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM