Closed Br1ght0ne closed 5 years ago
Sure, we can add it. I would just reduce it to the essentials:
[*]
charset = utf-8
indent_style = tab
tab_width = 8
If something more is needed it can always be added later.
Also I'm not sure I understand insert_final_newline
. Does it just insert an empty line at the end and why would you want that?
Also I'm not sure I understand insert_final_newline. Does it just insert an empty line at the end and why would you want that?
It just adds a newline (\n
) at the end of every file, thus adhering to the POSIX standards. See Why should text files end with a newline? | StackOverflow.
Also, I'm not sure on tab_width = 8
. This is just a visual thing for the editors, and 8 spaces for a tab seems... Overkill. (subjective)
Also I'm not sure I understand insert_final_newline. Does it just insert an empty line at the end and why would you want that?
It just adds a newline (
\n
) at the end of every file, thus adhering to the POSIX standards. See Why should text files end with a newline? | StackOverflow.
Oh, ok we can add that. I thought it added another empty line.
Also, I'm not sure on
tab_width = 8
. This is just a visual thing for the editors, and 8 spaces for a tab seems... Overkill. (subjective)
It does matter here because after indenting with tabs, spaces are used for precise alignment, and the code is already aligned assuming a tab width of 8. As one example see src/tmatrix.cpp
, line 56.
Users can always set constant tab width in their editors but it will be their fault if the code isn't aligned for them.
It does matter here because after indenting with tabs, spaces are used for precise alignment, and the code is already aligned assuming a tab width of 8. As one example see
src/tmatrix.cpp
, line 56.
Thank you for clarifying.
I incorporated your suggestions, and also added trim_trailing_whitespace = true
- because trailing whitespace never helped anybody.
I incorporated your suggestions, and also added
trim_trailing_whitespace = true
- because trailing whitespace never helped anybody.
I like this in principle, but in markdown files two trailing spaces can (and here in CONTRIBUTING.md
are) used as a line break. Creating special cases for this would just be messier so I would just leave it out.
Also I'd remove everything above line 8. The style of the config file is pretty verbose by itself so there's no need to explain things further.
Sure, thanks!
Nice, thank you!
When working on #17, I (again) used spaces instead of tabs as the project tries to.
EditorConfig is a tool aimed at standardising simple formatting rules for software projects. Here is an
.editorconfig
file that has sensible defaults and uses tabs for completions, C++ source files andCMakeLists.txt
.