laravel/pint

Support wildcard in directory exclusion rules

已关闭

#372 创建于 2025年5月26日

 (1 条评论) (0 个反应) (0 位负责人)PHP (189 个派生)user submission
help wanted

仓库指标

星标
 (3,127 个星标)
PR 合并指标
 (平均合并 2天 1小时) (30 天内合并 12 个 PR)

描述

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.

贡献者指南