sea level errors per file
Closed this issue · 3 comments
atm the sea level is determined across the whole project.
the result of the check looks like
------ ---------------------------------------------------------------------------------------------------------
Line N/A
------ ---------------------------------------------------------------------------------------------------------
-1 Out of 1295 possible param types, only 57 % actually have it. Add more param types to get over 99 %
-1 Out of 1582 possible return types, only 32 % actually have it. Add more return types to get over 99 %
-1 Out of 873 possible property types, only 0 % actually have it. Add more property types to get over 99 %
------ ---------------------------------------------------------------------------------------------------------
wouldn't it make more sense to report this error per file (like we do with the complexity rules)?
that way it would also be easier to define share the rule settings across projects, as the configuration would say somethink like "each file must have a type coverage of X percent". atm the error gives us a error like "the whole project has X percent type coverage".
I am not sure either which of these 2 results would be better.. just opening for discussion
This is a collector rule with single metric, not a detailed rule.
I want to keep it simple with one value in the end.
Just fyi:
Yes, I'm aware. The report here is a similar to test coverage, single generic metric.
You could go for full list of files and places that could be improved as well, but that's already covered by PHPStan "missing type" rules.