GithubHelp home page GithubHelp logo

kevinm2k / cakephp-codesniffer Goto Github PK

View Code? Open in Web Editor NEW

This project forked from cakephp/cakephp-codesniffer

0.0 1.0 0.0 1.45 MB

CakePHP Code Sniffer

Home Page: http://cakephp.org

License: Other

cakephp-codesniffer's Introduction

CakePHP Code Sniffer Build Status

This code works with phpcs and checks code against the coding standards used in CakePHP.

Installation

It's generally recommended to install these code sniffs with the PEAR installer:

pear channel-discover pear.cakephp.org
pear install cakephp/CakePHP_CodeSniffer

You can also install the code sniffs with composer:

php composer.phar require cakephp/cakephp-codesniffer
vendor/bin/phpcs --config-set installed_paths vendor/cakephp/cakephp-codesniffer

The second command lets phpcs know where to find your new sniffs. Ensure that you do not overwrite any existing installed_paths value.

For CakePHP 3.x apps, the default composer bin is at root of your app, so replace vendor/bin/ by bin/ in all commands.

Usage

Depending on how you installed the code sniffer changes how you run it. If you have installed phpcs, and this package with PEAR, you can do the following:

phpcs --standard=CakePHP /path/to/code

Warning when these sniffs are installed with composer, ensure that you have configured the CodeSniffer installed_paths setting.

Once installed_paths is configured, you can run phpcs using:

vendor/bin/phpcs --standard=CakePHP

Contributing

If you'd like to contribute to the Code Sniffer, you can fork the project add features and send pull requests.

Make sure to clone the repository to something like cakephp_codesniffer (instead of the default cakephp-codesniffer) because otherwise phpunit will fail to run the tests.

Releasing CakePHP Code Sniffer

  • Update version number in build.xml
  • Add changelog entry.
  • Commit changes.
  • Create git tag.
  • Run phing release

cakephp-codesniffer's People

Contributors

ad7six avatar admad avatar bcrowe avatar cake17 avatar cdburgess avatar ceeram avatar clawsonm avatar d33vil avatar derekperkins avatar jrbasso avatar lorenzo avatar markstory avatar rchavik avatar renan avatar tersmitten avatar tiutalk avatar yandod avatar

Watchers

 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.