Closed zeroSal closed 2 months ago
Hmm I'm not sure if this really is something I should add to the extension. I don't really see any other linting-related extensions doing this. But maybe this is useful for users that have check-on-save turned off. Is that the case for you or do you just want an easy way to trigger it manually apart from the command bar?
I have the check-on-save turned on, but working with PHP CS-Fixer, sometimes, PHPStan (your extension) marks as wrong the incorrect line number as PHP CS-Fixer fixed the code style after the PHPStan linting.
Ahh yeah that's a tough problem. I guess not really something I can fix from within the extension though. I think there may be some extensions out there for manually determining the order of such commands. Then you can manually set up the flow of format first then check.
I think generally though the Scan project for errors
command should be sufficient no? Otherwise there may very well be an extension that adds a programmable button to the editor actions field or to the status bar. I think that this is maybe a bit too specific of a case to really build generic support for it into the extension.
It makes sense. Thanks for having replied ;)
Implement an editor code action that executes the "Scan project for errors" command. Editor actions reference: https://code.visualstudio.com/api/ux-guidelines/editor-actions
Editor action example:![image](https://github.com/SanderRonde/phpstan-vscode/assets/38191926/f154c741-1aaa-456f-9b72-8bfba3422157)