Last active
August 29, 2015 14:21
-
-
Save AmmarCodes/1720da071fae563c8e3e to your computer and use it in GitHub Desktop.
User config file for Phpcs sublime package.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
$finder = Symfony\CS\Finder\DefaultFinder::create() | |
->in(__DIR__); | |
return Symfony\CS\Config\Config::create() | |
->level(Symfony\CS\FixerInterface::PSR2_LEVEL) | |
->fixers(array('-psr0', '-unalign_double_arrow', 'no_blank_lines_before_namespace', 'short_array_syntax', 'align_equals', 'concat_with_spaces')) | |
->finder($finder); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Show hidden characters
{ | |
"phpcs_executable_path": "/home/ammar/.composer/vendor/bin/phpcs", | |
"phpcs_additional_args": { | |
"--standard": "PSR2", | |
"--config-file": "~/.php_cs", | |
"-n": "" | |
}, | |
// PHP-CS-Fixer settings | |
"php_cs_fixer_on_save": true, | |
"php_cs_fixer_show_quick_panel": false, | |
"php_cs_fixer_executable_path": "/home/ammar/.composer/vendor/bin/php-cs-fixer", | |
"php_cs_fixer_additional_args": { | |
"--config-file": "~/.php_cs", | |
"--fixers": "-psr0, -unalign_double_arrow, no_blank_lines_before_namespace, short_array_syntax, align_equals, concat_with_spaces" // for some reason the fixers doesn' work from the config file! | |
}, | |
// PHP Linter settings | |
// Are we going to run php -l over the file? | |
"phpcs_linter_run": true, | |
"phpcs_linter_command_on_save": true, | |
"phpcs_linter_regex": "(?P<message>.*) on line (?P<line>\\d+)", | |
// PHP Mess Detector settings | |
// Execute phpmd | |
"phpmd_run": false, | |
// Execute the phpmd on file save | |
"phpmd_command_on_save": true, | |
"phpmd_executable_path": "/home/ammar/.composer/vendor/bin/phpmd", | |
"phpmd_additional_args": { | |
"codesize,unusedcode,naming": "" | |
}, | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment