Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

sonar-cxx 0.9.2 doesn't show technical debt with sonar 4.5.1 #464

Closed
diaguo opened this issue Apr 15, 2015 · 29 comments
Closed

sonar-cxx 0.9.2 doesn't show technical debt with sonar 4.5.1 #464

diaguo opened this issue Apr 15, 2015 · 29 comments
Labels

Comments

@diaguo
Copy link

diaguo commented Apr 15, 2015

hi, from the SonarQube-compatibility-matrix. the latest version only support sonar 4.5.1, right?
i use the above version for build. and enabled rules in Cppcheck 321 RATS 300 Vera++ 27 Valgrind 15 c++ Common SonarQube 6 Repositories. And build find some issues which belong to c++ Common SonarQube rules. technical debt shows issues are 274 but 0 technical debt value(sqale_index).
is the cxx plugin not support sonar sqale or not compatiable with Common SonarQube rules?

Thanks in advance and waiting for your answers!

@jmecosta
Copy link
Member

I think the common rules have no sqale parameters at the moment since they
are kind of defined in the core. You can try using rest api and modify
those values for the time being (you can use the visual studio sonar
extension, there is a tool there to do that). We can investigate if those
can be added from the plugin side.

On Wed, Apr 15, 2015, 04:57 diaguo [email protected] wrote:

hi, from the SonarQube-compatibility-matrix. the latest version only
support sonar 4.5.1, right?
i use the above version for build. and enabled rules in Cppcheck 321 RATS
300 Vera++ 27 Valgrind 15 c++ Common SonarQube 6 Repositories. And build
find some issues which belong to c++ Common SonarQube rules. technical debt
shows issues are 274 but 0 technical debt value(sqale_index).
is the cxx plugin not support sonar sqale or not compatiable with Common
SonarQube rules?

Thanks in advance and waiting for your answers!


Reply to this email directly or view it on GitHub
#464.

@diaguo
Copy link
Author

diaguo commented Apr 15, 2015

hi, thanks
if other rules such as Cppcheck 321 RATS 300 Vera++ 27 Valgrind found issues, then it will show technical debt value?
currently in our different projects there are no issues found. i doubt whether i have wrong configuration?
in fact we use sonar way quality profile and 663 rules activated. and i think the source path configuration is right.
it can show complexity data by report file, Duplications and code lines.

@jmecosta
Copy link
Member

For those ones you should have some values yes, try to look when you
restart the server if the server log is able to register technical debts
values for the plugin

On Wed, Apr 15, 2015, 10:54 diaguo [email protected] wrote:

hi, thanks
if other rules such as Cppcheck 321 RATS 300 Vera++ 27 Valgrind found
issues, then it will show technical debt value?
currently in our different projects there are no issues found. i doubt
whether i have wrong configuration?
in fact we use sonar way quality profile and 663 rules activated. and i
think the source path configuration is right.
it can show complexity data by report file, Duplications and code lines.


Reply to this email directly or view it on GitHub
#464 (comment).

@diaguo
Copy link
Author

diaguo commented Apr 15, 2015

hi, thanks
if other rules such as Cppcheck 321 RATS 300 Vera++ 27 Valgrind found issues, then it will show technical debt value?
currently in our different projects there are no issues found. i doubt whether i have wrong configuration?
in fact we use sonar way quality profile and 663 rules activated. and i think the source path configuration is right.
it can show complexity data by report file, Duplications and code lines.
by the way, when i configure and enable sonar way quality profile(default profile), sonar-cxx plugin will use it for analysis? I see somewhere else use Cppcheck.exe for analysis. i only need to run sonar-runner command, right?

[CP_Codec_ALL_SONAR_TR] $ /workspace/workspace_hzbtsci/tools/hudson.plugins.sonar.SonarRunnerInstallation/sonar166/bin/sonar-runner -Dsonar.jdbc.url=jdbc:mysql://10.69.22.55:5800/so2?autoReconnect=true&useUnicode=true&characterEncoding=utf8 -Dsonar.host.url=http://hzbtsci.xxxxxxxx.net:9000 -Dsonar.projectBaseDir=/workspace/workspace_hzbtsci/workspace/CP_Codec_ALL_SONAR_TR -Dsonar.sourceEncoding=UTF-8 -Dsonar.cxx.coverage.reportPath=gcovr-reports/ -Dsonar.sources=SS_Codec,SS_CommonDsp/CP_TupFrameProtocol,SS_LocalOam,SS_LocalTelecom,SS_W1plTx,SS_WcdmaEngineDrivers/CP_L1Transmission,SS_WcdmaEngineDrivers/CP_DecoderDriver -Dsonar.language=c++ -Dsonar.junit.reportsPath=gcovr-reports/ -Dsonar.projectVersion=1.0 -Dsonar.projectKey=DSP_CP_Codec_ALL_UT_TR:Trunk -Dsonar.verbose=false -Dsonar.cxx.includeDirectories=include/Codec_Env,/usr/include/,/usr/include/linux,/usr/include/sys,SS_CommonDsp/ -Dsonar.cxx.coverage.itReportPath=gcovr-reports/ -Dsonar.scm.url=scm:svn:https://beisop60.xxxxx.net/isource/svnroot/BTS_SC_DSP/trunk/workarea/C_Application/SC_DSP -Dsonar.cxx.coverage.overallReportPath=gcovr-reports/ -Dsonar.projectName=DSP_CP_Codec_ALL_UT_TR
SonarQube Runner 2.4
Java 1.7.0_07 Oracle Corporation (64-bit)
Linux 2.6.32-220.el6.x86_64 amd64
INFO: Runner configuration file: /workspace/workspace_hzbtsci/tools/hudson.plugins.sonar.SonarRunnerInstallation/sonar166/conf/sonar-runner.properties
INFO: Project configuration file: NONE
INFO: Default locale: "en_US", source code encoding: "UTF-8"
INFO: Work directory: /workspace/workspace_hzbtsci/workspace/CP_Codec_ALL_SONAR_TR/.sonar
INFO: SonarQube Server 4.5.4
16:04:45.964 INFO - Load global referentials...
16:04:46.289 INFO - Load global referentials done: 327 ms
16:04:46.297 INFO - User cache: /root/.sonar/cache
16:04:46.321 INFO - Install plugins
16:04:46.983 INFO - Install JDBC driver
16:04:47.001 INFO - Create JDBC datasource for jdbc:mysql://10.69.22.55:5800/so2?autoReconnect=true&useUnicode=true&characterEncoding=utf8
16:04:48.531 INFO - Initializing Hibernate
16:04:50.313 INFO - Load project referentials...
16:04:51.305 INFO - Load project referentials done: 992 ms
16:04:51.305 INFO - Load project settings
16:04:51.747 INFO - Loading technical debt model...
16:04:51.811 INFO - Loading technical debt model done: 64 ms
16:04:51.813 INFO - Apply project exclusions
16:04:52.288 INFO - ------------- Scan DSP_CP_Codec_ALL_UT_TR
16:04:52.303 INFO - Load module settings
16:04:54.413 INFO - Cutoff date not set
16:04:54.413 INFO - Language is forced to c++
16:04:54.415 INFO - Loading rules...
16:04:55.453 INFO - Loading rules done: 1038 ms
16:04:55.470 INFO - Configure Maven plugins
16:04:55.687 INFO - Compare to previous analysis (2015-04-15)
16:04:55.706 INFO - Compare over 30 days (2015-03-16, analysis of 2015-03-26 17:38:04.0)
16:04:55.811 INFO - Loaded quality gate 'SonarQube way'
16:04:55.930 INFO - Base dir: /workspace/workspace_hzbtsci/workspace/CP_Codec_ALL_SONAR_TR
16:04:55.930 INFO - Working dir: /workspace/workspace_hzbtsci/workspace/CP_Codec_ALL_SONAR_TR/.sonar
16:04:55.931 INFO - Source paths: SS_Codec, SS_CommonDsp/CP_TupFrameProtocol, SS_LocalOam, SS_LocalTelecom, SS_W1plTx, SS_WcdmaEngineDrivers/CP_L1Transmission, SS_WcdmaEngineDrivers/CP_DecoderDriver
16:04:55.931 INFO - Source encoding: UTF-8, default locale: en_US
16:04:55.931 INFO - Index files
16:04:56.423 INFO - 531 files indexed
16:05:26.057 INFO - Quality profile for c++: Sonar way
16:05:26.143 INFO - Trying to guess scm provider from project layout...

@diaguo
Copy link
Author

diaguo commented Apr 15, 2015

2015.04.15 16:14:12 INFO web[org.sonar.INFO] Deploy GWT plugins...
2015.04.15 16:14:12 INFO web[org.sonar.INFO] Deploy GWT plugins done: 1 ms
2015.04.15 16:14:12 INFO web[org.sonar.INFO] Load metrics...
2015.04.15 16:14:13 INFO web[o.s.s.s.RegisterMetrics] Cleaning quality gate conditions
2015.04.15 16:14:13 INFO web[org.sonar.INFO] Load metrics done: 648 ms
2015.04.15 16:14:13 INFO web[o.s.s.s.RegisterDebtModel] Register technical debt model...
2015.04.15 16:14:13 INFO web[o.s.s.s.RegisterDebtModel] Register technical debt model done: 61 ms
2015.04.15 16:14:13 INFO web[org.sonar.INFO] Register rules...
2015.04.15 16:14:22 INFO web[org.sonar.INFO] Register rules done: 8849 ms
2015.04.15 16:14:22 INFO web[o.s.s.q.RegisterQualityProfiles] Register Quality Profiles...
2015.04.15 16:14:24 INFO web[o.s.s.q.RegisterQualityProfiles] Register Quality Profiles done: 2235 ms
2015.04.15 16:14:24 INFO web[o.s.s.s.RegisterNewMeasureFilters] Register measure filters...
2015.04.15 16:14:24 INFO web[o.s.s.s.RegisterNewMeasureFilters] Register measure filters done: 8 ms
2015.04.15 16:14:24 INFO web[o.s.s.s.RegisterDashboards] Register dashboards...
2015.04.15 16:14:24 INFO web[o.s.s.s.RegisterDashboards] Register dashboards done: 40 ms
2015.04.15 16:14:24 INFO web[o.s.s.s.RegisterPermissionTemplates] Register permission templates...
2015.04.15 16:14:24 INFO web[o.s.s.s.RegisterPermissionTemplates] Register permission templates done: 5 ms
2015.04.15 16:14:24 INFO web[o.s.s.s.RenameDeprecatedPropertyKeys] Rename deprecated property keys
2015.04.15 16:14:25 INFO web[jruby.rack] jruby 1.7.9 (ruby-1.8.7p370) 2013-12-06 87b108a on Java HotSpot(TM) 64-Bit Server VM 1.7.0_51-b13 [linux-amd64]
2015.04.15 16:14:25 INFO web[jruby.rack] using a shared (threadsafe!) runtime
2015.04.15 16:14:36 INFO web[jruby.rack] keeping custom (config.logger) Rails logger instance
2015.04.15 16:14:36 INFO web[o.a.c.u.SessionIdGenerator] Creation of SecureRandom instance for session ID generation using [SHA1PRNG] took [249] milliseconds.
2015.04.15 16:14:36 INFO web[o.s.s.app.Logging] Web server is started
2015.04.15 16:14:36 INFO web[o.s.s.a.EmbeddedTomcat] HTTP connector enabled on port 9000
2015.04.15 16:14:37 INFO app[o.s.p.m.Monitor] Process[web] is up

from above logs, seems server start normally.

@jmecosta
Copy link
Member

By the way you mention Cppcheck.exe. the plugin does not run any external
tools. Probably that's the reason. You need to create reports for Cppcheck
vera and rats to get some debt

On Wed, Apr 15, 2015, 11:11 diaguo [email protected] wrote:

hi, thanks
if other rules such as Cppcheck 321 RATS 300 Vera++ 27 Valgrind found
issues, then it will show technical debt value?
currently in our different projects there are no issues found. i doubt
whether i have wrong configuration?
in fact we use sonar way quality profile and 663 rules activated. and i
think the source path configuration is right.
it can show complexity data by report file, Duplications and code lines.

by the way, when i configure and enable sonar way quality profile(default
profile), sonar-cxx plugin will use it for analysis? I see somewhere else
use Cppcheck.exe for analysis. i only need to run sonar-runner command,
right?

[CP_Codec_ALL_SONAR_TR] $
/workspace/workspace_hzbtsci/tools/hudson.plugins.sonar.SonarRunnerInstallation/sonar166/bin/sonar-runner
-Dsonar.jdbc.url=jdbc:mysql://
10.69.22.55:5800/so2?autoReconnect=true&useUnicode=true&characterEncoding=utf8
-Dsonar.host.url=http://hzbtsci.china.nsn-net.net:9000
-Dsonar.projectBaseDir=/workspace/workspace_hzbtsci/workspace/CP_Codec_ALL_SONAR_TR
-Dsonar.sourceEncoding=UTF-8 -Dsonar.cxx.coverage.reportPath=gcovr-reports/
-Dsonar.sources=SS_Codec,SS_CommonDsp/CP_TupFrameProtocol,SS_LocalOam,SS_LocalTelecom,SS_W1plTx,SS_WcdmaEngineDrivers/CP_L1Transmission,SS_WcdmaEngineDrivers/CP_DecoderDriver
-Dsonar.language=c++ -Dsonar.junit.reportsPath=gcovr-reports/
-Dsonar.projectVersion=1.0 -Dsonar.projectKey=DSP_CP_Codec_ALL_UT_TR:Trunk
-Dsonar.verbose=false
-Dsonar.cxx.includeDirectories=include/Codec_Env,/usr/include/,/usr/include/linux,/usr/include/sys,SS_CommonDsp/
-Dsonar.cxx.coverage.itR eportPat h=gcovr-reports/ -Dsonar.scm.url=scm:svn:
https://beisop60.china.nsn-net.net/isource/svnroot/BTS_SC_DSP/trunk/workarea/C_Application/SC_DSP
-Dsonar.cxx.coverage.overallReportPath=gcovr-reports/
-Dsonar.projectName=DSP_CP_Codec_ALL_UT_TR
SonarQube Runner 2.4
Java 1.7.0_07 Oracle Corporation (64-bit)
Linux 2.6.32-220.el6.x86_64 amd64
INFO: Runner configuration file:
/workspace/workspace_hzbtsci/tools/hudson.plugins.sonar.SonarRunnerInstallation/sonar166/conf/sonar-runner.properties
INFO: Project configuration file: NONE
INFO: Default locale: "en_US", source code encoding: "UTF-8"
INFO: Work directory:
/workspace/workspace_hzbtsci/workspace/CP_Codec_ALL_SONAR_TR/.sonar
INFO: SonarQube Server 4.5.4
16:04:45.964 INFO - Load global referentials...
16:04:46.289 INFO - Load global referentials done: 327 ms
16:04:46.297 INFO - User cache: /root/.sonar/cache
16:04:46.321 INFO - Install plugins
16:04:46.983 INFO - Install JDBC driver
16:04:47.001 INFO - Create JDBC datasource for jdbc:mysql://
10.69.22.55:5800/so2?autoReconnect=true&useUnicode=true&characterEncoding=utf8
16:04:48.531 INFO - Initializing Hibernate
16:04:50.313 INFO - Load project referentials...
16:04:51.305 INFO - Load project referentials done: 992 ms
16:04:51.305 INFO - Load project settings
16:04:51.747 INFO - Loading technical debt model...
16:04:51.811 INFO - Loading technical debt model done: 64 ms
16:04:51.813 INFO - Apply project exclusions
16:04:52.288 INFO - ------------- Scan DSP_CP_Codec_ALL_UT_TR
16:04:52.303 INFO - Load module settings
16:04:54.413 INFO - Cutoff date not set
16:04:54.413 INFO - Language is forced to c++
16:04:54.415 INFO - Loading rules...
16:04:55.453 INFO - Loading rules done: 1038 ms
16:04:55.470 INFO - Configure Maven plugins
16:04:55.687 INFO - Compare to previous analysis (2015-04-15)
16:04:55.706 INFO - Compare over 30 days (2015-03-16, analysis of
2015-03-26 17:38:04.0)
16:04:55.811 INFO - Loaded quality gate 'SonarQube way'
16:04:55.930 INFO - Base dir:
/workspace/workspace_hzbtsci/workspace/CP_Codec_ALL_SONAR_TR
16:04:55.930 INFO - Working dir:
/workspace/workspace_hzbtsci/workspace/CP_Codec_ALL_SONAR_TR/.sonar
16:04:55.931 INFO - Source paths: SS_Codec,
SS_CommonDsp/CP_TupFrameProtocol, SS_LocalOam, SS_LocalTelecom, SS_W1plTx,
SS_WcdmaEngineDrivers/CP_L1Transmission,
SS_WcdmaEngineDrivers/CP_DecoderDriver
16:04:55.931 INFO - Source encoding: UTF-8, default locale: en_US
16:04:55.931 INFO - Index files
16:04:56.423 INFO - 531 files indexed
16:05:26.057 INFO - Quality profile for c++: Sonar way
16:05:26.143 INFO - Trying to guess scm provider from project layout...


Reply to this email directly or view it on GitHub
#464 (comment).

@diaguo
Copy link
Author

diaguo commented Apr 15, 2015

but in previous sonar version, a technical debt plugin will get the technical debt value by just use sonar-cxx plugin for analysis, But builtin technical debt shows 0 issues and Technical Debt 0.0 days.
do you mean i can't just use sonar-cxx plugin to analyze the issues? do i have to use other tools for analysis? i need to get those report first before use above command and sonar-cxx plugin?
i see there are some parameter such as sonar.cxx.cppcheck.reportPath, sonar.cxx.pclint.customRules and so on

@diaguo
Copy link
Author

diaguo commented Apr 15, 2015

so builtin technical debt need issues for value, issues need external tool to generate them.
but technical debt (obsolete)plugin no need the issues?seems the later are cauculated by complexcity, duplication and so on.

@jmecosta
Copy link
Member

correct, please take a look on the changes introduced in the sonar platform
wrt with technical debt. 4.5.1 and above only uses issues are used to
estimate debt. so you need to analyse your code first. if you enable the
rules from "c++ SonarQube c++" repository you should be able to see some
debt since those should be defined already in 0.9.2 if not then the
upcoming 0.9.3 will contain those

On Wed, 15 Apr 2015 at 11:32 diaguo [email protected] wrote:

so builtin technical debt need issues for value, issues need external tool
to generate them.
but technical debt (obsolete)plugin no need the issues?seems the later are
cauculated by complexcity, duplication and so on.


Reply to this email directly or view it on GitHub
#464 (comment).

@diaguo
Copy link
Author

diaguo commented Apr 16, 2015

hi, jmecosta
thanks for your kindly support.
so i can't use coverage report and complexity report files for the technical debt currently?

@jmecosta
Copy link
Member

you will need to enable the correspondent rules that take care of
complexity and coverage. for example: FileComplexityCheck
and FunctionComplexityCheck. For the coverage, those are provided by the
"common module" so i might need to see if those debt values are set by
platform or plugin.

All this you can try if you build 0.9.3 snapshot. 0.9.2 does not contain
any debt information

On Thu, 16 Apr 2015 at 08:14 diaguo [email protected] wrote:

hi, jmecosta
thanks for your kindly support.
so i can't use coverage report and complexity report files for the
technical debt currently?


Reply to this email directly or view it on GitHub
#464 (comment).

@diaguo
Copy link
Author

diaguo commented Apr 16, 2015

hi, thank you again,
as you referred FileComplexityCheck and FunctionComplexityCheck rule.
i can't find those rules by search rules. I'm using soner 4.5.1 and cxx-0.9.2.

by enable the rules in the Common SonarQube repository. there are issues but no technical debt value.
from SonarQube Documentation User Guide :
Yes, the SonarQube implementation of SQALE is based solely on rules and issues. That means that if you want to manage all your technical debt with SQALE, you'll first need to enable the rules in the Common SonarQube repository that flag:

Duplicated blocks
Failed unit tests
Insufficient branch coverage by unit tests
Insufficient comment density
Insufficient line coverage by unit tests
Skipped unit tests

@diaguo
Copy link
Author

diaguo commented Apr 16, 2015

hi, do you mean i can try 0.9.3 snapshot as 0.9.2 doesn't show technical debt.
in fact when i use cppcheck report file. bothe issues and technical debt are showed.
where can i get the 0.9.3 snapshot?

@guwirth
Copy link
Collaborator

guwirth commented Apr 16, 2015

Current planning is to release RC1 on Sunday and final by end of April.

Am 16.04.2015 um 07:39 schrieb diaguo [email protected]:

hi, do you mean i can try 0.9.3 snapshot as 0.9.2 doesn't show technical debt.
in fact when i use cppcheck report file. bothe issues and technical debt are showed.
where can i get the 0.9.3 snapshot?


Reply to this email directly or view it on GitHub.

@diaguo
Copy link
Author

diaguo commented Apr 16, 2015

Hi, thanks, I need to upgrade sonar server to 4.5.2?
It seems 0.9.3 is for 4.5.2.

Guo Dianwu

From: ext Günter Wirth [mailto:[email protected]]
Sent: Thursday, April 16, 2015 1:42 PM
To: wenns/sonar-cxx
Cc: Guo, Dianwu (Nokia - CN/Hangzhou)
Subject: Re: [sonar-cxx] sonar-cxx 0.9.2 doesn't show technical debt with sonar 4.5.1 (#464)

Current planning is to release RC1 on Sunday and final by end of April.

Am 16.04.2015 um 07:39 schrieb diaguo <[email protected]mailto:[email protected]>:

hi, do you mean i can try 0.9.3 snapshot as 0.9.2 doesn't show technical debt.
in fact when i use cppcheck report file. bothe issues and technical debt are showed.
where can i get the 0.9.3 snapshot?


Reply to this email directly or view it on GitHub.


Reply to this email directly or view it on GitHubhttps://github.com//issues/464#issuecomment-93648715.

@guwirth
Copy link
Collaborator

guwirth commented Apr 16, 2015

Yes, 0.9.3 is using 4.5.2 API which is no more compatible to 4.5 and 4.5.1.

Am 16.04.2015 um 07:45 schrieb diaguo [email protected]:

Hi, thanks, I need to upgrade sonar server to 4.5.2?
It seems 0.9.3 is for 4.5.2.

Guo Dianwu
Tel: 18626881158
WBTS CI |BTS Simulatorhttps://confluence.inside.nokiasiemensnetworks.com/display/TENVSIM | BTS Toolshttps://confluence.inside.nokiasiemensnetworks.com/display/btsup/DSP+SW+Tools

From: ext Günter Wirth [mailto:[email protected]]
Sent: Thursday, April 16, 2015 1:42 PM
To: wenns/sonar-cxx
Cc: Guo, Dianwu (Nokia - CN/Hangzhou)
Subject: Re: [sonar-cxx] sonar-cxx 0.9.2 doesn't show technical debt with sonar 4.5.1 (#464)

Current planning is to release RC1 on Sunday and final by end of April.

Am 16.04.2015 um 07:39 schrieb diaguo <[email protected]mailto:[email protected]>:

hi, do you mean i can try 0.9.3 snapshot as 0.9.2 doesn't show technical debt.
in fact when i use cppcheck report file. bothe issues and technical debt are showed.
where can i get the 0.9.3 snapshot?


Reply to this email directly or view it on GitHub.


Reply to this email directly or view it on GitHubhttps://github.com//issues/464#issuecomment-93648715.

Reply to this email directly or view it on GitHub.

@jmecosta
Copy link
Member

we will have it updated against 4.5.4 since its the last LTS, right?

@diaguo
Copy link
Author

diaguo commented Apr 16, 2015

Hi, thanks again,
Can the coverage and complexity report files used by sonar core directly for technical debt but not through cxx-plugin?
Or all issues need language plugin(community or commercial C/C++ Plugin ) support for technical debt?

Guo Dianwu

From: ext Günter Wirth [mailto:[email protected]]
Sent: Thursday, April 16, 2015 1:48 PM
To: wenns/sonar-cxx
Cc: Guo, Dianwu (Nokia - CN/Hangzhou)
Subject: Re: [sonar-cxx] sonar-cxx 0.9.2 doesn't show technical debt with sonar 4.5.1 (#464)

Yes, 0.9.3 is using 4.5.2 API which is no more compatible to 4.5 and 4.5.1.

Am 16.04.2015 um 07:45 schrieb diaguo <[email protected]mailto:[email protected]>:

Hi, thanks, I need to upgrade sonar server to 4.5.2?
It seems 0.9.3 is for 4.5.2.

Guo Dianwu

From: ext Günter Wirth [mailto:[email protected]]
Sent: Thursday, April 16, 2015 1:42 PM
To: wenns/sonar-cxx
Cc: Guo, Dianwu (Nokia - CN/Hangzhou)
Subject: Re: [sonar-cxx] sonar-cxx 0.9.2 doesn't show technical debt with sonar 4.5.1 (#464)

Current planning is to release RC1 on Sunday and final by end of April.

Am 16.04.2015 um 07:39 schrieb diaguo <[email protected]<mailto:[email protected]mailto:[email protected]%3cmailto:[email protected]>>:

hi, do you mean i can try 0.9.3 snapshot as 0.9.2 doesn't show technical debt.
in fact when i use cppcheck report file. bothe issues and technical debt are showed.
where can i get the 0.9.3 snapshot?


Reply to this email directly or view it on GitHub.


Reply to this email directly or view it on GitHubhttps://github.com//issues/464#issuecomment-93648715.

Reply to this email directly or view it on GitHub.


Reply to this email directly or view it on GitHubhttps://github.com//issues/464#issuecomment-93649485.

@jmecosta
Copy link
Member

no, this is a core feature. unless you want to write your own plugin with your own model it cant be done.

@guwirth
Copy link
Collaborator

guwirth commented Apr 16, 2015

For compatibility see https://travis-ci.org/wenns/sonar-cxx/builds/58412347

Am 16.04.2015 um 07:58 schrieb Jorge Costa [email protected]:

we will have it updated against 4.5.4 since its the last LTS, right?


Reply to this email directly or view it on GitHub.

@diaguo
Copy link
Author

diaguo commented Apr 16, 2015

so all issues need supported by plugin then can calculate technical debt value? sonar core can‘t deal with those report files directly for issues, right?

@jmecosta
Copy link
Member

Correct

On Thu, Apr 16, 2015, 11:08 diaguo [email protected] wrote:

so all issues need supported by plugin then can calculate technical debt
value? sonar core can‘t deal with those report files directly for issues,
right?


Reply to this email directly or view it on GitHub
#464 (comment).

@diaguo
Copy link
Author

diaguo commented Apr 16, 2015

OK.
Thanks for your so kindly and patient support and quickly answers!

@diaguo diaguo closed this as completed Apr 16, 2015
@jmecosta
Copy link
Member

No problem

On Thu, Apr 16, 2015, 11:20 diaguo [email protected] wrote:

OK.
Thanks for your so kindly and patient support and quickly answers!


Reply to this email directly or view it on GitHub
#464 (comment).

@diaguo diaguo reopened this Apr 17, 2015
@diaguo
Copy link
Author

diaguo commented Apr 17, 2015

hi, thanks again,
we also want to know, can the plugin support previous technical debt plugin algorithms as follws for issues and technical debt calculation? with those 5 dimensions?
or is it impossible for plugin to use the same algorithm with old technical debt plugin?
comparing to sonarqube common rules, seems those 5 dimensions can be covered with core technical debt. but maybe different algorithm used.

Duplicated blocks
Failed unit tests
Insufficient branch coverage by unit tests
Insufficient comment density
Insufficient line coverage by unit tests
Skipped unit tests

the following is old plugin algorithm.
http://www.sonarqube.org/evaluate-your-technical-debt-with-sonar/
Where :
Duplications = cost_to_fix_one_block * duplicated_blocks

Violations = cost_to fix_one_violation * mandatory_violations

Comments = cost_to_comment_one_API * public_undocumented_api

Coverage = cost_to_cover_one_of_complexity * uncovered_complexity_by_tests (80% of coverage is the objective)

Complexity = cost_to_split_a_method * (function_complexity_distribution >= 8) + cost_to_split_a_class * (class_complexity_distribution >= 60)

@guwirth
Copy link
Collaborator

guwirth commented Apr 17, 2015

Personally I prefer also the old way. I see no benefit in this new Sqale classification. But the old way is no more supported by the core.

Please write a feature request in the SQ forum.

Am 17.04.2015 um 07:46 schrieb diaguo [email protected]:

hi, thanks again,
we also want to know, can the plugin support previous technical debt plugin algorithms as follws for issues and technical debt calculation? with those 5 dimensions?
or is it impossible for plugin to use the same algorithm with old technical debt plugin?
comparing to sonarqube common rules, seems those 5 dimensions can be covered with core technical debt. but maybe different algorithm used.

Duplicated blocks
Failed unit tests
Insufficient branch coverage by unit tests
Insufficient comment density
Insufficient line coverage by unit tests
Skipped unit tests

the following is old plugin algorithm.
http://www.sonarqube.org/evaluate-your-technical-debt-with-sonar/
Where :
Duplications = cost_to_fix_one_block * duplicated_blocks

Violations = cost_to fix_one_violation * mandatory_violations

Comments = cost_to_comment_one_API * public_undocumented_api

Coverage = cost_to_cover_one_of_complexity * uncovered_complexity_by_tests (80% of coverage is the objective)

Complexity = cost_to_split_a_method * (function_complexity_distribution >= 8) + cost_to_split_a_class * (class_complexity_distribution >= 60)


Reply to this email directly or view it on GitHub.

@diaguo
Copy link
Author

diaguo commented Apr 29, 2015

hi, sorry for need help again.
Seems sonar core doesn't support Complexity measurement (old plugin support) for technival debt value, right?
it only support following six rules.
Duplicated blocks
Failed unit tests
Insufficient branch coverage by unit tests
Insufficient comment density
Insufficient line coverage by unit tests
Skipped unit tests

Complexity = cost_to_split_a_method * (function_complexity_distribution >= 8) + cost_to_split_a_class * (class_complexity_distribution >= 60)

@jmecosta
Copy link
Member

There are complexity rules in the sonarqube-c++ repo. Function 2 complex
and file 2 complex. Those will provide debt in the upcoming 0.9.3

On Wed, Apr 29, 2015, 10:15 diaguo [email protected] wrote:

hi, sorry for need help again.
Seems sonar core doesn't support Complexity measurement (old plugin
support) for technival debt value, right?
it only support following six rules.

Duplicated blocks
Failed unit tests
Insufficient branch coverage by unit tests
Insufficient comment density
Insufficient line coverage by unit tests
Skipped unit tests

Complexity = cost_to_split_a_method * (function_complexity_distribution >=
8) + cost_to_split_a_class * (class_complexity_distribution >= 60)

Reply to this email directly or view it on GitHub
#464 (comment).

@diaguo
Copy link
Author

diaguo commented Apr 29, 2015

thanks! i have tried it and it works well!
but it is hard to get the same technical debt value with old plugin in deed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Development

No branches or pull requests

3 participants