2017 © Pedro Peláez
 

library mediawiki-codesniffer

MediaWiki CodeSniffer Standards

image

mediawiki/mediawiki-codesniffer

MediaWiki CodeSniffer Standards

  • Friday, July 27, 2018
  • by mediawiki
  • Repository
  • 12 Watchers
  • 21 Stars
  • 320,377 Installations
  • PHP
  • 115 Dependents
  • 0 Suggesters
  • 8 Forks
  • 0 Open issues
  • 32 Versions
  • 6 % Grown

The README.md

MediaWiki coding conventions

Abstract

This project implements a set of rules for use with [PHP CodeSniffer]0., (*1)

See MediaWiki conventions on our wiki for a detailed description of the coding conventions that are validated by these rules. :-), (*2)

How to install

  1. Create a composer.json which adds this project as a dependency:, (*3)

    {
        "require-dev": {
            "mediawiki/mediawiki-codesniffer": "35.0.0"
        },
        "scripts": {
            "test": [
                "phpcs -p -s"
            ],
            "fix": "phpcbf"
        }
    }
    
  2. Create a .phpcs.xml with our configuration:, (*4)

    <?xml version="1.0"?>
    <ruleset>
        <rule ref="./vendor/mediawiki/mediawiki-codesniffer/MediaWiki"/>
        <file>.</file>
        <arg name="bootstrap" value="./vendor/mediawiki/mediawiki-codesniffer/utils/bootstrap-ci.php"/>
        <arg name="extensions" value="php"/>
        <arg name="encoding" value="UTF-8"/>
    </ruleset>
    
  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, we'd also recommend adding a PHP linter to your composer.json – see the full documentation for more details., (*5)

TODO

  • Migrate the old code-utils/check-vars.php

The Versions

29/12 2017
21/10 2017
21/10 2017
24/09 2017
30/08 2017
13/08 2017
11/08 2017
23/07 2017
05/07 2017

0.8.x-dev

0.8.9999999.9999999-dev https://www.mediawiki.org/wiki/Manual:Coding_conventions/PHP

MediaWiki CodeSniffer Standards

  Sources   Download

GPL-2.0+

The Requires

 

The Development Requires

codesniffer mediawiki

05/07 2017

v0.8.1

0.8.1.0 https://www.mediawiki.org/wiki/Manual:Coding_conventions/PHP

MediaWiki CodeSniffer Standards

  Sources   Download

GPL-2.0+

The Requires

 

The Development Requires

codesniffer mediawiki

01/07 2017

v0.10.0

0.10.0.0 https://www.mediawiki.org/wiki/Manual:Coding_conventions/PHP

MediaWiki CodeSniffer Standards

  Sources   Download

GPL-2.0+

The Requires

 

The Development Requires

codesniffer mediawiki

20/06 2017

v0.9.0

0.9.0.0 https://www.mediawiki.org/wiki/Manual:Coding_conventions/PHP

MediaWiki CodeSniffer Standards

  Sources   Download

GPL-2.0+

The Requires

 

The Development Requires

codesniffer mediawiki

04/05 2017

v0.8.0

0.8.0.0 https://www.mediawiki.org/wiki/Manual:Coding_conventions/PHP

MediaWiki CodeSniffer Standards

  Sources   Download

GPL-2.0+

The Requires

 

The Development Requires

codesniffer mediawiki

22/09 2016

v0.8.0-alpha.1

0.8.0.0-alpha1 https://www.mediawiki.org/wiki/Manual:Coding_conventions/PHP

MediaWiki CodeSniffer Standards

  Sources   Download

GPL-2.0+

The Requires

 

The Development Requires

codesniffer mediawiki

28/05 2016

v0.7.2

0.7.2.0 https://www.mediawiki.org/wiki/Manual:Coding_conventions/PHP

MediaWiki CodeSniffer Standards

  Sources   Download

GPL-2.0+

The Requires

 

The Development Requires

codesniffer mediawiki

06/05 2016

v0.7.1

0.7.1.0 https://www.mediawiki.org/wiki/Manual:Coding_conventions/PHP

MediaWiki CodeSniffer Standards

  Sources   Download

GPL-2.0+

The Requires

 

The Development Requires

codesniffer mediawiki

06/05 2016

v0.7.0

0.7.0.0 https://www.mediawiki.org/wiki/Manual:Coding_conventions/PHP

MediaWiki CodeSniffer Standards

  Sources   Download

GPL-2.0+

The Requires

 

The Development Requires

codesniffer mediawiki

17/02 2016

v0.6.0

0.6.0.0 https://www.mediawiki.org/wiki/Manual:Coding_conventions/PHP

MediaWiki CodeSniffer Standards

  Sources   Download

GPL-2.0+

The Requires

 

The Development Requires

codesniffer mediawiki

29/12 2015

v0.5.1

0.5.1.0 https://www.mediawiki.org/wiki/Manual:Coding_conventions/PHP

MediaWiki CodeSniffer Standards

  Sources   Download

GPL-2.0+

The Requires

 

The Development Requires

codesniffer mediawiki

23/10 2015

v0.5.0

0.5.0.0 https://www.mediawiki.org/wiki/Manual:Coding_conventions/PHP

MediaWiki CodeSniffer Standards

  Sources   Download

GPL-2.0+

The Requires

 

The Development Requires

codesniffer mediawiki

26/09 2015

v0.4.0

0.4.0.0 https://www.mediawiki.org/wiki/Manual:Coding_conventions/PHP

MediaWiki CodeSniffer Standards

  Sources   Download

GPL-2.0+

The Requires

 

The Development Requires

codesniffer mediawiki

19/06 2015

v0.3.0

0.3.0.0 https://www.mediawiki.org/wiki/Manual:Coding_conventions/PHP

MediaWiki CodeSniffer Standards

  Sources   Download

GPL-2.0+

The Requires

 

The Development Requires

codesniffer mediawiki

02/06 2015

v0.2.0

0.2.0.0 https://www.mediawiki.org/wiki/Manual:Coding_conventions/PHP

MediaWiki CodeSniffer Standards

  Sources   Download

GPL-2.0+

The Requires

 

The Development Requires

codesniffer mediawiki

05/01 2015

0.1.0

0.1.0.0 https://www.mediawiki.org/wiki/Manual:Coding_conventions/PHP

MediaWiki CodeSniffer Standards

  Sources   Download

GPL-2.0+

The Requires

 

The Development Requires

codesniffer mediawiki