admin-page-framework
admin-page-framework copied to clipboard
WPCS
Good afternoon!
How about fixing indentation and e.g. removing () from include and require?
Implemented in https://github.com/michaeluno/admin-page-framework/pull/237
Could I continue with full WPCS?
Could it get into Travis also?
@szepeviktor Hi, thanks for the pull request. I don't mind fixing indentations. I'm not sure about removing the parentheses used for require and include. Is there a merit for doing it?
As for WordPress Coding Standards, I would not be too strict about it. I use 4 white spaces to start an indentation at a new line. I used to use a tab but I have had a hard time posting code on Gist for it as it did not get aligned gracefully. So I changed it to use white spaces. Let me know if you have difficulty using white spaces for indentations.
As for your question about Travis, I could not comprehend your question. Travis is already set up for this repository. Do you want to do something with it? You may check out the Travis configuration file (https://github.com/michaeluno/admin-page-framework/blob/3.7.11/.travis.yml).
As for indentation: You could copy WPCS' directory named WordPress-Core to WordPress-Core-space and comment out this rule:
<rule ref="Generic.WhiteSpace.DisallowSpaceIndent"/>
(or remove this rule in place)
Travis could check whether the commits are WPCS compatible.
See .travis.yml and composer.json here
https://github.com/pantheon-systems/wp-redis
I see you want to implement coding standard checks in the tests. I'll see what I can do.
I added a script in the tool directory to run phpcbf and apply fixes to the files under the development directory.
To run the script, you just execute the run.sh file.
However, by applying fixes, It caused some PHP syntax errors and I had to modify ruleset.xml to remove some of them. There might be some other rules which need to be removed but I haven't completely tested them out. So it would be appreciated if you could run it and see if there is no error after that. Then I can implement the same script in the tests.
OK. Please be aware that composer is supported in Travis by default. https://docs.travis-ci.com/user/languages/php#Installing-Composer-packages
Please be aware that composer is supported in Travis by default.
I've been aware of it unless you are talking about something different. I'm not sure why you mention this. If you mentioned it because the use of the phar file in the script, it is for allowing it run locally without requiring the user to install Composer.