psalm-strict-equality
psalm-strict-equality copied to clipboard
Additional auto fixables
- extends list of auto-fixable array/object types
- auto-fix Unions where one side is string/union of strings
- add generic equal class auto-fixables
- auto-fix Unions where both sides contain only 1 atomic (sub)type
- make docblock usage configurable via psalm config
Fix: https://github.com/orklah/psalm-strict-equality/issues/3
Fix https://github.com/orklah/psalm-strict-equality/issues/6 now too (except for lists? since we kind of expect lists to have the same ordering, that's the whole reason why list is used, isn't it?)
@orklah if you have a few mins I'd really appreciate some feedback on this
Yeah sorry, it's on my list, I'll get to it soon
Oh. I just realized you didn't see my first round of comments because I didn't publish them :( sorry. I thought you responded to it earlier but it was just a response to my new issue.
You'll see duplicate comments or outdated comments, you can resolve them directly
Changed various things to handle more common cases and excluded things that won't work.
Overall works quite well, feedback appreciated so this can get merged eventually
It's really became a complex piece of code. I'd be way more at ease if we could make some kind of automated check that everything is correct. Not necessarily a whole test suite, but some script we can run to check whether the plugin is doing its job
I can add that eventually and merge it then, for now could you please merge https://github.com/orklah/psalm-strict-equality/pull/7 and release so the existing plugin can be used as is with psalm v5 at least?
Done! Make sure to report any error while running it, the lack of tests on those plugins makes this kind of change random :p