Skip to content
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

Draft
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

theofidry
Copy link
Member

Replacement for #1066.

@sanmai I would like to double check if you think the approach is alright with you before going further


$percentage = (float) $percentage;

return $percentage;
Copy link
Member

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;

Copy link
Member Author

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();
}
Copy link
Member

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.

@maks-rafalko
Copy link
Member

Please explain the idea, goal, what does this PR change, probably some examples.

@theofidry
Copy link
Member Author

@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));
Copy link
Member

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.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

in what?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ah #1153

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants