Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Enable consistent clang format for the project #122

Merged
merged 10 commits into from
Sep 10, 2023

Conversation

baconpaul
Copy link
Collaborator

  1. Add a .clang-format which is basically 2 spaces, allman braces, embedded namespaces.
  2. Reformat the entire codebase with find src -iname ".cpp" -o -iname ".h" -o -iname "*.mm" | xargs clang-format -i
  3. add a cmake code checks target which currently just checkes that the code remains clang formatted
  4. Add a github action which runs that code check target on ubuntu on a PR

1. Add a .clang-format which is basically 2 spaces, allman braces,
   embedded namespaces.
2. Reformat the entire codebase with
   find src -iname "*.cpp" -o -iname "*.h" -o -iname "*.mm" | xargs clang-format -i
3. add a cmake code checks target which currently just checkes that
   the code remains clang formatted
4. Add a github action which runs that code check target on ubuntu on a PR
.clang-format Outdated
IndentWidth: 2
AlignAfterOpenBracket: Align
BreakBeforeBraces: Allman
ColumnLimit: 250
Copy link
Collaborator

Choose a reason for hiding this comment

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

Do we really wanna turn off automatic line breaks? Kinda hard to work with on a laptop. How about something generous like 105?

Copy link
Collaborator

@0ax1 0ax1 left a comment

Choose a reason for hiding this comment

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

🚀

@defiantnerd defiantnerd merged commit 019afea into free-audio:next Sep 10, 2023
@baconpaul baconpaul deleted the clang-format branch September 11, 2023 22:17
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.

3 participants