Skip to content

Add clang-format config, pre-commit hooks, and CI lint workflow - #9

Merged
hguillen merged 1 commit into
mainfrom
hguillen/lint-tooling
Jun 1, 2026
Merged

Add clang-format config, pre-commit hooks, and CI lint workflow#9
hguillen merged 1 commit into
mainfrom
hguillen/lint-tooling

Conversation

@hguillen

@hguillen hguillen commented Apr 30, 2026

Copy link
Copy Markdown
Collaborator

Summary

  • Adds the .clang-format config (Google C++ style) and .pre-commit-config.yaml that CONTRIBUTING.md and README.md reference but were missing from the repo
  • Adds pre-commit to the Docker build image
  • Adds a CI lint workflow that runs pre-commit on changed files inside the Docker container

Changes

File Purpose
.clang-format Google C++ style, 100-column limit
.pre-commit-config.yaml clang-format v15, trailing-whitespace, end-of-file-fixer, check-yaml
scripts/Dockerfile Added pre-commit to the Python venv pip installs
.github/workflows/lint.yml PR lint workflow: builds Docker image, runs pre-commit run --from-ref origin/main --to-ref HEAD inside container

Design decisions

  • Changed files only, not --all-files. Avoids a bulk reformat of the existing codebase. A full-repo reformat can be a separate follow-up.
  • Runs inside Docker to match the build environment. No tools installed on bare runners.
  • Separate workflow from PR verification (which is in a separate PR). Can be merged into pr-verify.yml later.

Test plan

  • Verify lint workflow triggers on this PR
  • Verify pre-commit installs correctly in the Docker image
  • Verify clang-format runs on changed .cpp/.cu/.h files
  • Verify workflow passes when changed files are correctly formatted

@hguillen

Copy link
Copy Markdown
Collaborator Author

@coderabbitai full review

@hguillen
hguillen merged commit c703856 into main Jun 1, 2026
7 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.

2 participants