Open individual-it opened 6 years ago
I had a quick chat with @patrickjahns about this - projects out there seem to use both ... we need to check for the reasoning.
But yes - documentations need to be adopted - THX for the pointer
GitMate.io thinks possibly related issues are https://github.com/owncloud/core/issues/22420 ([Code checker] Check for missing index names), https://github.com/owncloud/core/issues/19946 (Inconsistent use of different languages), https://github.com/owncloud/core/issues/16673 (Two different Strict-Transport-Security recommendations), https://github.com/owncloud/core/issues/25521 (Code Integrity check fails for standard files), and https://github.com/owncloud/core/pull/30130 (Fix code checker "class not found").
I already submitted a few PRs for phpcs
to fix things I found with its docBlock parser. Not sure if that is a recommendation for it (community contributions are accepted quickly) or against it (it is not perfect).
Bit of discussion here: https://github.com/FriendsOfPHP/PHP-CS-Fixer/issues/3459
php_cs_fixer
has only things that it can fix automatically.
phpcs
is a general "linter" that can report on other code-standard things that it may not be capable of fixing.
As long as we do not require conflictings code standards, then actually we can use both. php_cs_fixer
might be able to automatically fix some things that phpcs
might just report.
The upside of using codesniffer is also the excellent integration into PHPStorms IDE.
As for using both tools at once - https://github.com/Symplify/EasyCodingStandard tries to abstract the need for both and provide easier configuration - maybe worth having a look?
Already filed an issue in documentation regarding php-cs-fixer: https://github.com/owncloud/documentation/issues/4064
Hey, this issue has been closed because the label status/STALE
is set and there were no updates for 7 days. Feel free to reopen this issue if you deem it appropriate.
(This is an automated comment from GitMate.io.)
More discussion and sorting-out still pending.
there will be even more tool which can/shall be added: PHPStan as example ...
The upside of using codesniffer is also the excellent integration into PHPStorms IDE.
PHPStorms IDE now supports PHP CS Fixer out of the box
Hi, EasyCodingStandard author here. I've just noticed this issues while googling
Let me know if you need to squash 2 tools to one :)
currently we are using
phpcs
with https://github.com/owncloud/core/blob/master/phpcs.xml as config andphp cs fixer
with https://github.com/owncloud/core/blob/master/.php_cs as configphpcs
is mentioned in the documentation https://doc.owncloud.org/server/10.0/developer_manual/general/codingguidelines.html#phpfeel like we should decide for one of the tools and get rid of the other one
CC @DeepDiver1975 @patrickjahns @phil-davis