Add editorconfig and clang-format configuration files#95
Conversation
| AlwaysBreakAfterDefinitionReturnType: All | ||
| AlwaysBreakAfterReturnType: AllDefinitions | ||
| BreakBeforeBraces: GNU | ||
| ColumnLimit: 79 |
There was a problem hiding this comment.
Is it actually 79 or should this be 80?
There was a problem hiding this comment.
https://sourceware.org/glibc/wiki/Style_and_Conventions mentions
"All source files in glibc must use lines of strictly fewer than 80 characters. The only exceptions are when it's syntactically impossible to split a line for some reason."
There was a problem hiding this comment.
Ok, but then why is the top one 80? https://github.com/ARM-software/optimized-routines/pull/95/changes#diff-1026e0038b722990204a42bed8a6f7c0ec2302aa79e3fad1959d62ba968edfa2R32
Question was why networking has 1 character less..
There was a problem hiding this comment.
The 80 in the main .clang-format file is because I used the gcc conventions as a base, thinking that was adhering to the GNU Coding standard and just networking/README.md explicitly mentions code should follow GNU Coding Standard and glibc specific conventions to ease upstreaming.
TIL that the GNU Coding Standard suggests a maximum line length of 79 characters and gcc is the devious deviating project.
Happy to bring the networking/.clang-format file to the top?
There was a problem hiding this comment.
Yeah since all of these are meant for glibc. Though @blapie what length do you folks use?
These files should make following the GNU and GNU libc guidelines on formatting easier.