定制 alanwillms/php-hound 二次开发

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

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

alanwillms/php-hound

最新稳定版本:0.7.1

Composer 安装命令:

composer require alanwillms/php-hound

包简介

Runs a set of quality assurance tools for PHP.

README 文档

README

Build Status Code Climate Scrutinizer Code Quality Test Coverage Packagist Version Total Downloads

This is a work in progress!

PHP Hound runs a set of quality assurance tools for PHP and reduce results to a single beautiful report.

It currently supports:

HTML index page example

Installation

PHP Hound can be installed through Composer.

Local installation

To install it locally, run the following command:

composer require alanwillms/php-hound

Then you can execute PHP Hound by running ./vendor/bin/php-hound.

Global installation

You can install PHP Hound globally with:

composer global require alanwillms/php-hound

Then you can add ~/.composer/bin directory to your PATH, so you can simply type php-hound to run it from anywhere. If you want to do this, add the following to your ~/.profile (or ~/.bashrc) file:

export PATH="$HOME/.composer/vendor/bin:$PATH"

If you want to apply the changes to your current terminal session, run source ~/.profile (or source ~/bashrc).

Command line usage

Basic usage:

# Analyze current directory files
php-hound

# Analyze "informed/directory/" files
php-hound informed/directory/

# Analyze "script.php" file
php-hound script.php

You can run php-hound --help to display a list of all available options.

php-hound [optional arguments] [path to be analysed]

Optional Arguments:
	-f format, --format format (default: text)
		Output format
	-h, --help
		Prints a usage statement
	-i ignore, --ignore ignore (default: vendor,tests,features,spec)
		Ignore a comma-separated list of directories
	-v, --version
		Prints installed version

Gradually fix legacy code

If you have a huge base of legacy code, it's really hard to fix all code issues at the same time, in a single commit.

PHP Hound helps you to gradually fix your code by only warning about issues found in the files and lines touched by a branch or commit. All other files or lines will be ignored.

That's pretty easy to achieve:

# Usage:
# php-hound --git-diff <commits or branches to compare> <target directory>

# Only return issues found on lines and files changed on the "windows10" branch:
php-hound --git-diff master..windows10 /path/to/git/repo

# Only return issues found on lines and files changed between two commits
php-hound --git-diff b28a1df..4fff883 /path/to/git/repo

统计信息

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

GitHub 信息

  • Stars: 10
  • Watchers: 4
  • Forks: 4
  • 开发语言: PHP

其他信息

  • 授权协议: Unknown
  • 更新时间: 2015-08-07

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固