Releases: SocialEngine/sniffer-rules
Lumen/Laravel 5.5 support
Prevent from registering in non-console cases
Since this is a cli command, we only register it in CLI.
Lumen Support
Added lumen support to sniffer.
No longer support L4
Fix colors bug for auto-fix, add manual instructions
In this release we fixed a bug introduced in previous release having to do with colors option.
Also, we added travis to dogfood the command and instructions on how to run sniff ruleset manually (outside laravel).
Better color detection, cli option parsing
On the heels of 2.1.1, this release makes cli options a lot more flexible by filtering out Symfony's built in commands (such as --no-interaction
).
Additionally, removed some dead code and make color detection rely on Symfony's isDecorated()
check (which can be set by --no-ansi
in addition to doing terminal detection).
Add ability to set report type and report file
We needed jenkins-ci to run our sniffs, since jenkins supports structured reporting, we can change report type to checkstyle
and set an output directory.
Changelog
- New: add
--report
option to specify report type forphpcs
(optionally) - New: add
--report-file
option to specify where to write the report (optionally) - Fix: change some docblocks for code completion.
- Fix: remove unnecessary constructor.
Laravel 4 and 5 Compatibility
Thanks to @smazurov, our sniffer rules now support Laravel 4 and 5! The README.md was updated accordingly.
Updated according to code sniffer changes
Merge pull request #10 from SocialEngine/feature/update-sniffer-rules Updated code according to the committed sniffer changes
2.0.0
1.0.3 - Configurable snake_case method names
This release sees the addition of a new configuration option: allowSnakeCaseMethodName
This option allows you to configure which methods are allowed to use snake_case versus camelCase.
Here's a demonstrative example config:
'allowSnakeCaseMethodName' => [
// Any method that starts with test, regardless of class
[
'classSuffix' => '*',
'methodPrefix' => ['test'],
],
// Any method in the a class that ends with 'Cest'
[
'classSuffix' => 'Cest',
'methodPrefix' => ['*']
],
// Methods that start with 'cats' in classes that end with 'Pet'
[
'classSuffix' => 'Pet',
'methodPrefix' => ['cats']
],
// Methods that start with 'foo' or 'bar' in classes that end with 'Baz'
[
'classSuffix' => 'Baz',
'methodPrefix' => ['foo', 'bar']
],
]