diff --git a/HydraWiki/Sniffs/Commenting/LicenseCommentSniff.php b/HydraWiki/Sniffs/Commenting/LicenseCommentSniff.php index f2e4f5c..2f37051 100644 --- a/HydraWiki/Sniffs/Commenting/LicenseCommentSniff.php +++ b/HydraWiki/Sniffs/Commenting/LicenseCommentSniff.php @@ -3,12 +3,16 @@ * Curse Inc. * LicenseCommentSniff * - * @author Samuel Hilson - * @license MIT - * @package HydraWiki - * @link http://www.curse.com/ + * This file was copied from MediaWiki Codesniffer before being modified + * File: MediaWiki/Sniffs/Commenting/LicenseCommentSniff.php + * From repository: https://github.com/wikimedia/mediawiki-tools-codesniffer * - **/ + * @package HydraWiki + * @author Dieser Benutzer + * @author Samuel Hilson + * @copyright https://github.com/wikimedia/mediawiki-tools-codesniffer/blob/master/COPYRIGHT + * @license https://github.com/wikimedia/mediawiki-tools-codesniffer/blob/master/LICENSE GPL-2.0-or-later + */ namespace HydraWiki\Sniffs\Commenting; use Composer\Spdx\SpdxLicenses; diff --git a/HydraWiki/Sniffs/WhiteSpace/NoSpaceAfterNotSniff.php b/HydraWiki/Sniffs/WhiteSpace/NoSpaceAfterNotSniff.php index 9c2ed9d..2e637b1 100644 --- a/HydraWiki/Sniffs/WhiteSpace/NoSpaceAfterNotSniff.php +++ b/HydraWiki/Sniffs/WhiteSpace/NoSpaceAfterNotSniff.php @@ -3,12 +3,19 @@ * Curse Inc. * NoSpaceAfterNotSniff * - * @author Samuel Hilson - * @license MIT - * @package HydraWiki - * @link http://www.curse.com/ + * This file was copied from PHP_CodeSniffer before being modified + * File: Standards/Generic/Sniffs/Formatting/SpaceAfterNotSniff.php + * From repository: https://github.com/squizlabs/PHP_CodeSniffer * - **/ + * Ensures there is no space after a NOT operator. + * + * @package PHP_CodeSniffer + * @author Greg Sherwood + * @author Samuel Hilson + * @copyright 2006-2015 Squiz Pty Ltd (ABN 77 084 670 600) + * @license https://github.com/squizlabs/PHP_CodeSniffer/blob/master/licence.txt BSD-3-Clause + */ + namespace HydraWiki\Sniffs\WhiteSpace; use PHP_CodeSniffer\Sniffs\Sniff; diff --git a/HydraWiki/ruleset.xml b/HydraWiki/ruleset.xml index ab41507..3e36b3c 100644 --- a/HydraWiki/ruleset.xml +++ b/HydraWiki/ruleset.xml @@ -53,6 +53,14 @@ + + + + + + + + ^\.git ^vendor diff --git a/README.md b/README.md index 1785f31..8aba56a 100644 --- a/README.md +++ b/README.md @@ -1,13 +1,13 @@ -HydraWiki coding conventions +HydraWiki Coding Conventions ============================ Abstract -------- This project implements a set of rules for use with [PHP CodeSniffer][0]. -It applies additional coding standards on top of the MediaWiki Standard. +HydraWiki is based on MediaWiki's Coding Standards, it applies additional coding standards on top of the [MediaWiki Standard][3]. -See [MediaWiki conventions][1] on our wiki for a detailed description of the +See [MediaWiki conventions][1] from MediaWiki for a detailed description of the coding conventions that are validated by these rules. :-) How to install @@ -34,7 +34,6 @@ How to install . - @@ -45,10 +44,21 @@ How to install manual intervention. 6. Commit! -Note that for most MediaWiki projects, we'd also recommend adding a PHP linter +Note that for most MediaWiki projects, MediaWiki also recommend to add a PHP linter to your `composer.json` – see the [full documentation][2] for more details. +## Acknowledgements + +This extension is based off of the `mediawiki-codesniffer` extension created by [MediaWiki][3] and some parts of [PHP CodeSniffer][0]. + +## Contributing and Licensing +This coding standard is used internally on HydraWiki projects in support of the Gamepedia Platform. This project is made public for ease of use by our team and it is not our intention to maintain it for public use as an alternative to the [original project][3] from which it was derived. However, if you do find it useful and want to contribute improvements to it, any merge request will be consider against our internal needs for this project before public considerations. + +The project is available under [MIT license][4] unless otherwise noted in files that are used from other projects. These files retain the original license under which they were created. + --- [0]: https://packagist.org/packages/squizlabs/php_codesniffer [1]: https://www.mediawiki.org/wiki/Manual:Coding_conventions/PHP [2]: https://www.mediawiki.org/wiki/Continuous_integration/Entry_points#PHP +[3]: https://github.com/wikimedia/mediawiki-tools-codesniffer +[4]: https://github.com/HydraWiki/hydrawiki-codesniffer/blob/master/LICENSE