You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
After updating PHPStan to the latest version (0.11), errors in files being edited stopped being reported via ALE.
Doing some digging, I've found it's due to ale#semver#GetVersion receiving 'PHPStan - PHP Static Analysis Tool 0.11 as the input string - note that the implicit minor version of 0 is not present (I was previously on 0.10.3 or something). As a result, the parsing fails and use of the version in the actual linter fails causing a bunch of cascading problems resulting in the linter not running.
In practice, this is actually the package's fault for not correctly tagging the x.y.0 release and should fix itself in the next release. I'll ping the maintainers of phpstan to let them know about this as well.
However, I think it would be reasonable to adjust the semver parser to also look for x.y and, if found, return [x, y, 0] - this should be fairly safe since only linters that are using semver-based tools are likely to be using the version parser in the first place. If you think this is a decent solution, I am happy to submit a patch which I already have working locally and can confirm fixes the immediate issue. Let me know how you think is best to proceed!
The text was updated successfully, but these errors were encountered:
phpstan didn't follow the spec, because you must always write .0 for a patch version, but I'll implement this anyway, because real things don't follow specs.
Information
VIM version
VIM - Vi IMproved 8.0 (2016 Sep 12, compiled Aug 17 2018 15:22:29)
Included patches: 1-503, 505-680, 682-1283
Operating System: macOS 10.14
ALE @ d1fc084
What went wrong
After updating PHPStan to the latest version (0.11), errors in files being edited stopped being reported via ALE.
Doing some digging, I've found it's due to
ale#semver#GetVersion
receiving'PHPStan - PHP Static Analysis Tool 0.11
as the input string - note that the implicit minor version of 0 is not present (I was previously on0.10.3
or something). As a result, the parsing fails and use of the version in the actual linter fails causing a bunch of cascading problems resulting in the linter not running.In practice, this is actually the package's fault for not correctly tagging the
x.y.0
release and should fix itself in the next release. I'll ping the maintainers of phpstan to let them know about this as well.However, I think it would be reasonable to adjust the semver parser to also look for
x.y
and, if found, return[x, y, 0]
- this should be fairly safe since only linters that are using semver-based tools are likely to be using the version parser in the first place. If you think this is a decent solution, I am happy to submit a patch which I already have working locally and can confirm fixes the immediate issue. Let me know how you think is best to proceed!The text was updated successfully, but these errors were encountered: