WPBP / WordPress-Plugin-Boilerplate-Powered

Wordpress Plugin Boilerplate but Powered with examples and a generator!
https://wpbp.github.io/
GNU General Public License v3.0
783 stars 116 forks source link

Introduce CI #160

Closed szepeviktor closed 4 years ago

szepeviktor commented 4 years ago

I mean CI for this repo, not CI for plugins made from this repo.

@Mte90 What CS would you follow in PHP code? PSR-12, WPCS, Neutron, other?

szepeviktor commented 4 years ago

Could you point me to a full-fledged plugin made from this boilerplate? I'd set up PHPStan for all possible problems.

Mte90 commented 4 years ago

I am looking to the various pr, thanks! Right now I am using this phpcs https://github.com/codeatcode/codeatcs that is downloaded by https://github.com/WPBP/generator but is replaceable during the boilerplate generation.

szepeviktor commented 4 years ago

I am using this phpcs codeatcode/codeatcs

Thank you. Could you publish it on Packagist?

e.g. https://github.com/szepeviktor/phpcs-psr-12-neutron-hybrid-ruleset/blob/master/composer.json

Mte90 commented 4 years ago

Do you think that is useful? right now that xml is downloaded by the generator and placed in the root of the plugin so anyone can customize it based on their needs.
If will do a package this require to create a new one etc...

szepeviktor commented 4 years ago

Every PHPCS ruleset is distributed as a Composer package.

Composer even has a special package type for that: "type": "phpcodesniffer-standard",

Mte90 commented 4 years ago

I will do a package asap.

Mte90 commented 4 years ago

Package generated https://packagist.org/packages/codeatcode/codeatcs

szepeviktor commented 4 years ago

Thank you.

szepeviktor commented 4 years ago

Are you compatible with the highly popular https://github.com/Dealerdirect/phpcodesniffer-composer-installer#how-it-works ?

Mte90 commented 4 years ago

Seems yes because I got that PHP CodeSniffer Config installed_paths set to ../../phpcompatibility/php-compatibility,../../phpcompatibility/phpcompatibility-paragonie,../../phpcompatibility/phpcompatibility-wp,../../phpcsstandards/phpcsdevcs,../../slevomat/coding-standard,../../wp-coding-standards/wpcs

szepeviktor commented 4 years ago

Where is codeatcs??

Mte90 commented 4 years ago

You are right, checking the tool code require that the file is called ruleset so I will do a new release.