laravel/pint

Support wildcard in directory exclusion rules

クローズ

#372 opened on 2025/05/26

 (1 件のコメント) (0 件のリアクション) (0 人の担当者)PHP (189 件のフォーク)user submission
help wanted

Repository metrics

Stars
 (3,127 個のスター)
PR merge metrics
 (平均マージ 2d 1h) (30d で 12 merged PRs)

説明

Pint Version

1.22.1

PHP Version

8.4

Description

I have a large project, organized by modules with similar structures. Something like:

modules
    - admin
    - backoffice
    - frontoffice
    - ...    

If I want to exclude directories from all modules (e.g. tests) I have to explicitly name each of them in pint.json:

"exclude": [
    "modules/admin/tests",
    "modules/backoffice/tests",
    "modules/frontoffice/tests",
    ...
]

Would be great if I could just use a wildcard:

"exclude": [
    "modules/*/tests",
    ...
]

Plus, if I add a new module I always have to remember to add it to the config.

Steps To Reproduce

Have a project as described above.

コントリビューターガイド