Get Sonarqube report against specific code base - sonarqube

I have very old application, which doesn't meet code coverage and code quality. Having like 20% code coverage and 500+ code smells. Now for year 2018 I want track code quality.
To track this I think of below one solution,
Every time generate sonarqube report against specific version so that can be able to get idea about code quality in new bugs, new code smells section. I will be able to track code quality on newly added code in 2018. How can I achieve this in sonarquebe... or any other better suggestion.

SonarQube is tailor-made to help you focus on the quality of new code, or code in the leak period. New code metrics appear on the project front page in the yellow-highlighted section on the right of the page, and the default Quality Gate focuses on new code as well.

Related

How to exclude all legacy issues by date?

We have a lot of legacy code in our repositories, and now we implement SonarQube 6.4 but our legacy code causes a lot of errors and warnings, so we would like to analyze only new written/in the future modified code and exclude the old because we have no resources to amend all issues from legacy code written during last 10 years.
How can I exclude already found issues e.g. by the date they when they were found? But we don't want to exclude all old files as such, because edit them from time to time. We just want to make sure not to add new issues.
SonarQube promotes the idea of a "leak paradigm". In short, the idea is to continously enrich your existing code base with clean, maintainable, secure increments - which will make your code base better over time.
Fixing all existing issues is not advisable.
So: define a leak period in SonarQube and change your quality gate to only leak measures. SonarQube is made for exactly your use-case!
You could change all of the issues within a time frame via Bulk change:
filter:
bulkchange accordingly

Sonarqube 6.2 - multilanguage setup, show coverage per language

We do have an pretty old code base, where at the moment everything is handled within (frontend/backend) - to improve our quality, we setup a multilanguage project, now instead of analyzing just Java, we also analyse SCSS, HTML, JS, Xml,...
Well so far everything is running smooth, and working as expected, I am just curious if there is a way to show "coverage per language"? We do have a lot of Java Tests but no JavaScript tests, and it would be pretty neat, to have an overview of "how much tested" the different languages are!
There is also some kind of business value related to this! As the Coverage is now not separated into Integration and Unit tests, it is now also factoring the coverage of the JavaScript files into the overall coverage -> which we can argument easily, but we lose some kind of comparability :D
This is not available synthetically within SonarQube. If it's really important to you, you'll need to use the web services to pull the data and do the calculations externally.

can Sonarqube analyse code only on latest perforce changelists

can Sonarqube analyse code only on latest perforce changelists.I don't want code review on the whole code base as its Legacy code written 10-15 yrs back.
can you please help me here or point me to any documentation.
Thanks in Advance.
What you're looking for is the Leak Period. I.e. you want to focus on the recent changes to the code. SonarQube is designed to help you do that.
The entire code base will be analyzed, but by default the Quality Gate tests changes on new/leak period code, and the interface is designed to highlight leak period changes.

Using Sonar Qube to flag "new" issues

I've just installed SonarQube and it's understandably found a lot of technical debt that we want to eventually fix. However at the moment, I want to make sure that any new code checked in is evaluated and issues flagged in that.
I know I can mark issues as won't fix, but is there a way to flag issues that have arisen after a certain point in time and leave the existing technical debt as "Will fix later"?
I know ideally I'd like to halt development and fix everything right now, but I've only just got buy in for a CI server and some of my senior colleagues don't even see the point of unit tests, let alone ensuring code quality.
SonarQube focuses now on the Leak Period, i.e. problems introduced recently. This is handled through project versions, so you just need to update your string to start a new leak period and immediately differentiate old code from new.
Take a look at SonarQube itself on SonarQube.com. The highlighted "Leak Period" section on the right brings attention to problems that are new in this version.

Jetbrains YouTrack and Reporting

I am working on a project using YouTrack for bug reporting. I would like to be able to build a few simple reports that come in handy during a stabilization period, reports that track trends like:
The number of new bugs opened per day for the product (or for a feature).
The number of of open bugs each day with a specific tag
The fix rate per day
Has anybody had any success doing anything like this in YouTrack and if so where should I start looking?
Thanks for your time.
You can use built in matrix reports for first and third cases. Just make a search request to get issues you are interested in and create report. One of the axis can be created date or resolved date. The only thing is that old dates are grouped.
If it's not enough you can use YouTrack REST API to get information you need.
You can start with this or this thanks to Hadi Hariri.

Resources