noisivlagel/quality-tools 问题修复 & 功能扩展

解决BUG、新增功能、兼容多环境部署,快速响应你的开发需求

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

noisivlagel/quality-tools

Composer 安装命令:

composer require noisivlagel/quality-tools

包简介

CodeSniffer And Grumphp.

README 文档

README

Table of contents

Requirements

How to install

composer require noisivlagel/quality-tools --dev

How to use

Enabling the rules

Add it to your project phpcs.xml or phpcs.xml.dist ruleset:

<?xml version="1.0"?>
<ruleset>
    <arg name="basepath" value="."/>

    <file>./src</file>
    <file>./tests</file>

    <rule ref="./vendor/noisivlagel/quality-tools/ruleset.xml"/>
</ruleset>

Sniffing code

The following commands can be added to the scripts section of your composer.json file to check and fix invalid code. Some optional checks are also included to illustrate how they might work together to check all your code.

{
    "scripts": {
        "composer-validate": "@composer validate --no-check-all --strict",
        "codesniffer-check": "vendor/bin/phpcs --runtime-set ignore_errors_on_exit 1 --runtime-set ignore_warnings_on_exit 1",
        "codesniffer-fix": "vendor/bin/phpcbf --runtime-set ignore_errors_on_exit 1 --runtime-set ignore_warnings_on_exit 1 || exit 0",
        "test": "vendor/bin/phpunit",
        "check": [
            "@composer-validate",
            "@codesniffer-check",
            "@test"
        ]
    }
}

GrumPHP

Grumphp is a tool that can add a pre-commit hook to test different rules : https://github.com/phpro/grumphp

We check for :

Sniffing code in PHPStorm

See PHP Code Sniffer in PhpStorm on how to set up CodeSniffer in PHPStorm.

Change log

Please see CHANGELOG for more information what has changed recently.

统计信息

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

GitHub 信息

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

其他信息

  • 授权协议: MIT
  • 更新时间: 2021-08-24

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固