简体   繁体   中英

Checking non-standard file extensions with Cppcheck

Is there a way to pass custom file extensions to Cppcheck ? For example, *.pc .

sure. cppcheck will check any file that you give it.

check the file xyz.pc:

cppcheck xyz.pc

check all files with extension pc in folder srcfolder (this at least works in linux):

cppcheck srcfolder/*.pc

the --file-list flag may also be useful. 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 --file-list=files.txt

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

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