ZF-7316: Cleaning all the code
Description
Some files contain CRLF:
find . -name '*.php' -print0 | xargs -0 sed --regexp-extended --in-place 's/\r\n/\n/g'
Some files contain TABS:
find . -name '*.php' -print0 | xargs -0 sed --regexp-extended --in-place 's/\t/ /g'
Some files contain endline spaces:
find . -name '*.php' -print0 | xargs -0 sed --regexp-extended --in-place 's/[ ]*$//g'
By running this 3 commands on the top of standard directory. It could be applied to library and tests.
After that, a pre-commit hook could be added to test all of them (but it's another history ;) )
Comments
Posted by julien PAULI (doctorrock83) on 2009-07-20T09:59:25.000+0000
I agree : As time goes, ZF code gets worse and worse written. Hang on : I'm actually not shouting at ZF or ZF contributors ;-), but that is just a point of view after having reviewed thousands of lines of codes for years now.
We can see sometimes public members in classes but they shouldn't be public, or protected ones but that don't start with an underscore. Lot of code is not PHPDocumented as well...
As some problems could break BC and should wait for 2.0 , the "tabs, spaces, and CRLF" problem can be patched safely ;-)
Posted by Satoru Yoshida (satoruyoshida) on 2009-08-06T05:47:22.000+0000
I make simple cross referrence by Open Office 3.1
Posted by Satoru Yoshida (satoruyoshida) on 2009-08-07T03:45:37.000+0000
Update cross reference.
Posted by Satoru Yoshida (satoruyoshida) on 2009-08-07T21:01:59.000+0000
I have created children issues that class has CRLFs in their line ends.
Posted by Thomas Weidner (thomas) on 2009-08-20T06:37:07.000+0000
Fixed all files in core: CRLF -> LF TAB -> 4 Spaces No ending spaces
Posted by Alexander Veremyev (alexander) on 2009-11-12T03:53:39.000+0000
Corresponding commits should be merged into release branch. I've just done it for Zend_Search_lucene (ZF-7530 subtask).
Posted by Thomas Weidner (thomas) on 2009-11-12T05:35:28.000+0000
For me it is impossible to know if a given change is allowed to be branched or not because trunk contains code for the next minor release.
Therefor this change was not branched.
Posted by Matthew Weier O'Phinney (matthew) on 2009-11-12T05:35:49.000+0000
Many of the changes made for this issue may conflict with changes previously merged to the release branch. As this is simply a minor correction and does not impact functionality, I'd prefer we not merge to the release branch and instead wait until the next minor release.
Closing.