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

phpcbf.standard doesn't allow relative paths or ${workspaceFolder} #38

Open danieliser opened 3 years ago

danieliser commented 3 years ago

The following inside a .code-workspace doesn't work.

{
        "phpcs.standard": "./ruleset.xml",
        "phpcbf.debug": true,
        "phpcbf.standard": "./ruleset.xml",
}

PHPCS does properly resolve the path to ruleset.xml, but unless we explicitly set the full path from / or ~/ then it fails to resolve.

If we comment it out we hoped it would automatically resolve to the ruleset in the files parent folder like the CLI but that doesn't appear to happen either.

When we comment out the phpcbf.standard line it uses the global default which has none of our custom fixes included.

Since we are trying to make a reusable environment for our team hard coded paths don't seem like a viable solution unless we enforce all team members add the folder to the same place on their drives which is insane.

I would have thought it would resolve ${workspaceFolder} in the path but that also doesn't seem to work.

I see several PR's that seem like they could ~maybe~ be vaguely related, but none seemed to really address this particular concern.