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

coding standards #3

Closed
mwoodpatrick opened this issue Feb 26, 2020 · 1 comment
Closed

coding standards #3

mwoodpatrick opened this issue Feb 26, 2020 · 1 comment
Assignees
Labels
question Further information is requested

Comments

@mwoodpatrick
Copy link

When I look at the page: https://developers.elementor.com/getting-started/ it understandably recommends using phpcs using the WordPress coding standard but when I run phpcs on the Ocean Extra source I see quite a lot of violations.

Many are fairly trivial e.g.:

Line indented incorrectly; expected at least 3 tabs, found 0

But with so many its hard to see if there are more major ones. I’m using the current WordPress rules as far as I can see. Do you know where I can I find a phpcs rule set which matches what the Ocean extra team are doing in practice? Any pointers would be much appreciated.

@MarkHollo MarkHollo added the question Further information is requested label Apr 5, 2020
@MarkHollo
Copy link
Contributor

Hello @mwoodpatrick,

Apologies for the belayed reply, we've somehow missed your comment.

Happy to clarify everything.

At the current moment, we don't have any published coding standards, mostly because no one will ever build a plugin based on our plugins :) However, I have added your idea to our features request list and we will see what can be done about it in the future.

As for the coding standards, OceanWP follows WordPress coding standards. And although PHPCS may be a helpful guide, human factor plays the most significant role here. Not because PHPCS has a lot of issues, but because most of these warnings are false positive and they do come up when "mixing" PHP and HTML for example. If you examine the code "by hand", you will see for yourself :)

Of course, there may be some things we've overlooked and we will do our best to fix everything that needs to be fixed.

If you have any other questions, please let me know

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Further information is requested
Projects
None yet
Development

No branches or pull requests

3 participants