You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
feat: Integrate pre-commit hooks and improve CI workflows
This commit introduces pre-commit hooks to enforce code quality and consistency before commits. It includes the following changes:
- **Added `.pre-commit-config.yaml`**: Defines the pre-commit hooks to be used, covering Go formatting, linting, tidying, and general checks like trailing whitespace and end-of-file enforcement.
- **Updated `Makefile`**:
- Added `install-hooks`, `run-hooks`, and `update-hooks` targets to manage pre-commit hooks.
- `install-hooks` ensures pre-commit is installed and sets up hooks for both pre-commit and pre-push phases.
- **Updated `CONTRIBUTING.md`**: Added instructions for setting up and using pre-commit hooks, making it clear for contributors how to maintain code quality.
- **Minor CI workflow adjustments**:
- Cleaned up unnecessary blank lines in `.github/workflows/ci.yml`, `.github/workflows/go.yml`, and `.github/workflows/golangci-lint.yml`.
- Removed trailing newlines in `.github/workflows/ci.yml`, `.github/workflows/go.yml`, and `.golangci.yml` to ensure clean file endings.
These changes aim to streamline the development process, catch potential issues early, and maintain a high standard of code quality.
0 commit comments