Closed ObliviousHarmony closed 1 year ago
It's worth pointing out that the README.md
file already explicitly says it will resolve from the workspace root. It's clear that this behavior wasn't even documented.
It would also probably be a good idea to provide an error if the custom standard file being referenced does not exist.
Description
When
phpCodeSniffer.autoExecutable
is enabled, the extension will infer the working directory ofphpcs
based on how it executes the linter. It will be set to the directory containing thecomposer.json
it found thephpcs
executable in, otherwise, it will fall back to the workspace root.Since the path in
phpCodeSniffer.standardCustom
can be relative, we can easily leave users confused about why their standard isn't working like they expect it to.Expected Behavior
The working directory should be consistent so that standards will not be relative.