4717: cppcheck needs to know the language

Misery

What version of Review Board are you running?

3.0.7

What version of Review Bot are you running?

1.0

What tool(s) is Review Bot running?

cppcheck

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.

david
#1 david

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

  • -New
    +Fixed