ObliviousHarmony / vscode-php-codesniffer

A VS Code extension for integrating PHP_CodeSniffer.
https://marketplace.visualstudio.com/items?itemName=obliviousharmony.vscode-php-codesniffer
Other
40 stars 2 forks source link

Auto format on save #74

Closed BWBama85 closed 1 year ago

BWBama85 commented 1 year ago

Problem Description

A clear and concise description of what the problem is. Ex. I'm always frustrated when [...] First off, thank you for putting in the time to provide an updated sniffer for VSCode. I come from PHP Sniffer & Beautifier and I mostly want to make sure that I have things set up correctly.

With PHP Sniffer & Beautifier, I could set it so that it would format the document when I saved the file. I notice with your extension, there is a setting to change the Lint Action.

From what I can tell, this only runs the Linter to check if there are issues with the code and does not format the code.

1) Is there a feature I am missing here that will automatically format the code when I save the file? 2) If not, can this feature be added.

Proposed Solution

When I save the file, I would like the document to format and fix issues that it can.

ObliviousHarmony commented 1 year ago

Hi @BWBama85,

This is a duplicate of https://github.com/ObliviousHarmony/vscode-php-codesniffer/issues/41.

I avoided adding this as a feature because it is something that VS Code already supports natively.