ZF-10669: Numerous files contain ASCII 0x0d (CR) characters (again)


These files contain CRLF endings:

Zend/Service/Amazon/SimpleDb/Page.php Zend/Cloud/QueueService/Message.php Zend/Cloud/QueueService/Exception.php Zend/Cloud/StorageService/Exception.php Zend/Cloud/StorageService/Adapter/S3.php Zend/Cloud/StorageService/Adapter/FileSystem.php Zend/Cloud/StorageService/Adapter/WindowsAzure.php Zend/Cloud/StorageService/Adapter/Nirvanix.php Zend/Cloud/OperationNotAvailableException.php Zend/Cloud/DocumentService/Query.php Zend/Cloud/DocumentService/QueryAdapter.php Zend/Cloud/DocumentService/Document.php Zend/Cloud/DocumentService/Exception.php Zend/Cloud/DocumentService/Adapter/WindowsAzure/Query.php Zend/Cloud/DocumentService/Adapter/SimpleDb.php Zend/Cloud/Exception.php Zend/Http/UserAgent/Mobile.php Zend/Application/Resource/Useragent.php

This file contains a BOM: Zend/Locale/Data/zh.xml

As these kindof errors tend to pop up each ZF release, why not add a specific test for it?

Kind regards, Chris


Reassigning to Matthew (I think you committed (most of) these files?). On a sidenote: maybe we can somehow automate the removing of such line endings (or at least warn the person committing)?

CR-LF: find . ( -name '.php' -o -name '.xml' ) -exec grep --max-count=1 --files-with-matches -P '\r\n' {} \;

well, s.th. like that - JIRA chewed some of my backslashes and asterisks ...

Fixed in r23483 , merged to 1.11 release branch in r23484

Also removed trailing spaces.

For future reference, this was done (from /library/ dir) with:

# replace CRLF with LF
find . -name '*.php' -print0 | xargs -0 perl -i -p -e 's/\r//'

# remove trailing whitespace
find . -name '*.php' -print0 | xargs -0 sed --regexp-extended --in-place 's/[ ]*$//g'