Giter Club home page Giter Club logo

larasniffer's Introduction

LaraSniffer (Laravel Package)

Detect violations of a defined coding standard. It helps your code remains clean and consistent. Available options are: PSR2, PSR1, Zend, PEAR, Squiz, PHPCS and MySource.

Build Status Coverage Status Latest Stable Version Total Downloads License

SensioLabsInsight

php artisan sniff

Quick start

Required setup

In the require key of composer.json file add the following

"leroy-merlin-br/larasniffer": "dev-master"

Run the Composer update comand

$ composer update

In your config/app.php add 'LeroyMerlin\LaraSniffer\ServiceProvider' to the end of the $providers array

'providers' => array(

    'Illuminate\Foundation\Providers\ArtisanServiceProvider',
    'Illuminate\Auth\AuthServiceProvider',
    ...
    'LeroyMerlin\LaraSniffer\ServiceProvider',

),

Publish the configuration file:

php artisan config:publish leroy-merlin-br/larasniffer

Edit the configuration file app/config/packages/leroy-merlin-br/larasniffer/config.php to tweak the sniffer behavior.

Usage

php artisan sniff

Contributting

New contributions are always welcomed. Just open a pull request making sure that it contains tests and doc updates. Please check if the Travis-CI build is alright too.

See all contributors

License

LaraSniffer is free software distributed under the terms of the MIT license

Aditional information

Any issues, please report here

larasniffer's People

Contributors

casperlaitw avatar grahamcampbell avatar guilhermeguitte avatar paulofreitas avatar zizaco avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

larasniffer's Issues

Per-directory standards?

Right now its all or nothing kind of situation. I'd love to have PSR-2 through the entire app, besides a few "hard to comply" areas, such as database migrations, views, etc, which could fall under a less strict ruleset. Is that possible? Would that be a difficult modification?

Abandon this package

Nowadays PHPSniffer phpcs.xml configuration can:

  • Configure colored outputs
  • Set codestyle rules
  • Configurable include and exclude paths patterns

Since this package does not add anything new to default code sniffer and does not support Laravel 5 too, I think it is prudent to abandon this package and document how to do the same using only PHP Sniffer.

Any toughs? @Zizaco , @GuilhermeGuitte , @ravanscafi , @rplansky ?

Undefined property $stream

Hi, mate!

Just a quick issue I got when installing the package on a fresh Laravel installation. When trying to do php artisan sniff I get the following error:

Undefined property: LeroyMerlin\LaraSniffer\SniffCommand::$stream

I've added the ServiceProvider to the app.php config, also published the configuration.

Thanks for your help.

exclude

wouldn't it be nice to exclude *.blade.php files in generally or to have an exclude list for sub folders? Would be easier to add the /app/*.php files then without getting the views into the sniffer.

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.