定制 bitexpert/captainhook-infection 二次开发

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

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

bitexpert/captainhook-infection

最新稳定版本:v0.7.0

Composer 安装命令:

composer require bitexpert/captainhook-infection

包简介

Captain Hook Plugin to run InfectionPHP only against the files of the current changeset

README 文档

README

This package provides an action for Captain Hook which will invoke InfectionPHP for all changed files of a commit. Running Infection only against the changed files will result in a faster execution of Infection which is ideal when running it as a pre-commit hook.

Build Status Coverage Status Mastodon Follow

Installation

The preferred way of installing bitexpert/captainhook-infection is through Composer. You can add bitexpert/captainhook-infection as a dev dependency, as follows:

composer.phar require --dev bitexpert/captainhook-infection

Usage

Add the following code to your captainhook.json configuration file:

{
  "pre-commit": {
    "enabled": true,
    "actions": [
      {
        "action": "\\bitExpert\\CaptainHook\\Infection\\InfectionAction"
      }
    ]
  }
}

By default, the action will invoke ./vendor/bin/infection as a command. If you need to customize the path, e.g. because you installed the .phar distribution you can do so by passing a infection configuration option to the action.

{
  "pre-commit": {
    "enabled": true,
    "actions": [
      {
        "action": "\\bitExpert\\CaptainHook\\Infection\\InfectionAction",
        "options": {
            "infection": "php infection.phar"
        }
      }
    ]
  }
}

To pass additional parameters to Infection, e.g. to define the number of threads used by Infection, supply an args array option like this:

{
  "pre-commit": {
    "enabled": true,
    "actions": [
      {
        "action": "\\bitExpert\\CaptainHook\\Infection\\InfectionAction",
        "options": {
            "args": [
                "-j4"
            ]
        }
      }
    ]
  }
}

Contribute

Please feel free to fork and extend existing or add new features and send a pull request with your changes! To establish a consistent code quality, please provide unit tests for all your changes and adapt the documentation.

Want To Contribute?

If you feel that you have something to share, then we’d love to have you. Check out the contributing guide to find out how, as well as what we expect from you.

License

Captain Hook Infection Action is released under the Apache 2.0 license.

统计信息

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

GitHub 信息

  • Stars: 11
  • Watchers: 2
  • Forks: 3
  • 开发语言: PHP

其他信息

  • 授权协议: Apache-2.0
  • 更新时间: 2021-01-30

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固