danmar/cppcheck — comment on commit aa74761e8df79053c786795828b6977fd1ed1204
File:  line 0
By danmar:

It might be possible to determine that the language is C++ by analysing the syntax. But I guess as Robert said it can't be determined that it's C.

Specifying the language with a command line parameter sounds ok.

> The problem is the user will never know when cppcheck guesses wrong so there must be some way to get cppcheck to tell you what language it thinks the code is so you know to override the bad guess.

I guess it would be ok with a single warning when ".C" files are found but no language is given. The warning can mention that checks that are language specific are / might be disabled until the language is specified.