Skip to content

Add clang-format (Google style) with lint and lint-suggest workflows - #3

Merged
HenryRLee merged 1 commit into
mainfrom
clang-format-lint
Jul 27, 2026
Merged

Add clang-format (Google style) with lint and lint-suggest workflows#3
HenryRLee merged 1 commit into
mainfrom
clang-format-lint

Conversation

@HenryRLee

Copy link
Copy Markdown
Owner

Summary

Adopts clang-format with the Google coding style and enforces it in CI.

Changes

  • .clang-formatBasedOnStyle: Google.
  • Reformat the state machine and Bayes sources to comply with the style.
  • lint workflow — a blocking check that runs clang-format --dry-run --Werror over the project's tracked C/C++ sources on every push and pull request, failing if anything is not formatted.
  • lint suggest workflow — on pull requests, runs clang-format over the changed C/C++ files and posts the required fixes as inline reviewdog suggestions (suggestion-only; the lint workflow is the gate).

legacy/ is excluded from both workflows.

Notes

  • CI uses clang-format==18.1.8; run the same locally with clang-format -i on changed files (or apply the PR suggestions).
  • Modeled on the workflow setup in HenryRLee/PokerHandEvaluator, narrowed to clang-format only.

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
@HenryRLee
HenryRLee merged commit 48fa52f into main Jul 27, 2026
5 checks passed
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.

1 participant