定制 421p/php-quality-tool-cli 二次开发

按需修改功能、优化性能、对接业务系统,提供一站式技术支持

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

421p/php-quality-tool-cli

Composer 安装命令:

composer require 421p/php-quality-tool-cli

包简介

Smart Gamma PHP Cli Quality Tool

README 文档

README

The interactive tool will allow project's team to keep common development code style standards based on pre-commit git hook

The tool allows automaticly add git pre-commit hook to local dev machine and runs set of quality assertions:

  • PHPLint
  • PHPCS
  • php-cs-fixer
  • PHPMD
  • PhpSpec
  • PhpUnit (TODO)
  • Commit message has Jira feature number i.e AB-123 (TODO)

As additional feature it allows use php-cs-fixer with auto fix of commited files

Install

composer require --dev 421p/php-quality-tool-cli

Usage

vendor/bin/quality

Available options:

--config-folder # Folder that contains config file.
--config-file # Name of config file.
--no-commit-autofixed # Disables adding autofixed files to commit

Configuration

Config example

# config.yml

phpmd: true
lint: true
phpcs: true
phpcs_standard: PSR2
phpfixer: true
phpfixer_standard: Symfony
phpspec: false
self_fix: true
exclude_dirs: /app/bin

PHPCS & php-cs-fixer

Will initiate assertions and if violations in code style will be found in the files applied in commit it will prompt to autofix these violations and rescan files. Autofixed files will be automaticly added to the latest commit if no --no-commit-autofixed option is submitted.

PHPMD

The tool will scan PhpMD warning, but won't block the commit, but will output the list and prompt to rescan your commited file if you want to fix via IDE some indicated warnings.

Docker

Option --no-commit-autofixed is useful when quality tool is invoked by git hook but running inside docker container Otherwise, 2 git processes may conflict.

统计信息

  • 总下载量: 21
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 0
  • 点击次数: 1
  • 依赖项目数: 0
  • 推荐数: 0

GitHub 信息

  • Stars: 0
  • Watchers: 1
  • Forks: 2
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2018-08-23

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固