This is the mail archive of the binutils@sourceware.org mailing list for the binutils project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: First-time binutils repository code-stare - indentation and contribution process


Thanks for the replies (which I somehow managed to miss until the second one).

I'm not going to touch any existing whitespace now. For new code I'd
like to confirm one last thing: when indenting code to a deep level,
is leading spaces acceptable or should every 8 spaces always be
replaced with a hard tab char? I'm hoping that the 8 column tab is
only for display purposes and that simple 2-space indentation with no
hard tab chars is fine for new code. Many editors don't like this of
course.


As for editorconfig, I have a simple version below this and want to
point out that not all editorconfig plugins or editors support all
properties. For the most part this should not be an issue, since the
support of properties are based on what the editor can do in the first
place. For example, SublimeText doesn't let you specify a display size
for tab characters that is different from the indentation level, so
"tab_size" in .editorconfig is ignored and tabs get displayed as 2
columns wide.

"""
# EditorConfig: http://EditorConfig.org

root = true

[*]
charset = utf-8
end_of_line = lf
indent_size = 2
tab_width = 8
indent_style = space
insert_final_newline = true
trim_trailing_whitespace = true

[*Makefile*]
indent_style = tab

# Windows specific files should keep CRLF EOL
[*.bat]
end_of_line = crlf

# Sub-directories of zlib that are Windows specific
[zlib/contrib/dotzlib/**]
end_of_line = crlf

[zlib/contrib/masmx*/**]
end_of_line = crlf

[zlib/contrib/vstudio/**]
end_of_line = crlf
"""

Francois


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]