Skip to content

RFC: Add clang-format configuration and CONTRIBUTING.md#855

Open
lemenkov wants to merge 1 commit intoSIPp:masterfrom
lemenkov:clang_format
Open

RFC: Add clang-format configuration and CONTRIBUTING.md#855
lemenkov wants to merge 1 commit intoSIPp:masterfrom
lemenkov:clang_format

Conversation

@lemenkov
Copy link
Member

Add .clang-format with proposed code style for discussion:

  • 4-space indentation (no tabs)
  • Allman/BSD brace style
  • 120 character line limit
  • Pointer/reference aligned right (char *ptr)
  • Includes not sorted (to avoid breaking builds)

Also add CONTRIBUTING.md with formatting instructions and editor integration tips.

CI enforcement will be added after the team agrees on the style.

Add .clang-format with proposed code style for discussion:
- 4-space indentation (no tabs)
- Allman/BSD brace style
- 120 character line limit
- Pointer/reference aligned right (char *ptr)
- Includes not sorted (to avoid breaking builds)

Also add CONTRIBUTING.md with formatting instructions and editor
integration tips.

CI enforcement will be added after the team agrees on the style.

Signed-off-by: Peter Lemenkov <lemenkov@gmail.com>
Assisted-by: Claude (Anthropic) <https://claude.ai>
@orgads
Copy link
Contributor

orgads commented Feb 10, 2026

Does the entire codebase conform to these format rules? Do we need another commit for "format everything"?

@lemenkov
Copy link
Member Author

Does the entire codebase conform to these format rules? Do we need another commit for "format everything"?

No, not yet. So we do need a commit to enforce everything. We could do it gradually - every new PR will make us closer.

NamespaceIndentation: None

# Braces - Allman/BSD style (braces on their own lines)
BreakBeforeBraces: Allman
Copy link
Contributor

Choose a reason for hiding this comment

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

The code has both Allman and Linux. I generally prefer Linux actually (https://clang.llvm.org/docs/ClangFormatStyleOptions.html#breakbeforebraces)

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants

Comments