From 9028df98c08f2406e209d41073beb6e8e1ebed0c Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Wed, 18 Mar 2026 01:08:05 +0000 Subject: [PATCH] docs: document configSearch setting and standard variable substitution - Add phpcbf.configSearch to the Extension Settings list with a clear description of its auto-discovery behaviour - Update phpcbf.configSearch entry in the default-settings JSON block - Expand the phpcbf.standard entry to show , , and ~/... are supported in the path Closes #17 Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> --- README.md | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 86b5473..25f3321 100644 --- a/README.md +++ b/README.md @@ -35,7 +35,11 @@ This extension has the following settings: * `phpcbf.documentFormattingProvider`: [ Optional | Default: `true` ] Register PHP document formatting provider, right mouse-click context menu, select 'Format Document' * `phpcbf.onsave`: [ Optional | Default: `false` ]. Format on save. `"editor.formatOnSave": true` will override this setting. * `phpcbf.debug`: [ Optional | Default: `false` ]. Write phpcbf stdout to the console. -* `phpcbf.standard`: [ Optional | Default: `null` ]. The [coding standard](#coding-standards). +* `phpcbf.standard`: [ Optional | Default: `null` ]. The [coding standard](#coding-standards). Supports variable substitution: + * `${workspaceFolder}/phpcs.xml` + * `${workspaceRoot}/phpcs.xml` (deprecated alias for `${workspaceFolder}`) + * `~/standards/MyStandard` +* `phpcbf.configSearch`: [ Optional | Default: `false` ]. When `true`, automatically searches the file's directory and parent directories (up to the workspace root) for a phpcs configuration file (`.phpcs.xml`, `phpcs.xml`, `phpcs.xml.dist`, etc.) and uses it as the coding standard. This is useful when different sub-projects within a workspace use different standards. The default settings are @@ -46,7 +50,8 @@ The default settings are "phpcbf.executablePath": "phpcbf", "phpcbf.documentFormattingProvider": true, "phpcbf.onsave": false, - "phpcbf.standard": null + "phpcbf.standard": null, + "phpcbf.configSearch": false } ```