SonarQube Language sonar.lang.patterns error

This is a question of which language "claims" .h files. Only one language can claim any given file extension and currently you have two languages claiming .h, so the scanner can't figure out which analyzer to give those files to, and gives up.

Specifically, from your error message:

the file matches patterns of both sonar.lang.patterns.c++ : **/*.cxx,**/*.cpp,**/*.cc,**/*.c,**/*.hxx,**/*.hpp,**/*.hh,**/*.h and sonar.lang.patterns.objectivec : **/*.h,**/*.m

You have both cxx and objectivec claiming .h. You must remove the extension from one of those two lists.

Go to (Global) Administration > [Language] > [Language] file suffixes to edit the extensions claimed by each language, and remove .h from one or both languages.

Make sure that you do not leave either of these fields blank. If left blank, the default value (which includes .h) will be used.

Tags:

Sonarqube