Search code examples
c++lintercpplint

Disable specific warnings from cpplint


When running cpplint, I run into some warnings that I'd like to completely disable. Specifically the copyright message & whitespaces:

range.h:0: No copyright message found. You should have a line:

"Copyright [year] " [legal/copyright] [5]

range.h:10: At least two spaces is best between code and comments

[whitespace/comments] [2]

How do I accomplish this? Ideally would be modifying the CPPLINT.cfg file, but I would take an inline comment or a command line flag. I can't find any documentation on disabling rules.


Solution

  • You can configure filters in CPPLINT.cfg:

    filter=-whitespace,-legal/copyright