Closed (fixed)
Project:
Drupal Code Sniffer
Version:
7.x-1.x-dev
Component:
Code
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
11 Nov 2011 at 14:44 UTC
Updated:
15 May 2012 at 00:30 UTC
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
Comment #1
ericduran commentedYes, I agree here. We should keep the PHP_CodeSniffer standards for the sniffer.
Comment #2
das-peter commentedThat'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
Comment #3
klausiFurthermore: I suggest to remove the following comment tags from our own files and classes:
At the moment we have a lot of copy&pasted comments that are just wrong, let's fix this.
Comment #4
das-peter commentedThought 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.
Comment #5
klausiIt 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.
Comment #6
klausiI call this one fixed, consensus has been reached and we use the PHPCS coding standard almost everywhere now.