4717: cppcheck needs to know the language


What version of Review Board are you running?


What version of Review Bot are you running?


What tool(s) is Review Bot running?


What steps will reproduce the problem?

  1. Create a .h file but use C++ instead of C
  2. Add a namespace
  3. Let's cppcheck the file

What is the expected output? What do you see instead?

Everything is ok

Code 'namespacedummy{' is invalid C code. Use --std or --language to configure the language.".

Category: error
Sub Category: syntaxError

Please provide any additional information below.

Looks like cppcheck tries to check the .h file as C language instead of C++ as it thinks that the valid c++ keyword "namespace" is invalid. The bot should have an option to add --std or --language.

#1 david

Fixed in Review Bot release-1.0.x (870cb33). This will ship in 1.0.1.

  • -New