Skip to content

Add .clang-format#298

Merged
pjaaskel merged 4 commits intocpc:mainfrom
gtkiku:main
Jan 27, 2026
Merged

Add .clang-format#298
pjaaskel merged 4 commits intocpc:mainfrom
gtkiku:main

Conversation

@gtkiku
Copy link
Copy Markdown
Contributor

@gtkiku gtkiku commented Jan 26, 2026

  • Constructed to roughly match existing coding style, not an exact match unfortunately due to somewhat inconsistent previous usage throughout codebase.

On a sidenote, CONTRIBUTING.md refers to Stroustrup style, but that doesn't seem to apply. Stroustrup uses a variant of K&R, and for example opening braces are placed on a new line, whereas the current codebase keeps them on the same line (generally speaking at least, grep -r '^{' finds some exceptions).

+ Constructed to roughly match existing coding style, not an exact match
  unfortunately due to somewhat inconsistent previous usage throughout
  codebase.
@gtkiku gtkiku requested a review from pjaaskel January 26, 2026 09:12
@pjaaskel
Copy link
Copy Markdown
Contributor

Thanks. Can you update the CONTRIBUTING.md as well? Early in the project we did manual code reviews and watched the style closer, it is indeed not exactly Stroustrup style. For the record, I do not have strong preferences to any particular style, but it's good to converge to unified style in each code base.

@gtkiku
Copy link
Copy Markdown
Contributor Author

gtkiku commented Jan 26, 2026

Rewrote the TCE coding style section, it now references .clang-format and also shows an example of using it to just format new modifications so as to not cause too much splash damage to files that don't fully abide by it.

Comment thread CONTRIBUTING.md Outdated
Comment thread CONTRIBUTING.md Outdated
@pjaaskel pjaaskel merged commit 922b5e1 into cpc:main Jan 27, 2026
1 check failed
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