How to use cppcheck's inline suppression filter option for C++ code?

前端 未结 4 1932
爱一瞬间的悲伤
爱一瞬间的悲伤 2020-12-30 22:35

I would like to use Cppcheck for static code analysis of my C++ code. I learned that I can suppress some kind of warnings with --inline-suppr command. However,

4条回答
  •  小鲜肉
    小鲜肉 (楼主)
    2020-12-30 23:22

    According to the cppcheck man page, you can use the --template option to change the default output to include the id, e.g.

    cppcheck /the/src/file --template='{file}:{line},{severity},{id},{message}'
    

提交回复
热议问题