承接 mi-schi/php-code-checker 相关项目开发

从需求分析到上线部署,全程专人跟进,保证项目质量与交付效率

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

mi-schi/php-code-checker

Composer 安装命令:

composer require mi-schi/php-code-checker

包简介

Execute the tests and check the php code

README 文档

README

Software License Latest Stable Version Total Downloads

Features

Check your php project code with

and create metrics with

This script is a better alternative to configure ant on your jenkins. The python script is more flexible and can also be used on your local dev machine. You can define all settings in the composer.json in your project, but you don't have to. The scripts also supports exclusion of multiple folders.

The scripts are tested with Python 2.6 and Python 3.5.

Installation

Via git:

git clone git@github.com:mi-schi/php-code-checker.git

Via composer:

composer require mi-schi/php-code-checker

Usage

Use python to execute the script in the project folder:

checker.py all
checker.py check
checker.py metric

The all argument executes the check and metric argument. You can set the second argument as project path:

checker.py all /path/to/your/project
checker.py all relative/path

If you want to execute tests with coverage, regardless your configuration, then use the checker.py coverage argument. You can update all internal dependencies with update.py path/to/php.

Configuration

The configuration is simple. Just look in the default_configuration.json for usage. Add an extra property to the composer.json in your project and overwrite the default configuration if you want. The php-code-checker comes with its own dependencies for phpunit, phpcs and so on. If you want to use another phpunit, you can define the bin-dir property and add phpunit in your composer requirements. If php-code-checker find path/to/your/project/bin/phpunit then this binary will be used. Otherwise your tests were executed with the phpunit version which comes with php-code-checker.

Jenkins integration

There is a huge configuration to process all these reports on Jenkins. First you have to install the following plugins:

Also useful:

Then, create a new empty job called default-job. Copy the default-jenkins-config.xml to /var/lib/jenkins/jobs/default-job/config.xml on your Jenkins. That's it! Append the configuration and copy default-job from now on.

统计信息

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

GitHub 信息

  • Stars: 6
  • Watchers: 1
  • Forks: 2
  • 开发语言: Python

其他信息

  • 授权协议: Unknown
  • 更新时间: 2015-12-25