editorconfig / editorconfig.github.com

Configuration file format for defining coding styles in shared projects
http://editorconfig.org
Other
267 stars 42 forks source link

end_of_line should be CR and LF, a typo is on the website #1

Closed xuhdev closed 12 years ago

xuhdev commented 13 years ago

As the title. What's more, should the value be case sensitive?

treyhunner commented 13 years ago

Typo fixed (6e27fec1c12dcbc97e4a423fbdb9537d61216770).

I don't think the value should be case sensitive.

We may want to consider whether to accept CR+LF, CRLF, CR/LF or CR LF. I have seen all of these notations used online. I think we should just support CRLF with insensitive matching.

xuhdev commented 13 years ago

The "case insensitive" rule should be written on the website.

What about the case sensitivity of other properties?

CRLF is OK.

treyhunner commented 13 years ago

I'll add that rule to the website.

I'm not sure if I can predict the values of future properties. The current properties shouldn't have case conflicts, but what if we have properties in the future that define case-sensitive values?

I don't know if we should ignore case for the current properties. What do you think?

xuhdev commented 13 years ago

I think we should always do it in a case sensitivity way, or the EditorConfig core should always lower(or upper) the case when the properties are case insensitivity, to make it easier to write plugin.

treyhunner commented 13 years ago

I think the EditorConfig core should always lowercase properties that are case insensitive. So the plugins would see cr, lf, and crlf.

xuhdev commented 13 years ago

What about our existing properties?

treyhunner commented 13 years ago

We could make those case insensitive as well. Since the EditorConfig core code is handling them it shouldn't be extra hassle.

xuhdev commented 13 years ago

Should property name also be case insensitive?

treyhunner commented 13 years ago

Yes I think it would make sense to lowercase all property names.

xuhdev commented 12 years ago

This has been implemented in EditorConfig Core.

https://github.com/editorconfig/editorconfig/commit/b0c831a619b7e90357dcd29d43e72197dccd8564 https://github.com/editorconfig/editorconfig/commit/f4bec2ac90049cbfedea331039903d6653b49158

The case sensitivity should be written on the file format document. After that is done, this issue could be closed.

treyhunner commented 12 years ago

Great. Fixed in a03f061d8dfc6f093a879dd1b6313afb68e3ce4c.

xuhdev commented 12 years ago

The website has not specified the value of "indent_style" and "end_of_line" are lowercased.

treyhunner commented 12 years ago

Mentioned case insensitivity and lowercasing of indent_style and end_of_line values in 11a3df8d51306a39b946cb7cd995aa635676b859.