soderlind / vscode-phpcbf

PHP Code Beautifier and Fixer for Visual Studio Code
https://marketplace.visualstudio.com/items?itemName=persoderlind.vscode-phpcbf
GNU General Public License v3.0
28 stars 10 forks source link

Feature phpcs xml and pathfix #30

Closed benallfree closed 2 years ago

benallfree commented 5 years ago

This PR fixes 3 things:

  1. Integrates PR #29

  2. Fixes a bug where phpcbf.standard was not resolving paths correctly

  3. Fixes #21. Exec path needs to be set to the project root so it can correctly search for installed_paths via phpcs --config-set installed_paths <path/to/custom/coding/standard>

dossy commented 4 years ago

What's the reason for the temporary file? If this VSCode extension just operated on the PHP file in-place, the phpcbf script automatically looks for and navigates up parent directories looking for a series of phpcs.xml-like filenames and uses the first one it finds ... the whole temp file thing breaks this very elegant mechanism.