Req #18748 [Opn->Csd]: Add a Generic.Files.ConsistentLineEndings sniff

From: Date: Wed, 07 Nov 2012 21:32:44 +0000
Subject: Req #18748 [Opn->Csd]: Add a Generic.Files.ConsistentLineEndings sniff
References: 1  Groups: php.pear.bugs 
Request: Send a blank email to pear-bugs+get-9307@lists.php.net to get a copy of this message
Edit report at https://pear.php.net/bugs/bug.php?id=18748&edit=1 ID: 18748 Updated by: gsherwood@squiz.net Reported By: pear at kennel17 dot co dot uk Summary: Add a Generic.Files.ConsistentLineEndings sniff -Status: Open +Status: Closed Type: Feature/Change Request Package: PHP_CodeSniffer Operating System: N/A Package Version: SVN PHP Version: Irrelevant -Assigned To: +Assigned To: squiz Roadmap Versions: New Comment: -Status: Open +Status: Closed -Assigned To: +Assigned To: squiz You are right. Thanks for pointing me here. Previous Comments: ------------------------------------------------------------------------ [2012-11-07 07:26:05] happydog I believe this was fixed in 1.4.1, n'est pas? ------------------------------------------------------------------------ [2012-10-01 15:07:11] tasuki +1 It's 2012 and we still have mixed line endings! ------------------------------------------------------------------------ [2012-07-11 10:24:48] kristof +1 ------------------------------------------------------------------------ [2011-08-22 12:04:31] happydog Description: ------------ Currently, the eolChar for a given file is detected by looking at the EOL character at the end of the first line. There doesn't seem to be a sniff to detect files which have mixed EOL chars, which is something that can happen in real life and which is nearly always an error. A generic sniff should be created to detect files that use more than one EOL style. Note that even standards packages which specify a specific line-ending (e.g. the PEAR standards) will need to run this test, as they are currently checking the line-ending of just the first line, not of the file as a whole (unless Generic.Files.LineEndingsSniff is rewritten to check the whole file). ------------------------------------------------------------------------ -- Edit this bug report at https://pear.php.net/bugs/bug.php?id=18748&edit=1

« previous php.pear.bugs (#9307) next »