Closed BernardoSilva closed 9 years ago
Why don't we put this to be executed on CI rather then as commit hook?
The inspection completed: No new issues
To ensure that developers always commit good code. This way if a developer make a change to code it will always commit clean formatted code, all consistent to whole project because the rules are the same to everyone. If we add this to CI it will check just for invalid syntax? Or event if we managed to make CI fix the code it will create strange commits just for code formatting? Or you know some better way of doing it @tmilos ?
Didn't notice it's actually modifying files. Thought it's just syntax check. I'm used more to CI PSR check, but this might be fine too.
Was a bit skeptical how it would work on windows, but after fixing line 26 to be
if [[ $i == *.php ]];
it works like a charm
So, please try if that works for you too, on Linux I guess, and we can merge it with that patch.
@tmilos Its working fine on mac. :+1:
@BernardoSilva What are -p
and --diff
options? I don't find them in phpcbf -h
I made PR #85 as alt to this one to solve conflicts. I also changed composer.json
to require stable version of php_codesniffer. Guess that's ok
Cool. :+1:
Those options may be available only for php-cs-fixer
, I adapted this script to work with php_codesniffer.
Those may be incompatible options with this bundle.
This PR is for issue #72