phpstan-baseline-analysis icon indicating copy to clipboard operation
phpstan-baseline-analysis copied to clipboard

Use error identifiers from baseline (1.11)

Open ruudk opened this issue 1 year ago • 3 comments

In the upcoming PHPStan 1.11 we'll see // identifier: comments. Could this be useful to further analyze the baseline?

https://github.com/phpstan/phpstan-src/commit/4b32cac2d1b98c6af65c07041fdbc64e5d3f3baf

ruudk avatar Oct 31 '23 08:10 ruudk

I thought about that. It will definitely have an impact on this lib and its feature set.

Some things which are currently build here will be possible natively in a similar way.

I am open for discussion

staabm avatar Oct 31 '23 09:10 staabm

The reason why I brought it up was that I just tried this package and got this result:

Analyzing phpstan-baseline.php
  Date: Tue, 31 Oct 2023 08:45:30 +0000
  Overall-Errors: 11957
  Classes-Cognitive-Complexity: 0
  Deprecations: 299
  Invalid-Phpdocs: 66
  Unknown-Types: 39
  Anonymous-Variables: 0
  Native-Property-Type-Coverage: 0
  Native-Param-Type-Coverage: 0
  Native-Return-Type-Coverage: 0
  Unused-Symbols: 0

Not very helpful as everything is marked as Overall-Errors. 😅 I hope that error identifiers will improve this list.

ruudk avatar Oct 31 '23 09:10 ruudk

it depends on the rules you use. atm we count only those errors emitted by the rules mentioned in the readme.

but I agree, we could aggregate errors by native identifiers

staabm avatar Oct 31 '23 09:10 staabm