12/12/2023 0 Comments Thefuck plugin![]() ![]() How is this related, if I specify leak period as previous_version? But there are still 0 lines of new code in Measures pane!Īnyway, I suspect that your test didn’t give the results you expected because you are analyzing versions in the past I can clearlly see how Lines Of Code metric went up in the chart on the right. I see this nice mark “New Code Period starts here” in the activity pane. But this does not work either! I still see zero lines of new code! Essentially, I repeated the same steps I described originally, but did not change projectVersion. Now, I tried to upload several analyses under the same version. Are you trying to say I won’t be able to use previous_version setting in this case, since each new analysis will reset the baseline for comparison? This means each new analysis will have new projectVersion assigned. My first thought was that I upload each analysis with the version in the form. We have a CI system set up, and it builds the software several times a day. Here is our workflow, which I think is quite usual. The docs do not help, there are not much info on how this feature works, which is annoying. Seems like this is closer to what you are trying to explain, but it is totally unexpected and still not clear to me. This works well for projects with regular versions or releases. Previous Version – The New Code Period defaults to Previous version which shows any changes made in your project’s current version.Yeap, that’s exactly what I would expect. Here the quote from a tutorial, which shows up as the first link in google if you search for “previous_version”:īy using the previous_version setting, the New Code Period will be tracked from the previous version set with the sonar.projectVersion parameter. That’s what I would expect, and from my point of view, this statement contradicts your previous paragraph. If you want to replay the past, you can try using sonar.projectDate. In this case since this is code modified years ago, no line will be marked as “new”. The problem here is that SonarQube gets the modification date of each line using git. SonarQube will detect the version change and will consider all lines that were modified later than 5min ago to be “new”. Last analysis of v1.13 was done 5 min ago.If you do it like that, all changes introduced in the version about to be release will be in the “new code”.Īnyway, I suspect that your test didn’t give the results you expected because you are analyzing versions in the past. If you really want to scan the code only occasionally (which we don’t recommend), you should do it before each release. This is not the use case the new code period was intended for. I agree that the naming and some labels could be improved as sometimes it might look like the “new code” will include all changes done throughout the previous version (1.13 in your example).Īnd of course I upload new analysis each time I bump the version, and only then With the “new code period” (or “leak period” as it was called in the past) set to “last version”, all changes included in the first analysis of the new version should be included in the “new code”. Sorry, I think my last reply wasn’t very clear.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |