Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://gitlab.com/hydrawiki/hydrawiki-codesniffer
This project implements a set of rules for use with PHP CodeSniffer.
https://gitlab.com/hydrawiki/hydrawiki-codesniffer
Last synced: about 1 month ago
JSON representation
This project implements a set of rules for use with PHP CodeSniffer.
- Host: gitlab.com
- URL: https://gitlab.com/hydrawiki/hydrawiki-codesniffer
- Owner: hydrawiki
- License: mit
- Created: 2019-02-01T17:14:12.954Z (almost 6 years ago)
- Default Branch: master
- Last Synced: 2024-11-12T22:47:36.254Z (about 1 month ago)
- Stars: 0
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
HydraWiki Coding Conventions
============================Abstract
--------
This project implements a set of rules for use with [PHP CodeSniffer][0].HydraWiki is based on MediaWiki's Coding Standards, it applies additional coding standards on top of the [MediaWiki Standard][3].
See [MediaWiki conventions][1] from MediaWiki for a detailed description of the
coding conventions that are validated by these rules. :-)How to install
--------------
1. Create a composer.json which adds this project as a dependency:```
{
"require-dev": {
"hydrawiki/hydrawiki-codesniffer": "1.0.9"
},
"scripts": {
"test": [
"phpcs -p -s"
],
"fix": "phpcbf"
}
}
```
2. Create a .phpcs.xml with our configuration:```
.
```
3. Install: `composer update`
4. Run: `composer test`
5. Run: `composer fix` to auto-fix some of the errors, others might need
manual intervention.
6. Commit!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