Phpstan: Do not consider "Ignored error pattern" as errors

Created on 11 May 2020  路  3Comments  路  Source: phpstan/phpstan

Feature request

We are using phpstan in our codebase, and thanks to the baseline feature we're able to use it right away, this is awesome. So while we're preventing more buggy code to go into production, we are also fixing in the background the errors contained in the baseline.

The problem arises when we have fixed the errors, and then phpstan recognises those as "Ignored error pattern ... " (as they are in the baseline, but not present in the codebase anymore). This can be solved by re-generating the baseline, but due to the size of our codebase that takes a considerable amount of time and is a task we will have to do very often.

So I was wondering if you would be interested in having an extra configuration option to not consider those ignored error pattern as errors. If so, I am happy to try an implementation and create a PR. What do you think?

Thanks and keep up the good work.

Most helpful comment

All 3 comments

Hi, do you mean this https://phpstan.org/user-guide/ignoring-errors#reporting-unused-ignores by any chance?

Awesome, yes! I was looking for it in the baseline section. Thanks!

Was this page helpful?
0 / 5 - 0 ratings