Currently we have a bad mix of 2-space and 4-space indentation and some other uglyness in this code base. Do we want to stick to the PHP_CodeSniffer standards or do we want to stick to our own?

I suggest that we go with PHP_CodeSniffer (we can easily validate that as PHP_CodeSniffer comes with a standard to validate itself), because then this could be moved upstream more easily when it has matured.

Comments

ericduran’s picture

Yes, I agree here. We should keep the PHP_CodeSniffer standards for the sniffer.

das-peter’s picture

Version: » 7.x-1.x-dev

That's absolutely fine with me and makes the most sense.
And I feel guilty because I definitely wrote some of the tests with the Drupal Formatter Settings ;D

klausi’s picture

Furthermore: I suggest to remove the following comment tags from our own files and classes:

  • @author: we do not name individual people in our community, as most work is done and improved by many people.
  • @copyright: really? everything is GPLv2 anyway.
  • @license: again, everything on drupal.org is GPL anyway.
  • @version: we use Git for version control, no need to encode this meta information in code files.

At the moment we have a lot of copy&pasted comments that are just wrong, let's fix this.

das-peter’s picture

Thought the same thing yesterday.
Shall we make a big clean-up or should it happen just iteratively on every change a little cleaner?
Until now I fixed always the functions I was changing code to follow the PHP_CodeSniffer standards but there's a lot left to do and I'm not sure what's the best approach.

At least for those specific tags a search & replace action should work just fine.

klausi’s picture

It does not have to be a big bang, I suggest to do it per sniff-subfolder (e.g. Array, Classes, Commenting, ControlStructures, etc.). Of course we should stick to this style for everything that we change or add, but we should not mix code style cleanup with functional changes in one commit.

klausi’s picture

Status: Active » Fixed

I call this one fixed, consensus has been reached and we use the PHPCS coding standard almost everywhere now.

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.