SonarQube Language sonar.lang.patterns error

Our Sonar Build Environment details as follows:

* SonarQube Server Version - 5.6.6 (64-Bit). 
* Sonar Client Build Operating System – Windows-7 (64-Bit). 
* Sonar-scanner- Version - 3.0.3.778.
* sonar-cxx-plugin-0.9.7.jar
* sonar-csharp-plugin Version -5.11.0.1761.
* sonar-objective-c-plugin-0.5.0-SNAPSHOT.jar
* Source Code Language: C# and C++

Our SonarQube server is centralized server, So have installed (cxx-plugin, objective-c-plugin and csharp-plugin)

Current Problem:

When we scan the code, if fails with below error. Since we have multiple language (C# and C++) code, Both the language has to be scanned at a time.

ERROR: Caused by: Language of file 'workspace/HS30/baseclasses/ametex.h' can not be decided as 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

sonar.language=cs,c++ (Tried but didn't work)

So kindly help us to resolve the same.



Read more here: https://stackoverflow.com/questions/44412117/sonarqube-language-sonar-lang-patterns-error

Content Attribution

This content was originally published by Kishore at Recent Questions - Stack Overflow, and is syndicated here via their RSS feed. You can read the original post over there.

%d bloggers like this: