John
John

Reputation: 1

jenkins build failed due to sonarscanner

 automatic configuration.
09:24:44  INFO: Load branch configuration (done) | time=1ms
09:24:44  INFO: Auto-configuring with CI 'Jenkins'
09:24:44  INFO: Load quality profiles
09:24:45  INFO: Load quality profiles (done) | time=350ms
09:24:45  INFO: Auto-configuring with CI 'Jenkins'
09:24:45  INFO: Load active rules
09:24:57  INFO: Load active rules (done) | time=11335ms
09:24:57  INFO: Branch name: feature/Update-sonarqube
09:24:57  INFO: Indexing files...
09:24:57  INFO: Project configuration:
09:24:57  INFO:   Excluded sources: /**/*java, client/tests/**/*, targets, client/security/820sconfig/**/*, client/3rdparty/**/*, /**/*.ts, client/simulator/**/*
09:24:57  INFO: ------------------------------------------------------------------------
09:24:57  INFO: EXECUTION FAILURE
09:24:57  INFO: ------------------------------------------------------------------------
09:24:57  INFO: Total time: 15.792s
09:24:57  INFO: Final Memory: 8M/80M
09:24:57  INFO: ------------------------------------------------------------------------
09:24:57  ERROR: Error during SonarScanner execution
09:24:57  ERROR: Language of file 'client/common/datalistener.h' can not be decided as the file matches patterns of both sonar.lang.patterns.cov-cpp : **/*.cpp,**/*.cc,**/*.c++,**/*.cp,**/*.cxx,**/*.c,**/*.hxx,**/*.hpp,**/*.hh,**/*.h,**/*.m,**/*.mm and sonar.lang.patterns.c : **/*.c,**/*.h
09:24:57  ERROR: 
09:24:57  ERROR: Re-run SonarScanner using the -X switch to enable full debug logging.

Try to fix the issue

Upvotes: 0

Views: 132

Answers (1)

Ian W
Ian W

Reputation: 4767

Per the message:

ERROR: Language of file 'client/common/datalistener.h' can not be decided as the file matches patterns of both 
sonar.lang.patterns.cov-cpp : **/*.cpp,**/*.cc,**/*.c++,**/*.cp,**/*.cxx,**/*.c,**/*.hxx,**/*.hpp,**/*.hh,**/*.h,**/*.m,**/*.mm and 
sonar.lang.patterns.c : **/*.c,**/*.h

That means you have to go to: ${SONARURL}/admin/settings?category=languages, under Administration | Languages, pick the appropriate Language option and adjust the duplicate language "file suffixes" according to your needs. Or remove the extra plugin.

Upvotes: 1

Related Questions