Skip to content

Commit 06eb4dd

Browse files
committed
📚 Readme: add installation instructions
Add badges, installation instructions, a contributing section and license information to the Readme.
1 parent 5d29b83 commit 06eb4dd

1 file changed

Lines changed: 70 additions & 2 deletions

File tree

README.md

Lines changed: 70 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,70 @@
1-
# PHPCSDevTools
2-
Tools for PHP_CodeSniffer sniff developers
1+
PHPCSDevTools for developers of PHP_CodeSniffer sniffs
2+
=====================================================
3+
4+
[![Latest Stable Version](https://poser.pugx.org/phpcsstandards/phpcsdevtools/v/stable)](https://packagist.org/packages/phpcsstandards/phpcsdevtools)
5+
[![Travis Build Status](https://travis-ci.com/PHPCSStandards/PHPCSDevTools.svg?branch=master)](https://travis-ci.com/PHPCSStandards/PHPCSDevTools/branches)
6+
[![Release Date of the Latest Version](https://img.shields.io/github/release-date/PHPCSStandards/PHPCSDevTools.svg?maxAge=1800)](https://github.com/PHPCSStandards/PHPCSDevTools/releases)
7+
:construction:
8+
[![Latest Unstable Version](https://img.shields.io/badge/unstable-dev--develop-e68718.svg?maxAge=2419200)](https://packagist.org/packages/phpcsstandards/phpcsdevtools#dev-develop)
9+
[![Travis Build Status](https://travis-ci.com/PHPCSStandards/PHPCSDevTools.svg?branch=develop)](https://travis-ci.com/PHPCSStandards/PHPCSDevTools/branches)
10+
[![Last Commit to Unstable](https://img.shields.io/github/last-commit/PHPCSStandards/PHPCSDevTools/develop.svg)](https://github.com/PHPCSStandards/PHPCSDevTools/commits/develop)
11+
12+
[![Minimum PHP Version](https://img.shields.io/packagist/php-v/phpcsstandards/phpcsdevtools.svg?maxAge=3600)](https://packagist.org/packages/phpcsstandards/phpcsdevtools)
13+
[![Tested on PHP 5.4 to 7.4 snapshot](https://img.shields.io/badge/tested%20on-PHP%205.4%20|%205.5%20|%205.6%20|%207.0%20|%207.1%20|%207.2%20|%207.3%20|%207.4snapshot-brightgreen.svg?maxAge=2419200)](https://travis-ci.com/PHPCSStandards/PHPCSDevTools)
14+
15+
[![License: LGPLv3](https://poser.pugx.org/phpcsstandards/phpcsdevtools/license.png)](https://github.com/PHPCSStandards/PHPCSDevTools/blob/master/LICENSE)
16+
![Awesome](https://img.shields.io/badge/awesome%3F-yes!-brightgreen.svg)
17+
18+
19+
This is a set of tools to aid developers of sniffs for [PHP CodeSniffer](https://github.com/squizlabs/PHP_CodeSniffer).
20+
21+
* [Installation](#installation)
22+
+ [Composer Project-based Installation](#composer-project-based-installation)
23+
+ [Composer Global Installation](#composer-global-installation)
24+
+ [Stand-alone Installation](#stand-alone-installation)
25+
* [Contributing](#contributing)
26+
* [License](#license)
27+
28+
29+
Installation
30+
-------------------------------------------
31+
32+
### Composer Project-based Installation
33+
34+
Run the following from the root of your project:
35+
```bash
36+
composer require phpcsstandards/phpcsdevtools:^1.0
37+
```
38+
39+
### Composer Global Installation
40+
41+
If you work on several different sniff repos, you may want to install this toolset globally:
42+
```bash
43+
composer global require phpcsstandards/phpcsdevtools:^1.0
44+
```
45+
46+
### Stand-alone Installation
47+
48+
* Install [PHP CodeSniffer](https://github.com/squizlabs/PHP_CodeSniffer) via [your preferred method](https://github.com/squizlabs/PHP_CodeSniffer#installation).
49+
* Register the path to PHPCS in your system `$PATH` environment variable to make the `phpcs` command available from anywhere in your file system.
50+
* Download the [latest PHPCSDevTools release](https://github.com/PHPCSStandards/PHPCSDevTools/releases) and unzip/untar it into an arbitrary directory.
51+
You can also choose to clone this repository using git.
52+
* Add the path to the directory in which you placed your copy of the PHPCSDevTools repo to the PHP CodeSniffer configuration using the below command:
53+
```bash
54+
phpcs --config-set installed_paths /path/to/PHPCSDevTools
55+
```
56+
**Warning**: :warning: The `installed_paths` command overwrites any previously set `installed_paths`. If you have previously set `installed_paths` for other external standards, run `phpcs --config-show` first and then run the `installed_paths` command with all the paths you need separated by comma's, i.e.:
57+
```bash
58+
phpcs --config-set installed_paths /path/1,/path/2,/path/3
59+
```
60+
61+
62+
Contributing
63+
-------
64+
Contributions to this project are welcome. Just clone the repo, branch off from `develop`, make your changes, commit them and send in a pull request.
65+
66+
If unsure whether the changes you are proposing would be welcome, open an issue first to discuss your proposal.
67+
68+
License
69+
-------
70+
This code is released under the GNU Lesser General Public License (LGPLv3). For more information, visit http://www.gnu.org/copyleft/lesser.html

0 commit comments

Comments
 (0)