From 5c8284719fb36ab0442a10b6edd3c2c7c9d42292 Mon Sep 17 00:00:00 2001 From: Greg Sherwood Date: Mon, 24 Jun 2019 11:16:42 +1000 Subject: [PATCH] Clarified that minor versions are used for all standard modifications, and major for removals of sniffs (ref #2531) --- README.md | 18 ++++++++++-------- 1 file changed, 10 insertions(+), 8 deletions(-) diff --git a/README.md b/README.md index 3fcbbb6ae6..b81c38bf93 100644 --- a/README.md +++ b/README.md @@ -1,19 +1,19 @@ ## About -PHP\_CodeSniffer is a set of two PHP scripts; the main `phpcs` script that tokenizes PHP, JavaScript and CSS files to detect violations of a defined coding standard, and a second `phpcbf` script to automatically correct coding standard violations. PHP\_CodeSniffer is an essential development tool that ensures your code remains clean and consistent. +PHP_CodeSniffer is a set of two PHP scripts; the main `phpcs` script that tokenizes PHP, JavaScript and CSS files to detect violations of a defined coding standard, and a second `phpcbf` script to automatically correct coding standard violations. PHP_CodeSniffer is an essential development tool that ensures your code remains clean and consistent. [![Build Status](https://travis-ci.org/squizlabs/PHP_CodeSniffer.svg?branch=phpcs-fixer)](https://travis-ci.org/squizlabs/PHP_CodeSniffer) [![Code consistency](http://squizlabs.github.io/PHP_CodeSniffer/analysis/squizlabs/PHP_CodeSniffer/grade.svg)](http://squizlabs.github.io/PHP_CodeSniffer/analysis/squizlabs/PHP_CodeSniffer) [![Join the chat at https://gitter.im/squizlabs/PHP_CodeSniffer](https://badges.gitter.im/Join%20Chat.svg)](https://gitter.im/squizlabs/PHP_CodeSniffer?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge) ## Requirements -PHP\_CodeSniffer requires PHP version 5.4.0 or greater, although individual sniffs may have additional requirements such as external applications and scripts. See the [Configuration Options manual page](https://github.com/squizlabs/PHP_CodeSniffer/wiki/Configuration-Options) for a list of these requirements. +PHP_CodeSniffer requires PHP version 5.4.0 or greater, although individual sniffs may have additional requirements such as external applications and scripts. See the [Configuration Options manual page](https://github.com/squizlabs/PHP_CodeSniffer/wiki/Configuration-Options) for a list of these requirements. If you're using PHP_CodeSniffer as part of a team, or you're running it on a [CI](https://en.wikipedia.org/wiki/Continuous_integration) server, you may want to configure your project's settings [using a configuration file](https://github.com/squizlabs/PHP_CodeSniffer/wiki/Advanced-Usage#using-a-default-configuration-file). ## Installation -The easiest way to get started with PHP\_CodeSniffer is to download the Phar files for each of the commands: +The easiest way to get started with PHP_CodeSniffer is to download the Phar files for each of the commands: ``` # Download using curl curl -OL https://squizlabs.github.io/PHP_CodeSniffer/phpcs.phar @@ -62,12 +62,12 @@ You will then be able to run PHP_CodeSniffer from the tools directory: ./tools/phpcbf -h ### PEAR -If you use PEAR, you can install PHP\_CodeSniffer using the PEAR installer. This will make the `phpcs` and `phpcbf` commands immediately available for use. To install PHP\_CodeSniffer using the PEAR installer, first ensure you have [installed PEAR](http://pear.php.net/manual/en/installation.getting.php) and then run the following command: +If you use PEAR, you can install PHP_CodeSniffer using the PEAR installer. This will make the `phpcs` and `phpcbf` commands immediately available for use. To install PHP_CodeSniffer using the PEAR installer, first ensure you have [installed PEAR](http://pear.php.net/manual/en/installation.getting.php) and then run the following command: pear install PHP_CodeSniffer ### Git Clone -You can also download the PHP\_CodeSniffer source and run the `phpcs` and `phpcbf` commands directly from the Git clone: +You can also download the PHP_CodeSniffer source and run the `phpcs` and `phpcbf` commands directly from the Git clone: git clone https://github.com/squizlabs/PHP_CodeSniffer.git cd PHP_CodeSniffer @@ -76,7 +76,7 @@ You can also download the PHP\_CodeSniffer source and run the `phpcs` and `phpcb ## Documentation -The documentation for PHP\_CodeSniffer is available on the [Github wiki](https://github.com/squizlabs/PHP_CodeSniffer/wiki). +The documentation for PHP_CodeSniffer is available on the [Github wiki](https://github.com/squizlabs/PHP_CodeSniffer/wiki). ## Issues @@ -94,13 +94,15 @@ The `MAJOR` version is incremented when: - backwards-incompatible changes are made to how the `phpcs` or `phpcbf` commands are used, or - backwards-incompatible changes are made to the `ruleset.xml` format, or - backwards-incompatible changes are made to the API used by sniff developers, or -- custom PHP_CodeSniffer token types are removed +- custom PHP_CodeSniffer token types are removed, or +- existing sniffs are removed from PHP_CodeSniffer entirely The `MINOR` version is incremented when: - new backwards-compatible features are added to the `phpcs` and `phpcbf` commands, or - backwards-compatible changes are made to the `ruleset.xml` format, or - backwards-compatible changes are made to the API used by sniff developers, or -- new sniffs are added to an included standard +- new sniffs are added to an included standard, or +- existing sniffs are removed from an included standard > NOTE: Backwards-compatible changes to the API used by sniff developers will allow an existing sniff to continue running without producing fatal errors but may not result in the sniff reporting the same errors as it did previously without changes being required.