Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

WPCS #236

Open
szepeviktor opened this issue Feb 17, 2016 · 9 comments
Open

WPCS #236

szepeviktor opened this issue Feb 17, 2016 · 9 comments

Comments

@szepeviktor
Copy link

Good afternoon!

How about fixing indentation and e.g. removing () from include and require?

@szepeviktor
Copy link
Author

Implemented in #237

@szepeviktor
Copy link
Author

Could I continue with full WPCS?

@szepeviktor
Copy link
Author

Could it get into Travis also?

@michaeluno
Copy link
Owner

@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).

@szepeviktor
Copy link
Author

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

@michaeluno
Copy link
Owner

I see you want to implement coding standard checks in the tests. I'll see what I can do.

@michaeluno
Copy link
Owner

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.

@szepeviktor
Copy link
Author

OK.
Please be aware that composer is supported in Travis by default.
https://docs.travis-ci.com/user/languages/php#Installing-Composer-packages

@michaeluno
Copy link
Owner

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants