Skip to content
New issue

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

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

Already on GitHub? # to your account

Sonar Deprecation #32

Closed
reitzmichnicht opened this issue Jul 8, 2019 · 6 comments
Closed

Sonar Deprecation #32

reitzmichnicht opened this issue Jul 8, 2019 · 6 comments
Labels
enhancement New feature or request
Milestone

Comments

@reitzmichnicht
Copy link

reitzmichnicht commented Jul 8, 2019

With Sonar 7.9 LTS and Yaml Plugin 1.4.3 I get the following deprecation warning:

Metric 'comment_lines_data' is deprecated. Provided value is ignored.

This seems to come from LineCounter class using CoreMetrics.COMMENT_LINES_DATA_KEY.

@sbaudoin
Copy link
Owner

Hi,

Thanks for reporting. Yes, I know about that. If I'm not wrong, you meet this issue as of SQ 7.3. I keep this metrics however because the plugin is compatible with SQ 6 and it is relevant for this version.

The API doc says that "measures are no longer sent within analysis reports" so I have to fix that in a next release but to be honest the SonarQube documentation is pretty poor and has not helped me so far find the proper to replace the way I calculate measures in my plugin. If you have some inputs on this, I'll be very happy.

Regards

@sbaudoin sbaudoin added the enhancement New feature or request label Jul 10, 2019
@sbaudoin
Copy link
Owner

According to https://community.sonarsource.com/t/as-of-7-3-what-is-the-proper-way-to-calculate-the-comment-lines-data-measure/11712/2, my code is already doing the right thing (meaning, using COMMENT_LINES), so the warning can be safely ignored.

@reitzmichnicht
Copy link
Author

Then please send this metric depending on Sonar version. See this doc:
http://javadocs.sonarsource.org/7.9/apidocs/org/sonar/api/SonarRuntime.html

@sbaudoin
Copy link
Owner

Sorry but what is wrong with this warning? As far as I know it appears in the scanner output so you can just ignore it?

@sbaudoin sbaudoin reopened this Jul 18, 2019
@reitzmichnicht
Copy link
Author

We have a zero warning policy, so we try to avoid getting warnings if possible. Normally a warning should indicate that something might be wrong which is not the case here.

@sbaudoin
Copy link
Owner

OK, it makes sense, I'll do that. Implementing the checks for such a policy could take some times, I hope you are not in a rush.

@sbaudoin sbaudoin added this to the 1.5.0 milestone Jul 21, 2019
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants