Download the PHP package rednaxe/project-quality-inspector without Composer
On this page you can find all versions of the php package rednaxe/project-quality-inspector. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download rednaxe/project-quality-inspector
More information about rednaxe/project-quality-inspector
Files in rednaxe/project-quality-inspector
Package project-quality-inspector
Short Description Project Quality Inspector provides a pqi command which checks Projects good practices thanks to customisable rules
License MIT
Homepage https://github.com/rednaxe/project-quality-inspector
Informations about the package project-quality-inspector
Project Quality Inspector
ProjectQualityInspector is a PHP script pqi
which checks project custom good practices.
This generic quality checking tool will check your projects through various configurable rules.
This tool is for you if you want to check in your project if :
- a file or directory (or a pathname pattern) should exist, or should not exist
- a composer package should exist, or should not exist
- a composer package version should not be wildcarded ...
Requirements
ProjectQualityInspector requires PHP version 5.6 or greater
Installation
You can install the component in 2 different ways:
- Install it via Composer (
rednaxe/project-quality-inspector
on Packagist);
Simply add a (development-time) dependency on rednaxe/project-quality-inspector
to your project's composer.json
file if you use Composer to manage the dependencies of your project:
- Use the official Git repository (https://github.com/rednaxe/project-quality-inspector).
You will need a recent git version (at least >=2.7.0) to use git rule.
Usage
First, you have to create a pqi.yml configuration file in your project. If there is no configuration file in current directory, by default the example pqi.yml will be used.
The first level of configuration is up to you. When you will run the command, you have to specify the section in configuration file, for example :
For Symfony 2.*, you will have to add run
key like this :
You can use -c
or --configFile
, and -b
or --baseDir
options to respectively change the configuration file, and the inspection base directory :
You can use -j
or --junitFile
to generate a JUnit file :
You can use multiple -r
or --rules
to select rules to load :
You can also add a common
section, which will be always merged to the selected section :
Rules
A rule is loaded when the rule key is present in configuration. Here is a list of existing rules, and possible configurations :
-
files-rule config example:
-
composer-config-rule config example:
- git-rule
When we have more git branches than developers in a project, it's sometimes difficult to avoid merge conflicts. Then when it's time to build a package, it's generally too late to rebase, merge or clean each branch individually. In order to prevent any risk of unnecessary conflicts, this rule helps you to detect :
- large number of already merged branches (and suggests you to delete thoses branches)
- branches that should be updated because there is too much new commits in stable branch
- branches that should be updated because there is too days of work in stable branch
You will need a recent git version (at least >=2.7.0) to use git rule.
config example:
TODO
- Creating PHP Archive PHP Archive (PHAR)
- Tests
- composer-config-rule: disallow-wildcard-versioning > add current installed version in error message to facilitate explicit versioning correction
- composer-config-rule: check if there is a lot of updates to do, and if there is outdated packages installed
- curl-rule : create a curl rule which will be able to make requests and checks responses, headers, etc...
- add time in jUnit generated file content
- Add notice / alert level concept for expectations in each rule config
- Add link to CONTRIBUTING.md file which explain how to easily develop new rule
- Find more rules ;)
All versions of project-quality-inspector with dependencies
ext-dom Version *
symfony/console Version ~2.7 || ~3.0
symfony/yaml Version ~2.7 || ~3.0
composer/semver Version ^1.4.2
guzzlehttp/guzzle Version ^6.3.0