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
Show relative MSI #1159
base: master
Are you sure you want to change the base?
Show relative MSI #1159
Conversation
|
||
$percentage = (float) $percentage; | ||
|
||
return $percentage; |
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.
Why not just cast to float? Any cases where this cast wouldn't work?
return (float) $percentage;
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 missed your update on that comment, I mean the fact that it should just work with a cast. Will double check that
public function getRelativeCoveredCodeMutationScoreIndicator(): float | ||
{ | ||
return $this->getCalculator()->getRelativeCoveredCodeMutationScoreIndicator(); | ||
} |
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.
Is this correct that this isn't used anywhere yet?
Is it going to be reported as a separate metric? It's okay to hide another in this case.
Please explain the idea, goal, what does this PR change, probably some examples. |
@maks-rafalko since not once seem very keen to jump on with #1064, @sanmai proposed to show that "MSI relative to code coverage" first to gauge if it's good enough or not. I however wanted to check that the way this metric was retrieved made sense first before proceeding further |
self::assertHasCoverage($xPath); | ||
$totalCoverage = self::retrieveTotalCoverage($xPath); | ||
|
||
$this->eventDispatcher->dispatch(new TotalLineCodeCoverageWasCalculated($totalCoverage)); |
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 cannot think of a better approach so I guess this'll go. I'm doing something very similar in #1159 FWIW.
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.
in what?
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.
Ah #1153
Replacement for #1066.
@sanmai I would like to double check if you think the approach is alright with you before going further