Skip to content

Add editorconfig and clang-format configuration files#95

Open
rockdreamer wants to merge 1 commit into
ARM-software:masterfrom
rockdreamer:editorconfig
Open

Add editorconfig and clang-format configuration files#95
rockdreamer wants to merge 1 commit into
ARM-software:masterfrom
rockdreamer:editorconfig

Conversation

@rockdreamer

Copy link
Copy Markdown
Contributor

These files should make following the GNU and GNU libc guidelines on formatting easier.

Comment thread networking/.clang-format
AlwaysBreakAfterDefinitionReturnType: All
AlwaysBreakAfterReturnType: AllDefinitions
BreakBeforeBraces: GNU
ColumnLimit: 79

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is it actually 79 or should this be 80?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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."

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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?

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah since all of these are meant for glibc. Though @blapie what length do you folks use?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants