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

[CI/CD] Add clang-format workflow #3

Merged
merged 1 commit into from
Jun 3, 2024
Merged

Conversation

ByteOtter
Copy link
Member

What?

Add a clang-format workflow to the repo to check for code style using the existing .clang-format file.

This PR uses this existing workflow to improve and enforce code quality.

Links

Fixes: #2
Tracks: N/A

@ByteOtter
Copy link
Member Author

@marv7000 looks like your .clang-format file was not correct, so I adjusted it according to my language server suggestions. The checks still fail though, because $REASON.

@marv7000
Copy link
Contributor

marv7000 commented Jun 3, 2024

Yea, I kind of just glossed over the docs for it. It fails because of "VariableCase" not being a key

@marv7000
Copy link
Contributor

marv7000 commented Jun 3, 2024

You might have to just nuke the case and comment style blocks at the end, since they don't seem to exist

@ByteOtter ByteOtter force-pushed the add-format-workflow branch 7 times, most recently from d07ed10 to 1b5f01e Compare June 3, 2024 21:20
bump clang format version to 18

Fix clang-format file

Fix .clang-format

Co-authored-by: Marvin Friedrich <contact@marvinf.com>
@ByteOtter ByteOtter force-pushed the add-format-workflow branch from 1b5f01e to ad8a8d4 Compare June 3, 2024 21:21
@ByteOtter
Copy link
Member Author

Yeah let's just keep it running over the entire codebase. You gotta fix the warnings anyway or add

int formatted_code;
// clang-format off
    void    unformatted_code  ;
// clang-format on
void formatted_code_again;

According to https://clang.llvm.org/docs/ClangFormatStyleOptions.html

@ByteOtter ByteOtter merged commit cf6c495 into main Jun 3, 2024
1 check failed
@ByteOtter ByteOtter deleted the add-format-workflow branch June 3, 2024 21:24
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.

[Feature] Setup clang-format linting for Pull Requests
2 participants