feat: add option to report ignores without comments#3976
feat: add option to report ignores without comments#3976calebdw wants to merge 1 commit intophpstan:2.1.xfrom
Conversation
94bcb68 to
47d8329
Compare
|
CI failures look to be unrelated |
384c8af to
0475ff1
Compare
|
Thanks for providing this & also picking up the case for no comments 🙌 |
0475ff1 to
a63175b
Compare
e976b0d to
8e4e5f8
Compare
8e4e5f8 to
2a4b464
Compare
ae45feb to
3b7dc03
Compare
3b7dc03 to
3154768
Compare
3154768 to
e36cd48
Compare
e36cd48 to
eb04e1d
Compare
f6aba44 to
db2e46f
Compare
|
I'm thinking about deprecating We'd have to add a support for new comment As for |
|
Sounds good---I'll update
That's good---however, consider adding an option to enable/disable this when the new comment is added. Some projects may want to complete disable this and not allow such a global ignore |
db2e46f to
b1cedbf
Compare
1d62fec to
5dd8312
Compare
A deprecation would also work for me. I want to rid my codebases of those annotations, so as long as an error pops up if one of the old annotations is used, I'm happy. ✌🏻 |
|
@ondrejmirtes, this is ready for review 👍 |
This feel like a very special/opinionated rules which might make more sens in a dedicated repository or just in your personal project IMHO. And there is already some way to achieve this like using PHP-CS-Fixer Certainly the same could exist with PHP CodeSniffer or Rector or any linter. I personally think the same about |
124320a to
ec940ab
Compare
ec940ab to
3195405
Compare
d297b1b to
ed3c1c9
Compare
ed3c1c9 to
514ee6a
Compare
Hello!
Closes phpstan/phpstan#11340
This PR adds the following two option (false by default):
reportIgnoresWithoutIdentifiers: reports@phpstan-ignore-lineand@phpstan-ignore-next-lineusagesreportIgnoresWithoutComments: reports@phpstan-ignoreusages without commentsThanks!