We could use the logic similar to the check of fs.exists(tmpExecutablePath) to check a few reasonable default locations, so that less configuration is necessary to run the extension.
For example, a typical place for the executable to be found is ${workspaceFolder}/vendor/bin/phpcbf and we could find that if no executablePath setting is set.
Additionally, if no standard is set, we could check for the existance of phpcs.xml and phpcs.xml.dist in the workspaceFolder, as these are standard names according to phpcs documentation.
We could use the logic similar to the check of
fs.exists(tmpExecutablePath)
to check a few reasonable default locations, so that less configuration is necessary to run the extension.For example, a typical place for the executable to be found is
${workspaceFolder}/vendor/bin/phpcbf
and we could find that if no executablePath setting is set.Additionally, if no standard is set, we could check for the existance of
phpcs.xml
andphpcs.xml.dist
in the workspaceFolder, as these are standard names according to phpcs documentation.