Skip to content

Commit 219b390

Browse files
committed
Add overview section and separate init and analyze commands
1 parent 8145edd commit 219b390

File tree

1 file changed

+40
-35
lines changed

1 file changed

+40
-35
lines changed

README.md

Lines changed: 40 additions & 35 deletions
Original file line numberDiff line numberDiff line change
@@ -1,59 +1,64 @@
1+
PHPQA
2+
=============================================
3+
PHPQA Analyzer CLI tool
4+
15
<!-- START doctoc generated TOC please keep comment here to allow auto update -->
26
<!-- DON'T EDIT THIS SECTION, INSTEAD RE-RUN doctoc TO UPDATE -->
37

4-
- [PHPQA](#phpqa)
5-
- [Based on:](#based-on)
6-
- [Install Stand Alone](#install-stand-alone)
7-
- [Clone project](#clone-project)
8-
- [Install dependencies](#install-dependencies)
9-
- [Create symbolink link](#create-symbolink-link)
10-
- [Include in your project](#include-in-your-project)
11-
- [How to run this project](#how-to-run-this-project)
8+
- [Overview](#overview)
9+
- [Install Stand Alone](#install-stand-alone)
10+
- [Clone project](#clone-project)
11+
- [Install dependencies](#install-dependencies)
12+
- [Create symbolink link](#create-symbolink-link)
13+
- [Include in your project](#include-in-your-project)
14+
- [How to run this project](#how-to-run-this-project)
1215

1316
<!-- END doctoc generated TOC please keep comment here to allow auto update -->
1417

15-
PHPQA
16-
=============================================
17-
PHPQA Analyzer CLI tool
18+
## Overview
19+
This project aims to serve as a CLI tool to unify the use of different PHP tools related to Quality Assurance and code analysis in PHP.
1820

19-
## Based on:
20-
http://carlosbuenosvinos.com/write-your-git-hooks-in-php-and-keep-them-under-git-control/
21-
http://phpqatools.org/
21+
Every analyzer tool handles arguments and options using different formats, the goal of this project is to provide and single way to interact with those projects, you can also set options and arguments using the default configuration file the project supports.
2222

23-
## Install Stand Alone
23+
> This project was originally developed as part of [Drupal Console](https://github.com/hechoendrupal/DrupalConsole) and based on the blog post [Write your git hooks in PHP and keep them under git control](http://carlosbuenosvinos.com/write-your-git-hooks-in-php-and-keep-them-under-git-control/).
2424
25-
### Clone project
25+
## Install
2626

27-
```
27+
### Cloning the project
28+
```bash
2829
$ cd ~
2930
$ git clone git@github.com:jmolivas/phpqa.git
30-
```
31-
32-
### Install dependencies
33-
34-
```
3531
$ cd phpqa
32+
# download dependencies
3633
$ composer install
34+
# make phpqa globally accessible creating a symlink
35+
$ ln -s ~/phpqa/bin/phpqa.php /usr/local/bin/phpqa
3736
```
3837

39-
### Create symbolink link
40-
41-
```
42-
ln -s ~/phpqa/bin/phpqa.php /usr/local/bin/phpqa
38+
## Using Composer
39+
```bash
40+
$ composer global require jmolivas/phpqa
41+
# Make sure you add ~/.composer/vendor/bin/ to your PATH.
4342
```
4443

45-
## Include in your project
46-
```
47-
$ composer require jmolivas/phpqa
48-
```
44+
## Usage
4945

50-
## How to run this project
46+
### Copy configuration files to user home directory
5147
```
52-
# Make sure you run this command the first time
5348
$ phpqa init
49+
```
5450

55-
# Run this command to test your project code
56-
$ phpqa analyze --project=php --files=src/
51+
### Analyze a project
52+
```
53+
$ cd to/project/path
54+
$ phpqa analyze --project=PROJECT --files[=FILES]
5755
```
5856

59-
> Note: This project is a work-in-progress need some love related to code clean up and testing coverage.
57+
**Options:**
58+
59+
| Option | Description |
60+
| ------- | ----------------------------- |
61+
| project | Available default values php, symfony and drupal |
62+
| files | If this option is not set then the files added to git index will be scanned. This is useful when setting executing this tool on a git-hook pre-commit. |
63+
64+
> Note: This project is a work-in-progress and need some love related to code clean up and testing coverage.

0 commit comments

Comments
 (0)