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

From: Date: Wed, 07 Nov 2012 07:26:05 +0000
Subject: Req #18748 [Opn]: Add a Generic.Files.ConsistentLineEndings sniff
References: 1  Groups: php.pear.bugs 
Request: Send a blank email to pear-bugs+get-9306@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: pear@kennel17.co.uk Reported By: pear at kennel17 dot co dot uk Summary: Add a Generic.Files.ConsistentLineEndings sniff Status: Open Type: Feature/Change Request Package: PHP_CodeSniffer Operating System: N/A Package Version: SVN PHP Version: Irrelevant Roadmap Versions: New Comment: I believe this was fixed in 1.4.1, n'est pas? Previous Comments: ------------------------------------------------------------------------ [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 (#9306) next »