From ae299332e23a197f0883d7f125196ae25370571d Mon Sep 17 00:00:00 2001 From: "shopware-docs-updater[bot]" <313750211+shopware-docs-updater[bot]@users.noreply.github.com> Date: Mon, 28 Sep 2026 12:18:21 +0000 Subject: [PATCH] docs: document --exclude flag for extension fix and format Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> --- products/tools/cli/automatic-refactoring.md | 13 ++++++++----- products/tools/cli/formatter.md | 10 ++++++++++ 2 files changed, 18 insertions(+), 5 deletions(-) diff --git a/products/tools/cli/automatic-refactoring.md b/products/tools/cli/automatic-refactoring.md index 1809bf4af2..16592553d7 100644 --- a/products/tools/cli/automatic-refactoring.md +++ b/products/tools/cli/automatic-refactoring.md @@ -89,19 +89,22 @@ The extension path is required. ### Select fixers -Use `--only` to run one or more specific fixers: +Use `--only` to run one or more specific fixers, and `--exclude` to remove tools from the selection (applied to the `--only` selection, or to all registered fixers when `--only` is omitted): ```shell shopware-cli extension fix /path/to/your/extension --only rector shopware-cli extension fix /path/to/your/extension --only "rector,eslint,admin-twig" +shopware-cli extension fix /path/to/your/extension --exclude stylelint +shopware-cli extension fix /path/to/your/extension --only "rector,eslint,admin-twig" --exclude eslint ``` Available options: -| Flag | Description | -| ----------------- | ----------------------------------------------------------------------------- | -| `--only ` | Run only the specified comma-separated tools | -| `--allow-non-git` | Allow the command to run when the extension directory is not a Git repository | +| Flag | Description | +| ------------------- | ------------------------------------------------------------------------------- | +| `--only ` | Run only the specified comma-separated tools | +| `--exclude ` | Exclude the specified comma-separated tools after applying `--only` | +| `--allow-non-git` | Allow the command to run when the extension directory is not a Git repository | For `extension fix`, the extension directory itself must contain `.git`; being inside a parent Git-managed Shopware project is not sufficient. Use `--allow-non-git` when you intentionally want to fix such an extension. `project fix` checks the project root instead. diff --git a/products/tools/cli/formatter.md b/products/tools/cli/formatter.md index eabd21d314..ed7ef5d790 100644 --- a/products/tools/cli/formatter.md +++ b/products/tools/cli/formatter.md @@ -70,6 +70,16 @@ shopware-cli extension format /path/to/your/extension --dry-run The extension path is required. +### Select formatters + +Use `--only` to run one or more specific formatters, and `--exclude` to remove tools from the selection (applied to the `--only` selection, or to all registered formatters when `--only` is omitted): + +```shell +shopware-cli extension format /path/to/your/extension --only php-cs-fixer +shopware-cli extension format /path/to/your/extension --exclude prettier +shopware-cli extension format /path/to/your/extension --only "php-cs-fixer,prettier" --exclude prettier +``` + ## Format a project