berlindb/core

Follow a Coding Standard

Opened this issue ยท 7 comments

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 commented

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.

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.

๐Ÿ’ก FYI TAB characters work really well on typewriters.

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

@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 commented

Guess I should invent my own style, eh? ๐Ÿ˜“

YES!!