Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 8 additions & 5 deletions products/tools/cli/automatic-refactoring.md
Original file line number Diff line number Diff line change
Expand Up @@ -89,19 +89,22 @@

### 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 <tools>` | 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 |

Check warning on line 103 in products/tools/cli/automatic-refactoring.md

View workflow job for this annotation

GitHub Actions / Documentation Markdown Linter

MD060

Table columns should be aligned

Check warning on line 103 in products/tools/cli/automatic-refactoring.md

View workflow job for this annotation

GitHub Actions / Documentation Markdown Linter

MD060

Table columns should be aligned
| ------------------- | ------------------------------------------------------------------------------- |

Check warning on line 104 in products/tools/cli/automatic-refactoring.md

View workflow job for this annotation

GitHub Actions / Documentation Markdown Linter

MD060

Table columns should be aligned

Check warning on line 104 in products/tools/cli/automatic-refactoring.md

View workflow job for this annotation

GitHub Actions / Documentation Markdown Linter

MD060

Table columns should be aligned
| `--only <tools>` | Run only the specified comma-separated tools |

Check warning on line 105 in products/tools/cli/automatic-refactoring.md

View workflow job for this annotation

GitHub Actions / Documentation Markdown Linter

MD060

Table columns should be aligned

Check warning on line 105 in products/tools/cli/automatic-refactoring.md

View workflow job for this annotation

GitHub Actions / Documentation Markdown Linter

MD060

Table columns should be aligned
| `--exclude <tools>` | Exclude the specified comma-separated tools after applying `--only` |

Check warning on line 106 in products/tools/cli/automatic-refactoring.md

View workflow job for this annotation

GitHub Actions / Documentation Markdown Linter

MD060

Table columns should be aligned

Check warning on line 106 in products/tools/cli/automatic-refactoring.md

View workflow job for this annotation

GitHub Actions / Documentation Markdown Linter

MD060

Table columns should be aligned
| `--allow-non-git` | Allow the command to run when the extension directory is not a Git repository |

Check warning on line 107 in products/tools/cli/automatic-refactoring.md

View workflow job for this annotation

GitHub Actions / Documentation Markdown Linter

MD060

Table columns should be aligned

Check warning on line 107 in products/tools/cli/automatic-refactoring.md

View workflow job for this annotation

GitHub Actions / Documentation Markdown Linter

MD060

Table columns should be aligned

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.

Expand Down
10 changes: 10 additions & 0 deletions products/tools/cli/formatter.md
Original file line number Diff line number Diff line change
Expand Up @@ -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

<Tabs>
Expand Down
Loading