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

Follow a Coding Standard #149

Open
szepeviktor opened this issue Jul 8, 2022 · 7 comments
Open

Follow a Coding Standard #149

szepeviktor opened this issue Jul 8, 2022 · 7 comments
Assignees
Labels
Milestone

Comments

@szepeviktor
Copy link
Contributor

szepeviktor commented Jul 8, 2022

composer require --dev wp-coding-standards/wpcs dealerdirect/phpcodesniffer-composer-installer
composer exec -- phpcs --standard=WordPress-Core src/ -s --exclude=WordPress.Files.FileName,WordPress.CodeAnalysis.AssignmentInCondition,Squiz.PHP.DisallowMultipleAssignments

These can be automatically fixed by phpcbf.

@JJJ JJJ added this to the 3.0.0 milestone Jul 13, 2022
@JJJ
Copy link
Collaborator

JJJ commented Jul 13, 2022

Ok, let's give it a try.

I get ornery about WordPress's exact standards, but I know people find value in them, even if I think sometimes they make things worse than my own personal preferences & styles.

@szepeviktor
Copy link
Contributor Author

szepeviktor commented Jul 13, 2022

but I know people find value in them

Who are those people? They are not industry professional who were raised by eating and drinking source code, but "particularly for those with vision difficulties" (from WPCS docs) and other slight disabilities.

So industry professionals MUST read code that targets people with disabilities.
That is very HARD to do.

@szepeviktor
Copy link
Contributor Author

szepeviktor commented Jul 13, 2022

💡 FYI TAB characters work really well on typewriters.

@szepeviktor
Copy link
Contributor Author

.. so I've disabled all those things in WPCS and created https://github.com/szepeviktor/phpcs-psr-12-neutron-hybrid-ruleset

@szepeviktor
Copy link
Contributor Author

@JJJ After running the above commands I've realized that WPCS is not compatible with your Descriptive Programming ©️

Many things get indented the way you don't want.

@JJJ
Copy link
Collaborator

JJJ commented Jul 13, 2022

Guess I should invent my own style, eh? 😓

@szepeviktor
Copy link
Contributor Author

YES!!

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

No branches or pull requests

2 participants