Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
This PR enhances the CI/CD pipeline by integrating pre-commit hooks and automated linting/formatting checks into both local development workflows and GitHub Actions CI. The changes introduce a --check mode to the formatting script and configure pre-commit to automatically run clang-format and clang-tidy on pre-push, while also adding these checks to the CI pipeline before building.
Key Changes:
- Added
--checkflag toformat.shfor non-destructive formatting validation - Configured pre-commit hooks to run clang-format and clang-tidy on pre-push stage
- Enhanced CI workflow to run format and lint checks before building
Reviewed changes
Copilot reviewed 5 out of 5 changed files in this pull request and generated 3 comments.
Show a summary per file
| File | Description |
|---|---|
scripts/format.sh |
Added --check mode for formatting validation without file modifications |
.pre-commit-config.yaml |
Migrated from remote mirrors to local scripts, configured hooks for pre-push stage |
.github/workflows/ci.yml |
Added format and lint check steps, installed clang-tidy dependency |
README.md |
Added instructions for installing pre-commit hooks in quick start section |
.devcontainer/devcontainer.json |
Automated pre-commit hook installation via postCreateCommand |
Critical Issues Found:
- The CI workflow runs lint checks before the build directory is created, which will cause failures since
lint.shrequirescompile_commands.json - Pre-commit hooks have the same build directory dependency issue
- The format pre-commit hook doesn't use
--checkmode, causing unexpected file modifications during validation
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
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.
Description
This pull request resolves #28 and introduces improvements to code quality enforcement and developer workflow by enhancing formatting and linting automation. The changes ensure that code is consistently checked and formatted using pre-commit hooks and CI jobs, making it easier to maintain code standards across the project.
Pre-commit and Code Quality Automation:
pre-commithooks for bothclang-formatandclang-tidy, configured to run on pre-push, and updated the.pre-commit-config.yamlto use local scripts for formatting and linting. (.pre-commit-config.yaml).devcontainer/devcontainer.json)README.mdinstructing developers to install pre-commit hooks for code quality checks. (README.md)Continuous Integration Enhancements:
.github/workflows/ci.yml)Script Improvements:
scripts/format.shto support a--checkmode for verifying formatting without modifying files, and integrated this into both CI and pre-commit workflows. (scripts/format.sh) [1] [2]