Skip to content

Commit

Permalink
Merge pull request #4 from HydraWiki/develop
Browse files Browse the repository at this point in the history
Adjust licensing and attribution.
  • Loading branch information
valeryan authored Sep 28, 2018
2 parents 0a8b4d4 + a2b2cfa commit cc27520
Show file tree
Hide file tree
Showing 4 changed files with 44 additions and 15 deletions.
14 changes: 9 additions & 5 deletions HydraWiki/Sniffs/Commenting/LicenseCommentSniff.php
Original file line number Diff line number Diff line change
Expand Up @@ -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 <[email protected]>
* @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;
Expand Down
17 changes: 12 additions & 5 deletions HydraWiki/Sniffs/WhiteSpace/NoSpaceAfterNotSniff.php
Original file line number Diff line number Diff line change
Expand Up @@ -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 <[email protected]>
* @author Samuel Hilson <[email protected]>
* @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;
Expand Down
8 changes: 8 additions & 0 deletions HydraWiki/ruleset.xml
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,14 @@
</properties>
</rule>

<!-- set a resonable line length -->
<rule ref="Generic.Files.LineLength">
<properties>
<property name="lineLimit" value="120"/>
<property name="absoluteLineLimit" value="0"/>
</properties>
</rule>

<!-- exclude common folders from version control or build tools -->
<exclude-pattern type="relative">^\.git</exclude-pattern>
<exclude-pattern type="relative">^vendor</exclude-pattern>
Expand Down
20 changes: 15 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
@@ -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
Expand All @@ -34,7 +34,6 @@ How to install
<ruleset>
<rule ref="./vendor/hydrawiki/hydrawiki-codesniffer/HydraWiki"/>
<file>.</file>
<arg name="bootstrap" value="./vendor/mediawiki/mediawiki-codesniffer/utils/bootstrap-ci.php"/>
<arg name="extensions" value="php,php5,inc"/>
<arg name="encoding" value="UTF-8"/>
</ruleset>
Expand All @@ -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

0 comments on commit cc27520

Please sign in to comment.