php yml,grumphp.yml

本文详细介绍了使用grumphp工具来规范Git的提交信息,包括不允许空消息、首字母大写、禁止句尾标点等规则。同时,配置了PHP CS Fixer进行代码风格检查,遵循PSR2标准,对错误和警告级别进行了设置,并针对特定目录进行了忽略。此外,还定义了触发检查的文件类型和关键词黑名单。
摘要由CSDN通过智能技术生成

grumphp:

tasks:

git_commit_message:

allow_empty_message: false

enforce_capitalized_subject: false

enforce_no_subject_trailing_period: true

enforce_no_subject_punctuations: false

enforce_single_lined_subject: true

type_scope_conventions:

- types:

- api

- build

- chore

- refact

- revert

- feat

- tests

- docs

- style

- ci

- ui

- scaff

- perf

- fix

- wip

- scopes: []

max_body_width: 0

max_subject_width: 72

case_insensitive: false

multiline: true

additional_modifiers: ''

phpcs:

standard: PSR2

severity: ~

error_severity: ~

warning_severity: ~

tab_width: ~

whitelist_patterns:

- /^src\/(.*)/

encoding: ~

ignore_patterns:

- /^vendor\/(.*)/

- /^database\/(.*)/

- /^routes\/(.*)/

sniffs: []

triggered_by: [php]

git_blacklist:

# todo: Apparently keywords are not words but rather contains

# e.g. `->add()` will be seen as `dd(`

# This is assumed an issue that probably should be opened with GrumPHP

keywords:

- "die("

- "var_dump("

- "exit;"

# - "exit("

# - "dd("

whitelist_patterns:

- /^database\/(.*)/

- /^routes\/(.*)/

- /^tests\/(.*)/

triggered_by: ['php']

regexp_type: G

ascii: ~

一键复制

编辑

Web IDE

原始数据

按行查看

历史

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值