[reload4j] Indentation issues
Vladimir Sitnikov
sitnikov.vladimir at gmail.com
Sat Jan 15 09:47:18 CET 2022
I'm fine with virtually any formatting, however,
a) Configuring "end-of-line" markers is important, as CRLF vs LF produces
hard-to-manage conflicts in Git.
It is configured universally via .gitattributes (see pr 13)
Then git would automatically adjust newline markers on commit.
b) Please ensure the last line does end with a newline character.
In other words, I suggest that **all** lines in a file be the same: they
all should end with a newline.
Having a newline at the end of the file helps with adding new lines without
"modifying" (by adding a newline) the last line.
This is typically configured via insert_final_newline = true in
.editroconfig.
c) File charset to be UTF-8.
This is typically configured via charset = utf-8 in .editorconfig.
^^^ the above properties are vendor-neutral, language-neutral (e.g. XML,
Markdown, Java, etc),
and tool neutral (editors, linters).
----
>formatting convention as proposed by Eclipse
I would strongly recommend using **spaces** for formatting.
tabs yield insane formatting, especially when the UI can't know "tab width".
For example, pom.xml 9 levels of nesting now, and it would
result in 9(indentation level)*8(display width of single tab)=72
"characters" of indent in GitHub UI.
command-line tools like "git gui", "gitk", "git diff" would use their own
understanding of tab width.
There are languages that **forbid** tabs.
For instance, YAML forbids tabs, and Eclipse doesn't seem to be able
to set tab vs space on a per-language basis:
https://github.com/eclipse/wildwebdeveloper/issues/372#issuecomment-597485559
All-in-all, I would suggest:
1) Please use spaces for indentation.
2) Prefer vendor-agnostic standards (e.g. .gitattributes, .editorconfig)
when possible.
Eclipse lags behind in editor/IDE space, so making Eclipse configuration a
primary one
does not sound right, especially, when better standards exist and are
supported out of the box
in modern editors and linters.
Vladimir
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.qos.ch/pipermail/reload4j/attachments/20220115/0d3e844d/attachment.html>
More information about the reload4j
mailing list