pzoio / impala

Automatically exported from code.google.com/p/impala
1 stars 2 forks source link

Inconsistent character encoding, line endings and tab characters in Impala source #169

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
When contributing to a new project I like to use the same tab style, line 
endings, character encodings as the project, so that diffs of any of my 
patches/commits aren't full of white space changes.
When modifying http://impala.googlecode.com/svn/trunk/impala/impala-
jmx/src/META-INF/impala-jmx-bootstrap.xml I noticed that the file is 
inconsistent within itself! Both CRLF and LF is used to terminate line 
endings, there is a mixture of tab characters and spaces used to indent 
lines (I would prefer all spaces), also the file contains the header <?xml 
version="1.0" encoding="UTF-8"?>, but its actual character encoding is ANSI 
(as reported by Notepad++ on Windows) (I don't think this would cause a 
problem because UTF-8 = ANSI for low character codes).

All good editors can handle such a mixed up file without any problem. Maybe 
it is not worth the effort of standardising (in which case this issue is a 
non issue).

On the other hand, I had a quick look at the Hibernate source and they 
consistently use all spaces (no tabs) and LF to terminate lines, so maybe 
this is the way to go. I wouldn't worry about changing the actual character 
encoding from ANSI to UTF-8, because they are equivalent, unless you want 
to use a different alphabet (e.g. for i18n, in which case it would only be 
your i18n properties files which would really need to be UTF-8).

Original issue reported on code.google.com by mail4...@gmail.com on 23 Mar 2009 at 11:16

GoogleCodeExporter commented 9 years ago

Original comment by philzoio...@googlemail.com on 23 Mar 2009 at 12:39

GoogleCodeExporter commented 9 years ago
Fixed with r3851 and r3853.

Line endings converted to lf. Also using 4 spaces instead of tabs.
Also set output encoding to UTF8

Added fixcrlf task, which can be used in workspace from main build project 
using ant
shared:fixcrlf

Original comment by philzoio...@googlemail.com on 18 Apr 2009 at 10:13

GoogleCodeExporter commented 9 years ago
With r3866, parameterising options so that it is possible to override with 
entries in
build.properties.

Conventions for name is fixcrlf.attribute, where attribute is the name of the 
ANT
attribute (all lower case). e.g. fixcrlf.eol

Original comment by philzoio...@googlemail.com on 20 Apr 2009 at 7:49

GoogleCodeExporter commented 9 years ago

Original comment by philzoio...@googlemail.com on 14 May 2009 at 8:17