-
-
Notifications
You must be signed in to change notification settings - Fork 5.5k
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
Refactor [Sonar] #3189
Refactor [Sonar] #3189
Conversation
|
Alright I think I've figured out a way in which I can split up refactoring the existing Sonar badges and handling all the others in a follow up. Will open an issue to track that latter one shortly and then finish off the last couple pieces with the refactor here |
I know this has been running for a long time (it seems to keep spawning off new threads of work 😄) but I think it's finally just about done. All that's left is to add the redirector service (to convert I'll mark the PR ready for review once I'm done with those, but it's probably ready now for some new eyes to review if anyone is up for looking at the rest of it. |
sizeMetricNames, | ||
testsMetricNames | ||
) | ||
const metricNameRouteParam = metricNames.join('|') |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I elected to enumerate the various metrics in groups based on how Sonar docs typically group those metrics. I've still not had a chance to review each metric in detail, but I think that when implementing #3236 a reasonable starting point would be a service class for each group (I expect there will be a lot of similarity in how the related metrics are handled). Some of those metrics (like the coverage ones) could probably be tacked into one of the existing services
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think this is good to merge. Cheers for persisting with it 👍
Thanks for all the feedback! |
|
Close #1075
Things to note:
version
param as a route param prefix. I movedversion
from route param to query param, with a redirector service to prevent breaking existing badges5.3
for theversion
param so we know to use the legacy api. The latest version of Sonar is now 7.6 so I believe that theversion
parameter (only needed for Sonar 5.3 and below) falls under the "not typically used" category, making it a better fit for a query param.Added support for additional Sonar metrics (our legacy service recognized a few, but for the others would just display the raw value with brightgreen color)Examples of "new" badge support: Quality Gate, Bugs, Code Smells, Duplicated Lines %, Lines of Code, Maintainability, Reliability, Security, Vulnerabilities, and Issues