Add clang-format (Google style) with lint and lint-suggest workflows - #3
Merged
Conversation
Adopt clang-format with the Google coding style and enforce it in CI. - Add a .clang-format based on the Google style and reformat the state machine and Bayes sources accordingly - Add a lint workflow that fails a push or pull request when any tracked C/C++ source is not clang-format clean - Add a lint-suggest workflow that posts the required formatting fixes as inline reviewdog suggestions on pull requests Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Copilot-Session: 60fdb396-8310-4c8b-b763-232614bf3a89
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Adopts clang-format with the Google coding style and enforces it in CI.
Changes
.clang-format—BasedOnStyle: Google.lintworkflow — a blocking check that runsclang-format --dry-run --Werrorover the project's tracked C/C++ sources on every push and pull request, failing if anything is not formatted.lint suggestworkflow — on pull requests, runs clang-format over the changed C/C++ files and posts the required fixes as inline reviewdog suggestions (suggestion-only; thelintworkflow is the gate).legacy/is excluded from both workflows.Notes
clang-format==18.1.8; run the same locally withclang-format -ion changed files (or apply the PR suggestions).HenryRLee/PokerHandEvaluator, narrowed to clang-format only.