Giter Site home page Giter Site logo

poet-coding-standard's Introduction

Introduction

This is the POET Group's coding standard. This standard is primarily focused on assisting with code reviews. For example, warning the code reviewer about potential security or performance problems.

Please visit the coding standard documentation for further details.

Install

Just add it to your project's composer.json file (--dev is optional based on your needs):

composer require --dev poetgroup/poet-coding-standard

Usage

The following paths may change based on how things are installed, but basically you are looking for the path to the CodeSniffer command and the path to the moodle directory of this project:

vendor/bin/phpcs --standard=POET /path/to/moodle/plugin

Testing

In order to run the unit tests, you must ensure that you install from source otherwise, testing code from PHP_CodeSniffer would be missing. Here is an example of re-installing dependencies and running tests:

rm -rf vendor/
composer install --prefer-source
vendor/bin/phpunit

Please also know that any new tests added need the @group poet annotation added. This ensures that only tests from the POET standard are run.

Documenting

To update the standard's documentation, use the following command:

vendor/bin/phpcs --standard=POET --generator=markdown > POET.md

License

This project is licensed under the GNU GPL v3 or later. See the LICENSE file for details.

poet-coding-standard's People

Contributors

2shediac avatar polothy avatar

Watchers

 avatar  avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.