Language of file can not be decided as the file matches patterns

Dear Support,

Last Friday we have update our SonarQube server. It is running now Version 8.0 (build 29455), with CFamily scanner 6.4 (build 11646).
Since the update a couple of our C++ projects fails with the following error:

16:25:36.277 ERROR: Error during SonarQube Scanner execution
16:25:36.277 ERROR: Language of file ‘ext\audio\Audio_EventIds.h’ can not be decided as the file matches patterns of both sonar.lang.patterns.c : /*.c,/.h and sonar.lang.patterns.cpp : **/.cc,/*.cpp,/.cxx,**/.c++,/*.hh,/.hpp,**/.hxx,/*.h++,/.ipp,**/.h

I’ve checked the language file suffixes. .h is only listed for C:

Please advise!

Regards,
Tamas

No added sonar.c.file.suffixes= or sonar.cpp.file.suffixes entries in the sonar-project.properties files.
build-wrapper and sonar-scanner are the latest one.

Hi @tcsabina,

did you check project settings in SonarQube UI? It must be somewhere.

If I explicitely list the following options in the sonar-project.properties, it works again:
sonar.c.file.suffixes=-
sonar.cpp.file.suffixes=.cc,.cpp,.cxx,.c++,.hh,.hpp,.hxx,.h++,.ipp,.c,.h

But why is this necessary now, since the upgrade?
Is this from the C family scanner? Is this from the SonarQube server itself?

It’s somewhere in your configuration.

Hmm, where should I look? I am (was) not aware that the file suffixes can be set on project level on the UI (no in the sonar-project.properties file).

I discovered it!
There is a project level administration menu, which contains Languages.
And indeed .h was there for both C and CPP family…

Thanks for the hint!

Still strange why was this working before the upgrade? But at least we are back on track now.

Hi @tcsabina,

great you spotted it!