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
988 stars 364 forks source link

Cxx community plugin sonar scan analysis code smell but not bug #2519

Closed josceley closed 1 year ago

josceley commented 1 year ago

Hello everyone. Recently I installed the plugin version 2.1 on my sonar installation version 9.0.1 without any problems. I created a new quality gate set, enabled all the rules, and came across the following scenario: Code smell rules are parsed but Bug rules are not. That is, no bugs are reported in the projects. tested in several projects with the same symptom and in two installations of Sonar.

image

Below the LOG

Scanner configuration file: X:_Produtos\Placa\Padronizacao\MisturaPadroes\sonar\sonar-scanner-4.7.0.2747-windows\bin..\conf\sonar-scanner.properties Project root configuration file: X:_Produtos\Placa\Padronizacao\MisturaPadroes\sonar-project.properties SonarScanner 4.7.0.2747 Java 11.0.14.1 Eclipse Adoptium (64-bit) Windows 10 10.0 amd64 SONAR_SCANNER_OPTS=-Xmx512m keyStore is : keyStore type is : pkcs12 keyStore provider is : init keystore init keymanager of type SunX509 Create: D:\Users\50044457.sonar\cache User cache: D:\Users\50044457.sonar\cache Create: D:\Users\50044457.sonar\cache_tmp Extract sonar-scanner-api-batch in temp... Get bootstrap index... Download: http://localhost:9000/batch/index Get bootstrap completed Create isolated classloader... Start temp cleaning... Temp cleaning done Scanner configuration file: X:_Produtos\Placa\Padronizacao\MisturaPadroes\sonar\sonar-scanner-4.7.0.2747-windows\bin..\conf\sonar-scanner.properties Project root configuration file: X:_Produtos\Placa\Padronizacao\MisturaPadroes\sonar-project.properties Execution getVersion Analyzing on SonarQube server 9.0.1 Default locale: "pt_BR", source code encoding: "windows-1252" (analysis is platform dependent) Work directory: X:_Produtos\Placa\Padronizacao\MisturaPadroes.scannerwork Execution execute Community 9.0.1.46107 Load global settings GET 200 http://localhost:9000/api/settings/values.protobuf | time=49ms Load global settings (done) | time=87ms Server id: BF41A1F2-AYfkEr356kSN2juOezQ2 User cache: D:\Users\50044457.sonar\cache Load/download plugins Load plugins index GET 200 http://localhost:9000/api/plugins/installed | time=13ms Load plugins index (done) | time=45ms Load/download plugins (done) | time=229ms Plugins:

  • C++ (Community) 2.1.0.428 (cxx)
  • Python Code Quality and Security 3.5.0.8244 (python)
  • CSS Code Quality and Security 1.4.2.2002 (cssfamily)
  • Go Code Quality and Security 1.8.3.2219 (go)
  • JaCoCo 1.1.1.1157 (jacoco)
  • Kotlin Code Quality and Security 2.0.1.110 (kotlin)
  • JavaScript/TypeScript Code Quality and Security 8.1.0.15788 (javascript)
  • Ruby Code Quality and Security 1.8.3.2219 (ruby)
  • Scala Code Quality and Security 1.8.3.2219 (sonarscala)
  • C# Code Quality and Security 8.25.0.33663 (csharp)
  • Java Code Quality and Security 7.1.0.26670 (java)
  • HTML Code Quality and Security 3.4.0.2754 (web)
  • Flex Code Quality and Security 2.6.2.2641 (flex)
  • XML Code Quality and Security 2.2.0.2973 (xml)
  • PHP Code Quality and Security 3.17.0.7439 (php)
  • VB.NET Code Quality and Security 8.25.0.33663 (vbnet)
  • Community Branch Plugin 1.9.0 (communityBranchPlugin) Process project properties Process project properties (done) | time=14ms Execute project builders Execute project builder: org.sonar.plugins.csharp.CSharpGlobalProtobufFileProcessor Execute project builder: org.sonar.plugins.vbnet.VbNetGlobalProtobufFileProcessor Execute project builders (done) | time=2ms Project key: MisturaPadroes Base dir: X:_Produtos\Placa\Padronizacao\MisturaPadroes Working dir: X:_Produtos\Placa\Padronizacao\MisturaPadroes.scannerwork Project global encoding: windows-1252, default locale: pt_BR Creating module hierarchy Init module 'MisturaPadroes' Base dir: X:_Produtos\Placa\Padronizacao\MisturaPadroes Working dir: X:_Produtos\Placa\Padronizacao\MisturaPadroes.scannerwork Module global encoding: windows-1252, default locale: pt_BR Load project settings for component key: 'MisturaPadroes' GET 200 http://localhost:9000/api/settings/values.protobuf?component=MisturaPadroes | time=22ms Load project settings for component key: 'MisturaPadroes' (done) | time=23ms Load project branches GET 200 http://localhost:9000/api/project_branches/list?project=MisturaPadroes | time=11ms Load project branches (done) | time=31ms Load project pull requests GET 200 http://localhost:9000/api/project_pull_requests/list?project=MisturaPadroes | time=8ms Load project pull requests (done) | time=15ms Load branch configuration Load branch configuration (done) | time=1ms Available languages:
  • CXX => "cxx"
  • Python => "py"
  • CSS => "css"
  • Go => "go"
  • Kotlin => "kotlin"
  • JavaScript => "js"
  • TypeScript => "ts"
  • Ruby => "ruby"
  • Scala => "scala"
  • C# => "cs"
  • Java => "java"
  • HTML => "web"
  • JSP => "jsp"
  • Flex => "flex"
  • XML => "xml"
  • PHP => "php"
  • VB.NET => "vbnet" Load quality profiles GET 200 http://localhost:9000/api/qualityprofiles/search.protobuf?project=MisturaPadroes | time=92ms Load quality profiles (done) | time=121ms Load active rules GET 200 http://localhost:9000/api/rules/search.protobuf?f=repo,name,severity,lang,internalKey,templateKey,params,actives,createdAt,updatedAt,deprecatedKeys&activation=true&qprofile=AYfkE2zg6kSN2juOe21k&ps=500&p=1 | time=64ms GET 200 http://localhost:9000/api/rules/search.protobuf?f=repo,name,severity,lang,internalKey,templateKey,params,actives,createdAt,updatedAt,deprecatedKeys&activation=true&qprofile=AYfkxD--rVPa56E6mPId&ps=500&p=1 | time=640ms GET 200 http://localhost:9000/api/rules/search.protobuf?f=repo,name,severity,lang,internalKey,templateKey,params,actives,createdAt,updatedAt,deprecatedKeys&activation=true&qprofile=AYfkxD--rVPa56E6mPId&ps=500&p=2 | time=632ms GET 200 http://localhost:9000/api/rules/search.protobuf?f=repo,name,severity,lang,internalKey,templateKey,params,actives,createdAt,updatedAt,deprecatedKeys&activation=true&qprofile=AYfkxD--rVPa56E6mPId&ps=500&p=3 | time=768ms GET 200 http://localhost:9000/api/rules/search.protobuf?f=repo,name,severity,lang,internalKey,templateKey,params,actives,createdAt,updatedAt,deprecatedKeys&activation=true&qprofile=AYfkxD--rVPa56E6mPId&ps=500&p=4 | time=849ms GET 200 http://localhost:9000/api/rules/search.protobuf?f=repo,name,severity,lang,internalKey,templateKey,params,actives,createdAt,updatedAt,deprecatedKeys&activation=true&qprofile=AYfkxD--rVPa56E6mPId&ps=500&p=5 | time=936ms GET 200 http://localhost:9000/api/rules/search.protobuf?f=repo,name,severity,lang,internalKey,templateKey,params,actives,createdAt,updatedAt,deprecatedKeys&activation=true&qprofile=AYfkxD--rVPa56E6mPId&ps=500&p=6 | time=749ms GET 200 http://localhost:9000/api/rules/search.protobuf?f=repo,name,severity,lang,internalKey,templateKey,params,actives,createdAt,updatedAt,deprecatedKeys&activation=true&qprofile=AYfkxD--rVPa56E6mPId&ps=500&p=7 | time=568ms GET 200 http://localhost:9000/api/rules/search.protobuf?f=repo,name,severity,lang,internalKey,templateKey,params,actives,createdAt,updatedAt,deprecatedKeys&activation=true&qprofile=AYfkxD--rVPa56E6mPId&ps=500&p=8 | time=594ms GET 200 http://localhost:9000/api/rules/search.protobuf?f=repo,name,severity,lang,internalKey,templateKey,params,actives,createdAt,updatedAt,deprecatedKeys&activation=true&qprofile=AYfkxD--rVPa56E6mPId&ps=500&p=9 | time=538ms GET 200 http://localhost:9000/api/rules/search.protobuf?f=repo,name,severity,lang,internalKey,templateKey,params,actives,createdAt,updatedAt,deprecatedKeys&activation=true&qprofile=AYfkxD--rVPa56E6mPId&ps=500&p=10 | time=575ms GET 200 http://localhost:9000/api/rules/search.protobuf?f=repo,name,severity,lang,internalKey,templateKey,params,actives,createdAt,updatedAt,deprecatedKeys&activation=true&qprofile=AYfkE24D6kSN2juOe23B&ps=500&p=1 | time=48ms GET 200 http://localhost:9000/api/rules/search.protobuf?f=repo,name,severity,lang,internalKey,templateKey,params,actives,createdAt,updatedAt,deprecatedKeys&activation=true&qprofile=AYfkE26v6kSN2juOe23h&ps=500&p=1 | time=13ms GET 200 http://localhost:9000/api/rules/search.protobuf?f=repo,name,severity,lang,internalKey,templateKey,params,actives,createdAt,updatedAt,deprecatedKeys&activation=true&qprofile=AYfkE2_h6kSN2juOe26h&ps=500&p=1 | time=41ms GET 200 http://localhost:9000/api/rules/search.protobuf?f=repo,name,severity,lang,internalKey,templateKey,params,actives,createdAt,updatedAt,deprecatedKeys&activation=true&qprofile=AYfkE27Z6kSN2juOe249&ps=500&p=1 | time=55ms GET 200 http://localhost:9000/api/rules/search.protobuf?f=repo,name,severity,lang,internalKey,templateKey,params,actives,createdAt,updatedAt,deprecatedKeys&activation=true&qprofile=AYfkE3DU6kSN2juOe3AL&ps=500&p=1 | time=136ms GET 200 http://localhost:9000/api/rules/search.protobuf?f=repo,name,severity,lang,internalKey,templateKey,params,actives,createdAt,updatedAt,deprecatedKeys&activation=true&qprofile=AYfkE3HR6kSN2juOe3HK&ps=500&p=1 | time=131ms GET 200 http://localhost:9000/api/rules/search.protobuf?f=repo,name,severity,lang,internalKey,templateKey,params,actives,createdAt,updatedAt,deprecatedKeys&activation=true&qprofile=AYfkE3K56kSN2juOe3KW&ps=500&p=1 | time=45ms GET 200 http://localhost:9000/api/rules/search.protobuf?f=repo,name,severity,lang,internalKey,templateKey,params,actives,createdAt,updatedAt,deprecatedKeys&activation=true&qprofile=AYfkE3Of6kSN2juOe3S7&ps=500&p=1 | time=181ms GET 200 http://localhost:9000/api/rules/search.protobuf?f=repo,name,severity,lang,internalKey,templateKey,params,actives,createdAt,updatedAt,deprecatedKeys&activation=true&qprofile=AYfkE3Ve6kSN2juOe3lZ&ps=500&p=1 | time=298ms GET 200 http://localhost:9000/api/rules/search.protobuf?f=repo,name,severity,lang,internalKey,templateKey,params,actives,createdAt,updatedAt,deprecatedKeys&activation=true&qprofile=AYfkE3aY6kSN2juOe3tZ&ps=500&p=1 | time=45ms GET 200 http://localhost:9000/api/rules/search.protobuf?f=repo,name,severity,lang,internalKey,templateKey,params,actives,createdAt,updatedAt,deprecatedKeys&activation=true&qprofile=AYfkE3fl6kSN2juOe3wB&ps=500&p=1 | time=58ms GET 200 http://localhost:9000/api/rules/search.protobuf?f=repo,name,severity,lang,internalKey,templateKey,params,actives,createdAt,updatedAt,deprecatedKeys&activation=true&qprofile=AYfkE3cj6kSN2juOe3uP&ps=500&p=1 | time=32ms GET 200 http://localhost:9000/api/rules/search.protobuf?f=repo,name,severity,lang,internalKey,templateKey,params,actives,createdAt,updatedAt,deprecatedKeys&activation=true&qprofile=AYfkE3i56kSN2juOe31H&ps=500&p=1 | time=112ms GET 200 http://localhost:9000/api/rules/search.protobuf?f=repo,name,severity,lang,internalKey,templateKey,params,actives,createdAt,updatedAt,deprecatedKeys&activation=true&qprofile=AYfkE3qT6kSN2juOe39n&ps=500&p=1 | time=94ms GET 200 http://localhost:9000/api/rules/search.protobuf?f=repo,name,severity,lang,internalKey,templateKey,params,actives,createdAt,updatedAt,deprecatedKeys&activation=true&qprofile=AYfkE3td6kSN2juOe4EU&ps=500&p=1 | time=127ms Load active rules (done) | time=8767ms SCM Step is disabled by configuration Branch name: master Declared extensions of language CXX were converted to sonar.lang.patterns.cxx : /*.cxx,*/.cpp,/*.cc,/*.c,*/.hxx,/*.hpp,/*.hh,*/.h Declared extensions of language Python were converted to sonar.lang.patterns.py : /*.py Declared extensions of language CSS were converted to sonar.lang.patterns.css : /*.css,*/.less,/*.scss Declared extensions of language Go were converted to sonar.lang.patterns.go : /*.go Declared extensions of language Kotlin were converted to sonar.lang.patterns.kotlin : */.kt Declared extensions of language JavaScript were converted to sonar.lang.patterns.js : /*.js,/*.jsx,*/.mjs,/*.vue Declared extensions of language TypeScript were converted to sonar.lang.patterns.ts : /*.ts,*/.tsx Declared extensions of language Ruby were converted to sonar.lang.patterns.ruby : /*.rb Declared extensions of language Scala were converted to sonar.lang.patterns.scala : /*.scala Declared extensions of language C# were converted to sonar.lang.patterns.cs : */.cs Declared extensions of language Java were converted to sonar.lang.patterns.java : /*.java,/*.jav Declared extensions of language HTML were converted to sonar.lang.patterns.web : */.html,/*.xhtml,/*.cshtml,*/.vbhtml,/*.aspx,/*.ascx,*/.rhtml,/*.erb,/*.shtm,*/.shtml Declared extensions of language JSP were converted to sonar.lang.patterns.jsp : /*.jsp,/*.jspf,*/.jspx Declared extensions of language Flex were converted to sonar.lang.patterns.flex : /*.as Declared extensions of language XML were converted to sonar.lang.patterns.xml : /*.xml,*/.xsd,/*.xsl Declared extensions of language PHP were converted to sonar.lang.patterns.php : /*.php,*/.php3,/*.php4,/*.php5,*/.phtml,/*.inc Declared extensions of language VB.NET were converted to sonar.lang.patterns.vbnet : */.vb Will ignore generated code Will ignore generated code Indexing files... Project configuration: 'fontes.c++\Domain\Common\SRC\Encryptor.cpp' indexed with language 'cxx' 'fontes.c++\Domain\Common\SRC\eptException.cpp' indexed with language 'cxx' 'fontes.c++\Domain\Common\SRC\eptGlobals.cpp' indexed with language 'cxx' 'fontes.c++\Domain\Common\SRC\eptUnidadeMedidaDimensao.cpp' indexed with language 'cxx' 'fontes.c++\Domain\Common\SRC\eptUnidadeMedidaVolume.cpp' indexed with language 'cxx' 'fontes.c++\Domain\DSMgr\SRC\KhcDSMgr.cpp' indexed with language 'cxx' 'fontes.c++\Domain\Standardization\SRC\cpcsLogGeracaoMistura.cpp' indexed with language 'cxx' 'fontes.c++\Domain\Standardization\SRC\cpcsRelacionamentoPadroesCST.cpp' indexed with language 'cxx' 'fontes.c++\Domain\Standardization\SRC\eptDefinicaoRefino.cpp' indexed with language 'cxx' 'fontes.c++\Domain\Standardization\SRC\eptEquivalenciasPadraoCSTTipoAco.CPP' indexed with language 'cxx' 'fontes.c++\Domain\Standardization\SRC\eptPadroesCST.CPP' indexed with language 'cxx' 'fontes.c++\MisturaPadroes\copia_ancestrais.bat' indexed with no language 'fontes.c++\MisturaPadroes\gerarrelease.bat' indexed with no language 'fontes.c++\MisturaPadroes\MisturaPadroes.cpp' indexed with language 'cxx' 'fontes.c++\MisturaPadroes\MisturaPadroes.dsp' indexed with no language 'fontes.c++\MisturaPadroes\MisturaPadroes.dsw' indexed with no language 'fontes.c++\MisturaPadroes\MisturaPadroes.h' indexed with language 'cxx' 'fontes.c++\MisturaPadroes\MisturaPadroes.ini' indexed with no language 'fontes.c++\MisturaPadroes\MisturaPadroes.rc' indexed with no language 'fontes.c++\MisturaPadroes\MisturaPadroes.vcxproj' indexed with no language 'fontes.c++\MisturaPadroes\MisturaPadroes.vcxproj.user' indexed with no language 'fontes.c++\MisturaPadroes\Release\MisturaPadroes.exe' indexed with no language 'fontes.c++\MisturaPadroes\Release\MisturaPadroes.obj' indexed with no language 'fontes.c++\MisturaPadroes\Release\MisturaPadroes.pch' indexed with no language 'fontes.c++\MisturaPadroes\Release\MisturaPadroes.pdb' indexed with no language 'fontes.c++\MisturaPadroes\Release\MisturaPadroes.res' indexed with no language 'fontes.c++\MisturaPadroes\Release\MisturaPadroes.tlog\CL.command.1.tlog' indexed with no language 'fontes.c++\MisturaPadroes\Release\MisturaPadroes.tlog\CL.read.1.tlog' indexed with no language 'fontes.c++\MisturaPadroes\Release\MisturaPadroes.tlog\CL.write.1.tlog' indexed with no language 'fontes.c++\MisturaPadroes\Release\MisturaPadroes.tlog\link.command.1.tlog' indexed with no language 'fontes.c++\MisturaPadroes\Release\MisturaPadroes.tlog\link.read.1.tlog' indexed with no language 'fontes.c++\MisturaPadroes\Release\MisturaPadroes.tlog\link.write.1.tlog' indexed with no language 'fontes.c++\MisturaPadroes\Release\MisturaPadroes.tlog\MisturaPadroes.lastbuildstate' indexed with no language 'fontes.c++\MisturaPadroes\Release\MisturaPadroes.tlog\rc.command.1.tlog' indexed with no language 'fontes.c++\MisturaPadroes\Release\MisturaPadroes.tlog\rc.read.1.tlog' indexed with no language 'fontes.c++\MisturaPadroes\Release\MisturaPadroes.tlog\rc.write.1.tlog' indexed with no language 'fontes.c++\MisturaPadroes\Release\StdAfx.obj' indexed with no language 'fontes.c++\MisturaPadroes\Release\vc141.pdb' indexed with no language 'fontes.c++\MisturaPadroes\Release.txt' indexed with no language 'fontes.c++\MisturaPadroes\res\MisturaPadroes.ico' indexed with no language 'fontes.c++\MisturaPadroes\res\MisturaPadroes.rc2' indexed with no language 'fontes.c++\MisturaPadroes\Resource.h' indexed with language 'cxx' 'fontes.c++\MisturaPadroes\StdAfx.cpp' indexed with language 'cxx' 'fontes.c++\MisturaPadroes\StdAfx.h' indexed with language 'cxx' 'fontes.c++\PS\ps\SRC\COLUMNST.CPP' indexed with language 'cxx' 'fontes.c++\PS\ps\SRC\KfcAttr.cpp' indexed with language 'cxx' 'fontes.c++\PS\ps\SRC\KfcAttrFactory.cpp' indexed with language 'cxx' 'fontes.c++\PS\ps\SRC\KfcColMgr.cpp' indexed with language 'cxx' 'fontes.c++\PS\ps\SRC\KfcDateTimeAttr.cpp' indexed with language 'cxx' 'fontes.c++\PS\ps\SRC\KfcDBEngine.cpp' indexed with language 'cxx' 'fontes.c++\PS\ps\SRC\KfcDBUtility.cpp' indexed with language 'cxx' 'fontes.c++\PS\ps\SRC\KfcErrorHandler.cpp' indexed with language 'cxx' 'fontes.c++\PS\ps\SRC\KfcException.cpp' indexed with language 'cxx' 'fontes.c++\PS\ps\SRC\KfcJoinedObject.cpp' indexed with language 'cxx' 'fontes.c++\PS\ps\SRC\KfcObject.cpp' indexed with language 'cxx' 'fontes.c++\PS\ps\SRC\KfcOracleUtility.cpp' indexed with language 'cxx' 'fontes.c++\PS\ps\SRC\KfcSchemeInfo.cpp' indexed with language 'cxx' 'fontes.c++\PS\ps\SRC\KfcStringAttr.cpp' indexed with language 'cxx' 'fontes.c++\PS\ps\SRC\KfcTimeStampAttr.cpp' indexed with language 'cxx' 'fontes.c++\PS\ui\SRC\KfcComboBox.cpp' indexed with language 'cxx' 'fontes.c++\PS\ui\SRC\KfcIconMgr.cpp' indexed with language 'cxx' 'fontes.c++\PS\ui\SRC\KfcListBox.cpp' indexed with language 'cxx' 'fontes.c++\PS\ui\SRC\KfcListCtrl.cpp' indexed with language 'cxx' 'fontes.c++\PS\ui\SRC\KfcListCtrl.cpp' indexed with language 'cxx' 'fontes.c++\PS\util\SRC\KfcObjListEx.cpp' indexed with language 'cxx' 'fontes.c++\PS\util\SRC\KfcString.cpp' indexed with language 'cxx' 'fontes.c++\PS\util\SRC\KfcTime.cpp' indexed with language 'cxx' 'fontes.c++\Reuse\HSMBASE\SRC\Encryptor.cpp' indexed with language 'cxx' 'fontes.c++\Reuse\HSMBASE\SRC\HsmControlObject.cpp' indexed with language 'cxx' 'fontes.c++\Reuse\HSMBASE\SRC\HsmException.cpp' indexed with language 'cxx' 'fontes.c++\Reuse\HSMBASE\SRC\HsmGlobal.cpp' indexed with language 'cxx' 'fontes.c++\Reuse\HSMBASE\SRC\IniFile.cpp' indexed with language 'cxx' 'fontes.c++\Reuse\uc20\Readme.txt' indexed with no language 'fontes.c++\Reuse\uc20\Release\StdAfx.obj' indexed with no language 'fontes.c++\Reuse\uc20\Release\Uc20Gera.E49AE562.tlog\CL.command.1.tlog' indexed with no language 'fontes.c++\Reuse\uc20\Release\Uc20Gera.E49AE562.tlog\CL.read.1.tlog' indexed with no language 'fontes.c++\Reuse\uc20\Release\Uc20Gera.E49AE562.tlog\CL.write.1.tlog' indexed with no language 'fontes.c++\Reuse\uc20\Release\Uc20Gera.E49AE562.tlog\Lib-link.read.1.tlog' indexed with no language 'fontes.c++\Reuse\uc20\Release\Uc20Gera.E49AE562.tlog\Lib-link.write.1.tlog' indexed with no language 'fontes.c++\Reuse\uc20\Release\Uc20Gera.E49AE562.tlog\Lib.command.1.tlog' indexed with no language 'fontes.c++\Reuse\uc20\Release\Uc20Gera.E49AE562.tlog\Uc20GerarMisturaPadroes.lastbuildstate' indexed with no language 'fontes.c++\Reuse\uc20\Release\Uc20GerarMisturaPadroes.lib' indexed with no language 'fontes.c++\Reuse\uc20\Release\Uc20GerarMisturaPadroes.obj' indexed with no language 'fontes.c++\Reuse\uc20\Release\Uc20GerarMisturaPadroes.pch' indexed with no language 'fontes.c++\Reuse\uc20\Release\Uc20GerarMisturaPadroes.pdb' indexed with no language 'fontes.c++\Reuse\uc20\StdAfx.cpp' indexed with language 'cxx' 'fontes.c++\Reuse\uc20\StdAfx.h' indexed with language 'cxx' 'fontes.c++\Reuse\uc20\Uc20GerarMisturaPadroes.cpp' indexed with language 'cxx' 'fontes.c++\Reuse\uc20\Uc20GerarMisturaPadroes.dsp' indexed with no language 'fontes.c++\Reuse\uc20\Uc20GerarMisturaPadroes.dsw' indexed with no language 'fontes.c++\Reuse\uc20\Uc20GerarMisturaPadroes.h' indexed with language 'cxx' 'fontes.c++\Reuse\uc20\Uc20GerarMisturaPadroes.vcxproj' indexed with no language 'fontes.c++\Reuse\UC174\HsmProxy.dsp' indexed with no language 'fontes.c++\Reuse\UC174\HsmProxy.dsw' indexed with no language 'fontes.c++\Reuse\UC174\HsmProxy.vcxproj' indexed with no language 'fontes.c++\Reuse\UC174\ProxyPadronizacaoPlaca.cpp' indexed with language 'cxx' 'fontes.c++\Reuse\UC174\ProxyPadronizacaoPlaca.h' indexed with language 'cxx' 'fontes.c++\Reuse\UC174\Readme.txt' indexed with no language 'fontes.c++\Reuse\UC174\Release\HsmProxy.lib' indexed with no language 'fontes.c++\Reuse\UC174\Release\HsmProxy.pch' indexed with no language 'fontes.c++\Reuse\UC174\Release\HsmProxy.pdb' indexed with no language 'fontes.c++\Reuse\UC174\Release\HsmProxy.tlog\CL.command.1.tlog' indexed with no language 'fontes.c++\Reuse\UC174\Release\HsmProxy.tlog\CL.read.1.tlog' indexed with no language 'fontes.c++\Reuse\UC174\Release\HsmProxy.tlog\CL.write.1.tlog' indexed with no language 'fontes.c++\Reuse\UC174\Release\HsmProxy.tlog\HsmProxy.lastbuildstate' indexed with no language 'fontes.c++\Reuse\UC174\Release\HsmProxy.tlog\Lib-link.read.1.tlog' indexed with no language 'fontes.c++\Reuse\UC174\Release\HsmProxy.tlog\Lib-link.write.1.tlog' indexed with no language 'fontes.c++\Reuse\UC174\Release\HsmProxy.tlog\Lib.command.1.tlog' indexed with no language 'fontes.c++\Reuse\UC174\Release\ProxyPadronizacaoPlaca.obj' indexed with no language 'fontes.c++\Reuse\UC174\Release\StdAfx.obj' indexed with no language 'fontes.c++\Reuse\UC174\StdAfx.cpp' indexed with language 'cxx' 'fontes.c++\Reuse\UC174\StdAfx.h' indexed with language 'cxx' 112 files indexed Quality profile for cxx: Cxx way ------------- Run sensors on module MisturaPadroes Load metrics repository GET 200 http://localhost:9000/api/metrics/search?f=name,description,direction,qualitative,custom&ps=500&p=1 | time=14ms Load metrics repository (done) | time=29ms 'JavaSensor' skipped because there is no related file in current project 'Import external issues report' skipped because one of the required properties is missing 'Python Sensor' skipped because there is no related file in current project 'Cobertura Sensor for Python coverage' skipped because there is no related file in current project 'PythonXUnitSensor' skipped because there is no related file in current project 'Import of Pylint issues' skipped because there is no related file in current project 'Import of Bandit issues' skipped because there is no related file in current project 'Import of Flake8 issues' skipped because there is no related file in current project 'CSS Metrics' skipped because there is no related file in current project 'Import of stylelint issues' skipped because there is no related file in current project 'Code Quality and Security for Go' skipped because there is no related file in current project 'Go Unit Test Report' skipped because there is no related file in current project 'Go Cover sensor for Go coverage' skipped because one of the required properties is missing 'Import of go vet issues' skipped because there is no related file in current project 'Import of Golint issues' skipped because there is no related file in current project 'Import of GoMetaLinter issues' skipped because there is no related file in current project 'Import of GolangCI-Lint issues' skipped because there is no related file in current project 'Kotlin Sensor' skipped because there is no related file in current project 'KotlinSurefireSensor' skipped because there is no related file in current project 'Import of detekt issues' skipped because there is no related file in current project 'Import of Android Lint issues' skipped because one of the required properties is missing 'Import of ktlint issues' skipped because there is no related file in current project 'JavaScript analysis' skipped because there is no related file in current project 'TypeScript analysis' skipped because there is no related file in current project 'JavaScript/TypeScript Coverage' skipped because there is no related file in current project 'Import of ESLint issues' skipped because one of the required properties is missing 'Import of TSLint issues' skipped because one of the required properties is missing 'Ruby Sensor' skipped because there is no related file in current project 'Import of RuboCop issues' skipped because there is no related file in current project 'SimpleCov Sensor for Ruby coverage' skipped because there is no related file in current project 'Scala Sensor' skipped because there is no related file in current project 'Scoverage sensor for Scala coverage' skipped because there is no related file in current project 'Import of Scalastyle issues' skipped because there is no related file in current project 'Import of Scapegoat issues' skipped because there is no related file in current project 'Import of Checkstyle issues' skipped because there is no related file in current project 'Import of PMD issues' skipped because one of the required properties is missing 'Import of SpotBugs issues' skipped because there is no related file in current project 'SurefireSensor' skipped because there is no related file in current project 'Removed properties sensor' skipped because there is no related file in current project 'Flex' skipped because there is no related file in current project 'Flex Cobertura' skipped because there is no related file in current project 'XML Sensor' skipped because there is no related file in current project 'PHP sensor' skipped because there is no related file in current project 'Analyzer for "php.ini" files' skipped because there is no related file in current project 'Generic Test Executions Report' skipped because one of the required properties is missing Sensors : CSS Rules -> JaCoCo XML Report Importer -> C# Project Type Information -> C# Properties -> JavaXmlSensor -> HTML -> VB.NET Project Type Information -> VB.NET Properties -> com.github.mc1arke.sonarqube.plugin.scanner.ScannerPullRequestPropertySensor Sensor CSS Rules [cssfamily] No CSS, PHP, HTML or VueJS files are found in the project. CSS analysis is skipped. Sensor CSS Rules [cssfamily] (done) | time=1ms Sensor JaCoCo XML Report Importer [jacoco] 'sonar.coverage.jacoco.xmlReportPaths' is not defined. Using default locations: target/site/jacoco/jacoco.xml,target/site/jacoco-it/jacoco.xml,build/reports/jacoco/test/jacocoTestReport.xml No report imported, no coverage information will be imported by JaCoCo XML Report Importer Sensor JaCoCo XML Report Importer [jacoco] (done) | time=4ms Sensor C# Project Type Information [csharp] Sensor C# Project Type Information [csharp] (done) | time=1ms Sensor C# Properties [csharp] Project 'MisturaPadroes': Property missing: 'sonar.cs.analyzer.projectOutPaths'. No protobuf files will be loaded for this project. Project 'MisturaPadroes': No Roslyn issues reports have been found. Sensor C# Properties [csharp] (done) | time=1ms Sensor JavaXmlSensor [java] Sensor JavaXmlSensor [java] (done) | time=2ms Sensor HTML [web] Sensor HTML [web] (done) | time=4ms Sensor VB.NET Project Type Information [vbnet] Sensor VB.NET Project Type Information [vbnet] (done) | time=1ms Sensor VB.NET Properties [vbnet] Project 'MisturaPadroes': Property missing: 'sonar.vbnet.analyzer.projectOutPaths'. No protobuf files will be loaded for this project. Project 'MisturaPadroes': No Roslyn issues reports have been found. Sensor VB.NET Properties [vbnet] (done) | time=1ms Sensor com.github.mc1arke.sonarqube.plugin.scanner.ScannerPullRequestPropertySensor Sensor com.github.mc1arke.sonarqube.plugin.scanner.ScannerPullRequestPropertySensor (done) | time=1ms ------------- Run sensors on project rule 'cxx:UndocumentedApi' file suffixes: [.h, .hh, .hpp, .H] 'CXX verify analysis parameters' skipped because one of the required properties is missing 'XSL transformation(s)' skipped because one of the required properties is missing 'Generic Coverage Report' skipped because one of the required properties is missing 'CXX RATS report import' skipped because one of the required properties is missing 'CXX Infer report import' skipped because one of the required properties is missing 'CXX PC-lint report import' skipped because one of the required properties is missing 'CXX Dr. Memory report import' skipped because one of the required properties is missing 'CXX GCC compiler report import' skipped because one of the required properties is missing 'CXX Visual C++ compiler report import' skipped because one of the required properties is missing 'CXX Vera++ report import' skipped because one of the required properties is missing 'CXX Valgrind report import' skipped because one of the required properties is missing 'CXX Clang-Tidy report import' skipped because one of the required properties is missing 'CXX Clang Static Analyzer report import' skipped because one of the required properties is missing 'CXX other analyser report import' skipped because there is no related rule activated in the quality profile 'CXX xUnit Test report import' skipped because one of the required properties is missing 'CXX VSTest/NUnit Test report import' skipped because one of the required properties is missing 'CXX Bullseye coverage report import' skipped because one of the required properties is missing 'CXX Cobertura XML coverage report import' skipped because one of the required properties is missing 'CXX Testwell CTC++ TXT coverage report import' skipped because one of the required properties is missing 'CXX Visual Studio XML coverage report import' skipped because one of the required properties is missing 'C#' skipped because there is no related file in current project 'C# Tests Coverage Report Import' skipped because there is no related file in current project '[Deprecated] C# Integration Tests Coverage Report Import' skipped because there is no related file in current project 'C# Unit Test Results Import' skipped because there is no related file in current project 'VB.NET' skipped because there is no related file in current project 'VB.NET Tests Coverage Report Import' skipped because there is no related file in current project '[Deprecated] VB.NET Integration Tests Coverage Report Import' skipped because there is no related file in current project 'VB.NET Unit Test Results Import' skipped because there is no related file in current project 'Java CPD Block Indexer' skipped because there is no related file in current project Sensors : CXX -> CXX Cppcheck report import -> Zero Coverage Sensor Sensor CXX [cxx] sonar.cxx.metric.api.file.suffixes: [.hxx, .hpp, .hh, .h] 'Complex Functions' metric threshold (cyclomatic complexity): 10 'Big Functions' metric threshold (LOC): 20 Load project repositories GET 200 http://localhost:9000/batch/project.protobuf?key=MisturaPadroes&branch=master | time=17ms Load project repositories (done) | time=28ms ... Sensor CXX [cxx] (done) | time=6930ms Sensor CXX Cppcheck report import [cxx] Searching 'sonar.cxx.cppcheck.reportPaths' files with Ant pattern '[reports/cppcheck.xml]' Search files(s) in path(s): 'X:/_Produtos/Placa/Padronizacao/MisturaPadroes/reports/cppcheck.xml' Property 'sonar.cxx.cppcheck.reportPaths': cannot find any files matching the Ant pattern(s) 'X:/_Produtos/Placa/Padronizacao/MisturaPadroes/reports/cppcheck.xml' Sensor CXX Cppcheck report import [cxx] (done) | time=22ms Sensor Zero Coverage Sensor Sensor Zero Coverage Sensor (done) | time=161ms SCM Publisher is disabled CPD Executor 12 files had no CPD blocks CPD Executor Calculating CPD for 40 files Detection of duplications for X:/_Produtos/Placa/Padronizacao/MisturaPadroes/fontes.c++/PS/ps/SRC/COLUMNST.CPP Detection of duplications for X:/_Produtos/Placa/Padronizacao/MisturaPadroes/fontes.c++/Reuse/HSMBASE/SRC/HsmException.cpp Detection of duplications for X:/_Produtos/Placa/Padronizacao/MisturaPadroes/fontes.c++/Domain/Standardization/SRC/eptDefinicaoRefino.cpp Detection of duplications for X:/_Produtos/Placa/Padronizacao/MisturaPadroes/fontes.c++/Domain/Common/SRC/eptException.cpp Detection of duplications for X:/_Produtos/Placa/Padronizacao/MisturaPadroes/fontes.c++/Domain/Common/SRC/eptUnidadeMedidaDimensao.cpp Detection of duplications for X:/_Produtos/Placa/Padronizacao/MisturaPadroes/fontes.c++/Domain/Standardization/SRC/cpcsRelacionamentoPadroesCST.cpp Detection of duplications for X:/_Produtos/Placa/Padronizacao/MisturaPadroes/fontes.c++/PS/util/SRC/KfcTime.cpp Detection of duplications for X:/_Produtos/Placa/Padronizacao/MisturaPadroes/fontes.c++/Reuse/HSMBASE/SRC/IniFile.cpp Detection of duplications for X:/_Produtos/Placa/Padronizacao/MisturaPadroes/fontes.c++/PS/ps/SRC/KfcStringAttr.cpp Detection of duplications for X:/Produtos/Placa/Padronizacao/MisturaPadroes/fontes.c++/PS/ui/SRC/KfcListCtrl.cpp Detection of duplications for X:/_Produtos/Placa/Padronizacao/MisturaPadroes/fontes.c++/PS/ps/SRC/KfcColMgr.cpp Detection of duplications for X:/_Produtos/Placa/Padronizacao/MisturaPadroes/fontes.c++/PS/ps/SRC/KfcObject.cpp Detection of duplications for X:/_Produtos/Placa/Padronizacao/MisturaPadroes/fontes.c++/PS/ps/SRC/KfcDateTimeAttr.cpp Detection of duplications for X:/_Produtos/Placa/Padronizacao/MisturaPadroes/fontes.c++/PS/util/SRC/KfcObjListEx.cpp Detection of duplications for X:/_Produtos/Placa/Padronizacao/MisturaPadroes/fontes.c++/Domain/Standardization/SRC/cpcsLogGeracaoMistura.cpp Detection of duplications for X:/_Produtos/Placa/Padronizacao/MisturaPadroes/fontes.c++/Domain/Common/SRC/eptUnidadeMedidaVolume.cpp Detection of duplications for X:/_Produtos/Placa/Padronizacao/MisturaPadroes/fontes.c++/Reuse/HSMBASE/SRC/HsmGlobal.cpp Detection of duplications for X:/_Produtos/Placa/Padronizacao/MisturaPadroes/fontes.c++/MisturaPadroes/MisturaPadroes.cpp Detection of duplications for X:/_Produtos/Placa/Padronizacao/MisturaPadroes/fontes.c++/Reuse/HSMBASE/SRC/Encryptor.cpp Detection of duplications for X:/_Produtos/Placa/Padronizacao/MisturaPadroes/fontes.c++/Reuse/uc20/Uc20GerarMisturaPadroes.cpp Detection of duplications for X:/_Produtos/Placa/Padronizacao/MisturaPadroes/fontes.c++/PS/ui/SRC/KfcComboBox.cpp Detection of duplications for X:/_Produtos/Placa/Padronizacao/MisturaPadroes/fontes.c++/PS/ps/SRC/KfcException.cpp Detection of duplications for X:/_Produtos/Placa/Padronizacao/MisturaPadroes/fontes.c++/PS/ps/SRC/KfcTimeStampAttr.cpp Detection of duplications for X:/_Produtos/Placa/Padronizacao/MisturaPadroes/fontes.c++/PS/ps/SRC/KfcOracleUtility.cpp Detection of duplications for X:/_Produtos/Placa/Padronizacao/MisturaPadroes/fontes.c++/Domain/Common/SRC/Encryptor.cpp Detection of duplications for X:/_Produtos/Placa/Padronizacao/MisturaPadroes/fontes.c++/PS/ps/SRC/KfcErrorHandler.cpp Detection of duplications for X:/_Produtos/Placa/Padronizacao/MisturaPadroes/fontes.c++/Domain/Standardization/SRC/eptEquivalenciasPadraoCSTTipoAco.CPP Detection of duplications for X:/_Produtos/Placa/Padronizacao/MisturaPadroes/fontes.c++/Reuse/HSMBASE/SRC/HsmControlObject.cpp Detection of duplications for X:/_Produtos/Placa/Padronizacao/MisturaPadroes/fontes.c++/PS/ps/SRC/KfcDBEngine.cpp Detection of duplications for X:/_Produtos/Placa/Padronizacao/MisturaPadroes/fontes.c++/PS/util/SRC/KfcString.cpp Detection of duplications for X:/_Produtos/Placa/Padronizacao/MisturaPadroes/fontes.c++/PS/ps/SRC/KfcAttrFactory.cpp Detection of duplications for X:/_Produtos/Placa/Padronizacao/MisturaPadroes/fontes.c++/Reuse/UC174/ProxyPadronizacaoPlaca.cpp Detection of duplications for X:/_Produtos/Placa/Padronizacao/MisturaPadroes/fontes.c++/PS/ui/SRC/KfcListCtrl.cpp Detection of duplications for X:/_Produtos/Placa/Padronizacao/MisturaPadroes/fontes.c++/PS/ps/SRC/KfcJoinedObject.cpp Detection of duplications for X:/_Produtos/Placa/Padronizacao/MisturaPadroes/fontes.c++/PS/ps/SRC/KfcDBUtility.cpp Detection of duplications for X:/_Produtos/Placa/Padronizacao/MisturaPadroes/fontes.c++/PS/ui/SRC/KfcIconMgr.cpp Detection of duplications for X:/_Produtos/Placa/Padronizacao/MisturaPadroes/fontes.c++/PS/ui/SRC/KfcListBox.cpp Detection of duplications for X:/_Produtos/Placa/Padronizacao/MisturaPadroes/fontes.c++/Domain/DSMgr/SRC/KhcDSMgr.cpp Detection of duplications for X:/_Produtos/Placa/Padronizacao/MisturaPadroes/fontes.c++/Domain/Standardization/SRC/eptPadroesCST.CPP Detection of duplications for X:/_Produtos/Placa/Padronizacao/MisturaPadroes/fontes.c++/Domain/Common/SRC/eptGlobals.cpp CPD Executor CPD calculation finished (done) | time=204ms Load New Code definition GET 200 http://localhost:9000/api/new_code_periods/show.protobuf?project=MisturaPadroes&branch=master | time=16ms Load New Code definition (done) | time=20ms Analysis report generated in 466ms, dir size=1,1 MB Analysis report compressed in 685ms, zip size=279,5 kB Analysis report generated in X:_Produtos\Placa\Padronizacao\MisturaPadroes.scannerwork\scanner-report Upload report POST 200 http://localhost:9000/api/ce/submit?projectKey=MisturaPadroes&characteristic=branch%3Dmaster&characteristic=branchType%3DBRANCH | time=44ms Analysis report uploaded in 48ms Report metadata written to X:_Produtos\Placa\Padronizacao\MisturaPadroes.scannerwork\report-task.txt ANALYSIS SUCCESSFUL, you can browse http://localhost:9000/dashboard?id=MisturaPadroes&branch=master Note that you will be able to access the updated dashboard once the server has processed the submitted analysis report More about the report processing at http://localhost:9000/api/ce/task?id=AYf4n0p-IDVsccgFDE6Z Post-jobs : Final report Executing post-job 'Final report' Preprocessor: 314 include directive error(s). This is only relevant if parser creates syntax errors. The preprocessor searches for include files in the with 'sonar.cxx.includeDirectories' defined directories and order. Source code parser: 60 syntax error(s) detected. Syntax errors could cause invalid software metric values. Root cause are typically missing includes, missing macros or compiler specific extensions. Analysis total time: 20.916 s

    EXECUTION SUCCESS

    Total time: 22.878s Final Memory: 9M/44M

guwirth commented 1 year ago

Hi @josceley,

Originally SonarQube was a tool to measure Technical Debt. Technical Debt are actually code smells and less bugs. Bugs in the code are/were mostly syntax errors. How the issues are classified is described in the profiles under rules (and up to the developer of the sensor). Classical static code analysis tools (e.g. Cppcheck, ClangTidy) find rather code smalles than bugs.

Regards,

josceley commented 1 year ago

Hi @guwirth. Yes, the rules are enabled, as shown in the images below.

Division by zero in code: image

Divide-by-zero bug rules enabled. image

Nothing detected. image

One of the three detected code smeels is related to the new lines I added, as shown in the image below. image

I have another very large project that does not indicate any bugs, which confirms that the rules are not being processed.

guwirth commented 1 year ago

Hi @josceley,

the rules are active, one is from Cppcheck and one from Infer.

Regards,