Skip to content

Conversation

@wambitz
Copy link
Owner

@wambitz wambitz commented Dec 15, 2025

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:

  • Added pre-commit hooks for both clang-format and clang-tidy, configured to run on pre-push, and updated the .pre-commit-config.yaml to use local scripts for formatting and linting. (.pre-commit-config.yaml)
  • Updated the development container to automatically install pre-commit hooks after creation. (.devcontainer/devcontainer.json)
  • Added documentation in README.md instructing developers to install pre-commit hooks for code quality checks. (README.md)

Continuous Integration Enhancements:

  • Improved the CI workflow to include format and lint checks using the new scripts before building and testing. (.github/workflows/ci.yml)

Script Improvements:

  • Enhanced scripts/format.sh to support a --check mode for verifying formatting without modifying files, and integrated this into both CI and pre-commit workflows. (scripts/format.sh) [1] [2]

@wambitz wambitz self-assigned this Dec 15, 2025
Copilot AI review requested due to automatic review settings December 15, 2025 04:24
@wambitz wambitz added the enhancement New feature or request label Dec 15, 2025
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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 --check flag to format.sh for 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.sh requires compile_commands.json
  • Pre-commit hooks have the same build directory dependency issue
  • The format pre-commit hook doesn't use --check mode, causing unexpected file modifications during validation

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

wambitz and others added 3 commits December 14, 2025 20:34
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>
@wambitz wambitz merged commit f2f71a7 into main Dec 15, 2025
5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

ci: fix pre-commit config, harmonize lint/format checks in CI and dev

2 participants