SonarOpenCommunity / sonar-cxx

SonarQube C++ Community plugin (cxx plugin): This plugin adds C++ support to SonarQube with the focus on integration of existing C++ tools.
GNU Lesser General Public License v3.0
998 stars 365 forks source link

Error during SonarQube Scanner execution #1700

Closed gearcapitan closed 5 years ago

gearcapitan commented 5 years ago

imagen

Error during SonarQube Scanner execution

Description

LOG file

INFO: Scanner configuration file: C:\Users\Luis Miguel Torres\Downloads\Compressed\sonar-scanner-cli-3.3.0.1492-windows\sonar-scanner-3.3.0.1492-windows\bin..\conf\sonar-scanner.properties INFO: Project root configuration file: NONE INFO: SonarQube Scanner 3.3.0.1492 INFO: Java 1.8.0_121 Oracle Corporation (64-bit) INFO: Windows 10 10.0 amd64 INFO: User cache: C:\Users\Luis Miguel Torres.sonar\cache INFO: SonarQube server 7.7.0 INFO: Default locale: "es_MX", source code encoding: "windows-1252" (analysis is platform dependent) INFO: Load global settings INFO: Load global settings (done) | time=93ms INFO: Server id: BF41A1F2-AWnbJI-c3g-j7I7Obfef INFO: User cache: C:\Users\Luis Miguel Torres.sonar\cache INFO: Load/download plugins INFO: Load plugins index INFO: Load plugins index (done) | time=38ms INFO: Load/download plugins (done) | time=541ms INFO: Process project properties INFO: Execute project builders INFO: Execute project builders (done) | time=6ms INFO: Project key: Cifrador INFO: Base dir: C:\Users\Luis Miguel Torres\Desktop\ProgramasC\Cifrador INFO: Working dir: C:\Users\Luis Miguel Torres\Desktop\ProgramasC\Cifrador.scannerwork INFO: Load project settings for component key: 'Cifrador' INFO: Load project settings for component key: 'Cifrador' (done) | time=33ms INFO: Load project repositories INFO: Load project repositories (done) | time=55ms INFO: Load quality profiles INFO: Load quality profiles (done) | time=78ms INFO: Load active rules INFO: Load active rules (done) | time=3666ms WARN: SCM provider autodetection failed. Please use "sonar.scm.provider" to define SCM of your project, or disable the SCM Sensor in the project settings. INFO: Indexing files... INFO: Project configuration: INFO: ------------------------------------------------------------------------ INFO: EXECUTION FAILURE INFO: ------------------------------------------------------------------------ INFO: Total time: 7.568s INFO: Final Memory: 6M/92M INFO: ------------------------------------------------------------------------ ERROR: Error during SonarQube Scanner execution ERROR: Language of file '.metadata.plugins\org.eclipse.cdt.make.core\specs.c' 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.c : /*.c,*/.h ERROR: ERROR: Re-run SonarQube Scanner using the -X switch to enable full debug logging.

Related information

gearcapitan commented 5 years ago

17:17:34.104 INFO: Scanner configuration file: C:\Users\Luis Miguel Torres\Downloads\Compressed\sonar-scanner-cli-3.3.0.1492-windows\sonar-scanner-3.3.0.1492-windows\bin..\conf\sonar-scanner.properties 17:17:34.114 INFO: Project root configuration file: NONE 17:17:34.133 INFO: SonarQube Scanner 3.3.0.1492 17:17:34.133 INFO: Java 1.8.0_121 Oracle Corporation (64-bit) 17:17:34.134 INFO: Windows 10 10.0 amd64 17:17:34.232 DEBUG: keyStore is : 17:17:34.232 DEBUG: keyStore type is : jks 17:17:34.233 DEBUG: keyStore provider is : 17:17:34.233 DEBUG: init keystore 17:17:34.234 DEBUG: init keymanager of type SunX509 17:17:34.689 DEBUG: Create: C:\Users\Luis Miguel Torres.sonar\cache 17:17:34.691 INFO: User cache: C:\Users\Luis Miguel Torres.sonar\cache 17:17:34.691 DEBUG: Create: C:\Users\Luis Miguel Torres.sonar\cache_tmp 17:17:34.694 DEBUG: Extract sonar-scanner-api-batch in temp... 17:17:34.707 DEBUG: Get bootstrap index... 17:17:34.707 DEBUG: Download: http://127.0.0.1:9000/batch/index 17:17:34.744 DEBUG: Get bootstrap completed 17:17:34.750 DEBUG: Create isolated classloader... 17:17:34.756 DEBUG: Start temp cleaning... 17:17:34.763 DEBUG: Temp cleaning done 17:17:34.763 DEBUG: Execution getVersion 17:17:34.766 INFO: SonarQube server 7.7.0 17:17:34.769 INFO: Default locale: "es_MX", source code encoding: "windows-1252" (analysis is platform dependent) 17:17:34.770 DEBUG: Work directory: C:\Users\Luis Miguel Torres\Desktop\ProgramasC\Cifrador.scannerwork 17:17:34.772 DEBUG: Execution execute 17:17:35.178 INFO: Load global settings 17:17:35.213 DEBUG: GET 200 http://127.0.0.1:9000/api/settings/values.protobuf | time=29ms 17:17:35.232 INFO: Load global settings (done) | time=56ms 17:17:35.235 INFO: Server id: BF41A1F2-AWnbJI-c3g-j7I7Obfef 17:17:35.245 INFO: User cache: C:\Users\Luis Miguel Torres.sonar\cache 17:17:35.249 INFO: Load/download plugins 17:17:35.249 INFO: Load plugins index 17:17:35.257 DEBUG: GET 200 http://127.0.0.1:9000/api/plugins/installed | time=7ms 17:17:35.281 INFO: Load plugins index (done) | time=32ms 17:17:35.306 INFO: Load/download plugins (done) | time=57ms 17:17:35.361 DEBUG: Plugins: 17:17:35.362 DEBUG: C++ (Community) 1.2.2.1653 (cxx) 17:17:35.362 DEBUG: SonarPython 1.13.0.2922 (python) 17:17:35.363 DEBUG: C (Community) 1.2.2.1653 (c) 17:17:35.363 DEBUG: SonarCSS 1.0.3.724 (cssfamily) 17:17:35.364 DEBUG: JaCoCo 1.0.1.143 (jacoco) 17:17:35.364 DEBUG: SonarGo 1.1.0.1612 (go) 17:17:35.365 DEBUG: SonarKotlin 1.5.0.315 (kotlin) 17:17:35.365 DEBUG: Svn 1.9.0.1295 (scmsvn) 17:17:35.366 DEBUG: SonarJS 5.1.1.7506 (javascript) 17:17:35.366 DEBUG: SonarRuby 1.5.0.315 (ruby) 17:17:35.366 DEBUG: SonarScala 1.5.0.315 (sonarscala) 17:17:35.367 DEBUG: SonarC# 7.11.0.8083 (csharp) 17:17:35.368 DEBUG: SonarJava 5.11.0.17289 (java) 17:17:35.369 DEBUG: LDAP 2.2.0.608 (ldap) 17:17:35.369 DEBUG: SonarHTML 3.1.0.1615 (web) 17:17:35.370 DEBUG: Git 1.8.0.1574 (scmgit) 17:17:35.370 DEBUG: SonarFlex 2.4.0.1222 (flex) 17:17:35.371 DEBUG: SonarXML 2.0.1.2020 (xml) 17:17:35.373 DEBUG: SonarPHP 3.0.0.4537 (php) 17:17:35.375 DEBUG: SonarTS 1.9.0.3766 (typescript) 17:17:35.375 DEBUG: SonarVB 7.11.0.8083 (vbnet) 17:17:35.725 INFO: Process project properties 17:17:35.732 DEBUG: Process project properties (done) | time=7ms 17:17:35.733 INFO: Execute project builders 17:17:35.733 DEBUG: Execute project builder: org.sonar.plugins.csharp.CSharpGlobalProtobufFileProcessor 17:17:35.736 DEBUG: Execute project builder: org.sonar.plugins.vbnet.VbNetGlobalProtobufFileProcessor 17:17:35.738 INFO: Execute project builders (done) | time=5ms 17:17:35.742 INFO: Project key: Cifrador 17:17:35.743 INFO: Base dir: C:\Users\Luis Miguel Torres\Desktop\ProgramasC\Cifrador 17:17:35.743 INFO: Working dir: C:\Users\Luis Miguel Torres\Desktop\ProgramasC\Cifrador.scannerwork 17:17:35.744 DEBUG: Project global encoding: windows-1252, default locale: es_MX 17:17:35.747 DEBUG: Creating module hierarchy 17:17:35.747 DEBUG: Init module 'Cifrador' 17:17:35.752 DEBUG: Base dir: C:\Users\Luis Miguel Torres\Desktop\ProgramasC\Cifrador 17:17:35.752 DEBUG: Working dir: C:\Users\Luis Miguel Torres\Desktop\ProgramasC\Cifrador.scannerwork 17:17:35.753 DEBUG: Module global encoding: windows-1252, default locale: es_MX 17:17:35.761 INFO: Load project settings for component key: 'Cifrador' 17:17:35.778 DEBUG: GET 200 http://127.0.0.1:9000/api/settings/values.protobuf?component=Cifrador | time=16ms 17:17:35.779 INFO: Load project settings for component key: 'Cifrador' (done) | time=18ms 17:17:35.809 DEBUG: Available languages: 17:17:35.809 DEBUG: C++ (Community) => "c++" 17:17:35.810 DEBUG: Python => "py" 17:17:35.811 DEBUG: C (Community) => "c" 17:17:35.811 DEBUG: CSS => "css" 17:17:35.811 DEBUG: Go => "go" 17:17:35.812 DEBUG: Kotlin => "kotlin" 17:17:35.812 DEBUG: JavaScript => "js" 17:17:35.813 DEBUG: Ruby => "ruby" 17:17:35.813 DEBUG: Scala => "scala" 17:17:35.814 DEBUG: C# => "cs" 17:17:35.814 DEBUG: Java => "java" 17:17:35.814 DEBUG: HTML => "web" 17:17:35.815 DEBUG: JSP => "jsp" 17:17:35.815 DEBUG: Flex => "flex" 17:17:35.815 DEBUG: XML => "xml" 17:17:35.817 DEBUG: PHP => "php" 17:17:35.817 DEBUG: TypeScript => "ts" 17:17:35.817 DEBUG: * VB.NET => "vbnet" 17:17:35.825 INFO: Load project repositories 17:17:35.831 DEBUG: GET 200 http://127.0.0.1:9000/batch/project.protobuf?key=Cifrador | time=6ms 17:17:35.861 INFO: Load project repositories (done) | time=36ms 17:17:35.861 INFO: Load quality profiles 17:17:35.908 DEBUG: GET 200 http://127.0.0.1:9000/api/qualityprofiles/search.protobuf?projectKey=Cifrador | time=45ms 17:17:35.916 INFO: Load quality profiles (done) | time=55ms 17:17:35.929 INFO: Load active rules 17:17:36.303 DEBUG: GET 200 http://127.0.0.1:9000/api/rules/search.protobuf?f=repo,name,severity,lang,internalKey,templateKey,params,actives,createdAt,updatedAt&activation=true&qprofile=AWnbKku9rzCSkNFPK3tT&p=1&ps=500 | time=373ms 17:17:36.577 DEBUG: GET 200 http://127.0.0.1:9000/api/rules/search.protobuf?f=repo,name,severity,lang,internalKey,templateKey,params,actives,createdAt,updatedAt&activation=true&qprofile=AWnbKku9rzCSkNFPK3tT&p=2&ps=500 | time=209ms 17:17:36.696 DEBUG: GET 200 http://127.0.0.1:9000/api/rules/search.protobuf?f=repo,name,severity,lang,internalKey,templateKey,params,actives,createdAt,updatedAt&activation=true&qprofile=AWnbJMQz3g-j7I7Obg3G&p=1&ps=500 | time=107ms 17:17:37.116 DEBUG: GET 200 http://127.0.0.1:9000/api/rules/search.protobuf?f=repo,name,severity,lang,internalKey,templateKey,params,actives,createdAt,updatedAt&activation=true&qprofile=AWnbKk3vrzCSkNFPK4CZ&p=1&ps=500 | time=411ms 17:17:37.337 DEBUG: GET 200 http://127.0.0.1:9000/api/rules/search.protobuf?f=repo,name,severity,lang,internalKey,templateKey,params,actives,createdAt,updatedAt&activation=true&qprofile=AWnbKk3vrzCSkNFPK4CZ&p=2&ps=500 | time=209ms 17:17:37.457 DEBUG: GET 200 http://127.0.0.1:9000/api/rules/search.protobuf?f=repo,name,severity,lang,internalKey,templateKey,params,actives,createdAt,updatedAt&activation=true&qprofile=AWnbJMTP3g-j7I7Obg38&p=1&ps=500 | time=112ms 17:17:37.473 DEBUG: GET 200 http://127.0.0.1:9000/api/rules/search.protobuf?f=repo,name,severity,lang,internalKey,templateKey,params,actives,createdAt,updatedAt&activation=true&qprofile=AWnbJMU53g-j7I7Obg4b&p=1&ps=500 | time=14ms 17:17:37.591 DEBUG: GET 200 http://127.0.0.1:9000/api/rules/search.protobuf?f=repo,name,severity,lang,internalKey,templateKey,params,actives,createdAt,updatedAt&activation=true&qprofile=AWnbJMXA3g-j7I7Obg56&p=1&ps=500 | time=117ms 17:17:37.708 DEBUG: GET 200 http://127.0.0.1:9000/api/rules/search.protobuf?f=repo,name,severity,lang,internalKey,templateKey,params,actives,createdAt,updatedAt&activation=true&qprofile=AWnbJMVO3g-j7I7Obg48&p=1&ps=500 | time=115ms 17:17:37.912 DEBUG: GET 200 http://127.0.0.1:9000/api/rules/search.protobuf?f=repo,name,severity,lang,internalKey,templateKey,params,actives,createdAt,updatedAt&activation=true&qprofile=AWnbJMeq3g-j7I7ObhAi&p=1&ps=500 | time=201ms 17:17:38.065 DEBUG: GET 200 http://127.0.0.1:9000/api/rules/search.protobuf?f=repo,name,severity,lang,internalKey,templateKey,params,actives,createdAt,updatedAt&activation=true&qprofile=AWnbJMhy3g-j7I7ObhC1&p=1&ps=500 | time=147ms 17:17:38.178 DEBUG: GET 200 http://127.0.0.1:9000/api/rules/search.protobuf?f=repo,name,severity,lang,internalKey,templateKey,params,actives,createdAt,updatedAt&activation=true&qprofile=AWnbJMlU3g-j7I7ObhD_&p=1&ps=500 | time=111ms 17:17:38.423 DEBUG: GET 200 http://127.0.0.1:9000/api/rules/search.protobuf?f=repo,name,severity,lang,internalKey,templateKey,params,actives,createdAt,updatedAt&activation=true&qprofile=AWnbJMow3g-j7I7ObhIN&p=1&ps=500 | time=243ms 17:17:38.756 DEBUG: GET 200 http://127.0.0.1:9000/api/rules/search.protobuf?f=repo,name,severity,lang,internalKey,templateKey,params,actives,createdAt,updatedAt&activation=true&qprofile=AWnbJMvd3g-j7I7ObhR4&p=1&ps=500 | time=328ms 17:17:38.876 DEBUG: GET 200 http://127.0.0.1:9000/api/rules/search.protobuf?f=repo,name,severity,lang,internalKey,templateKey,params,actives,createdAt,updatedAt&activation=true&qprofile=AWnbJMz93g-j7I7ObhYH&p=1&ps=500 | time=113ms 17:17:39.005 DEBUG: GET 200 http://127.0.0.1:9000/api/rules/search.protobuf?f=repo,name,severity,lang,internalKey,templateKey,params,actives,createdAt,updatedAt&activation=true&qprofile=AWnbJM633g-j7I7ObhZT&p=1&ps=500 | time=127ms 17:17:39.101 DEBUG: GET 200 http://127.0.0.1:9000/api/rules/search.protobuf?f=repo,name,severity,lang,internalKey,templateKey,params,actives,createdAt,updatedAt&activation=true&qprofile=AWnbJM5V3g-j7I7ObhYf&p=1&ps=500 | time=93ms 17:17:39.272 DEBUG: GET 200 http://127.0.0.1:9000/api/rules/search.protobuf?f=repo,name,severity,lang,internalKey,templateKey,params,actives,createdAt,updatedAt&activation=true&qprofile=AWnbJM_w3g-j7I7ObhdI&p=1&ps=500 | time=171ms 17:17:39.439 DEBUG: GET 200 http://127.0.0.1:9000/api/rules/search.protobuf?f=repo,name,severity,lang,internalKey,templateKey,params,actives,createdAt,updatedAt&activation=true&qprofile=AWnbJNBr3g-j7I7Obhgc&p=1&ps=500 | time=164ms 17:17:39.581 DEBUG: GET 200 http://127.0.0.1:9000/api/rules/search.protobuf?f=repo,name,severity,lang,internalKey,templateKey,params,actives,createdAt,updatedAt&activation=true&qprofile=AWnbJNDW3g-j7I7Obhi9&p=1&ps=500 | time=139ms 17:17:39.591 INFO: Load active rules (done) | time=3662ms 17:17:39.610 WARN: SCM provider autodetection failed. Please use "sonar.scm.provider" to define SCM of your project, or disable the SCM Sensor in the project settings. 17:17:39.646 DEBUG: Declared extensions of language C++ (Community) were converted to sonar.lang.patterns.c++ : /*.cxx,*/.cpp,/*.cc,/*.c,*/.hxx,/*.hpp,/*.hh,*/.h 17:17:39.647 DEBUG: Declared extensions of language Python were converted to sonar.lang.patterns.py : /*.py 17:17:39.647 DEBUG: Declared extensions of language C (Community) were converted to sonar.lang.patterns.c : /*.c,*/.h 17:17:39.648 DEBUG: Declared extensions of language CSS were converted to sonar.lang.patterns.css : /*.css,/*.less,*/.scss 17:17:39.648 DEBUG: Declared extensions of language Go were converted to sonar.lang.patterns.go : /*.go 17:17:39.649 DEBUG: Declared extensions of language Kotlin were converted to sonar.lang.patterns.kotlin : /*.kt 17:17:39.649 DEBUG: Declared extensions of language JavaScript were converted to sonar.lang.patterns.js : */.js,/*.jsx,/*.vue 17:17:39.649 DEBUG: Declared extensions of language Ruby were converted to sonar.lang.patterns.ruby : */.rb 17:17:39.650 DEBUG: Declared extensions of language Scala were converted to sonar.lang.patterns.scala : /*.scala 17:17:39.650 DEBUG: Declared extensions of language C# were converted to sonar.lang.patterns.cs : /*.cs 17:17:39.651 DEBUG: Declared extensions of language Java were converted to sonar.lang.patterns.java : */.java,/*.jav 17:17:39.651 DEBUG: Declared extensions of language HTML were converted to sonar.lang.patterns.web : /*.html,*/.xhtml,/*.cshtml,/*.vbhtml,*/.aspx,/*.ascx,/*.rhtml,*/.erb,/*.shtm,/*.shtml 17:17:39.654 DEBUG: Declared extensions of language JSP were converted to sonar.lang.patterns.jsp : */.jsp,/*.jspf,/*.jspx 17:17:39.654 DEBUG: Declared extensions of language Flex were converted to sonar.lang.patterns.flex : */.as 17:17:39.655 DEBUG: Declared extensions of language XML were converted to sonar.lang.patterns.xml : /*.xml,/*.xsd,*/.xsl 17:17:39.655 DEBUG: Declared extensions of language PHP were converted to sonar.lang.patterns.php : /*.php,/*.php3,*/.php4,/*.php5,/*.phtml,*/.inc 17:17:39.656 DEBUG: Declared extensions of language TypeScript were converted to sonar.lang.patterns.ts : /*.ts,/*.tsx 17:17:39.658 DEBUG: Declared extensions of language VB.NET were converted to sonar.lang.patterns.vbnet : */.vb 17:17:39.662 INFO: Indexing files... 17:17:39.662 INFO: Project configuration: 17:17:39.673 DEBUG: '.project' indexed with language 'null' 17:17:39.680 INFO: ------------------------------------------------------------------------ 17:17:39.680 INFO: EXECUTION FAILURE 17:17:39.681 INFO: ------------------------------------------------------------------------ 17:17:39.686 INFO: Total time: 5.601s 17:17:39.731 INFO: Final Memory: 7M/112M 17:17:39.731 INFO: ------------------------------------------------------------------------ 17:17:39.732 ERROR: Error during SonarQube Scanner execution 17:17:39.732 ERROR: Language of file 'bignum.c' 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.c : */.c,/*.h

gearcapitan commented 5 years ago

my program was made in c language

guwirth commented 5 years ago

Hi @gearcapitan,

ERROR: Language of file '.metadata.plugins\org.eclipse.cdt.make.core\specs.c' 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.c : **/.c,**/*.h

First of all current version is not released for SQ 7.7. SonarSource did some changes and file extension must be unique assigned to one plugin now. the extension .h is assigned to c and cxx plugin. To workaround the issue:

In case you found an solution would be nice if you could share it here.

Regards,

AMAN-RAJAK commented 1 year ago

Hello everyone,

Currently i had created custom rules for jsp by using HTML plugin but my sonarqube also uses findbugs plugin as we know that findbugs plugin create some rules for jsp. when i run the scanner then this error occuring -------------->

ERROR: Language of file 'src\check.jsp can not be decided as the file matches patterns of both sonar.lang.patterns.jsp : /.jsp and sonar.lang.patterns.web: /.html, */.xhtml, /.jspf, /.jspx, /.cshtml,/.vbhtml, /.aspx, / .ascx,/.rhtml,/.erb, /.shtm, /.shtml, /.jsp

So, i just wanted to know that is there any way to scan same extension file with two different languages? Or at a time i can use only one of the above plugin?