Skip to content

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

@danieliser

Description

@danieliser

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions