-
Notifications
You must be signed in to change notification settings - Fork 0
Closed
Labels
enhancementNew feature or requestNew feature or request
Description
Summary
Add lefthook pre-commit hooks to workspace repos to run format and lint checks locally before commits. This will catch CI failures early and reduce failed PR checks.
Background
CI checks fail frequently because formatting and linting issues are only caught after pushing to GitHub. There are currently no local git hooks to catch these issues before commit.
Tool Choice: Lefthook
- Fast Go binary, zero runtime dependencies
- Check-only mode (no auto-fix) to match CI behavior exactly
- Pre-commit hooks only
Repos to Implement
| Repo | Language | Issue | PR |
|---|---|---|---|
| homarr-container-adapter | Rust | halos-org/homarr-container-adapter#20 | halos-org/homarr-container-adapter#21 |
| HALPI2-rust-daemon | Rust | hatlabs/HALPI2-rust-daemon#88 | hatlabs/HALPI2-rust-daemon#89 |
| container-packaging-tools | Python | halos-org/container-packaging-tools#136 | halos-org/container-packaging-tools#137 |
| cockpit-networkmanager-halos | TypeScript | halos-org/cockpit-networkmanager-halos#2 | halos-org/cockpit-networkmanager-halos#3 |
| cockpit-apt | Python + TypeScript | halos-org/cockpit-apt#122 | halos-org/cockpit-apt#123 |
Implementation Plan
Per-repo tasks
- Add
lefthook.ymlconfiguration - Add
hooks-installcommand to run script - Update README with developer setup instructions
- Test with
lefthook run pre-commit - Create PR
Workspace tasks
- Update
docs/LIFE_WITH_CLAUDE.mdwith lefthook setup instructions (docs: add lefthook setup instructions to workspace docs #52) - Mention in
AGENTS.mdthat hooks should be installed (docs: add lefthook setup instructions to workspace docs #52)
Developer Setup (after implementation)
# One-time: Install lefthook
brew install lefthook
# Per-repo: Enable hooks
cd <repo>
./run hooks-install
# Skip hooks when needed
git commit --no-verify -m "WIP: message"Tracking
- feat: add lefthook pre-commit hooks for format/lint checks homarr-container-adapter#20 → PR docs: Add comprehensive development workflow documentation #21
- feat: add lefthook pre-commit hooks for format/lint checks hatlabs/HALPI2-rust-daemon#88 → PR chore: migrate org references from hatlabs to halos-org #89
- feat: add lefthook pre-commit hooks for format/lint checks container-packaging-tools#136 → PR #137
- feat: add lefthook pre-commit hooks for format/lint checks cockpit-networkmanager-halos#2 → PR Remove casaos-docker-service submodule #3
- feat: add lefthook pre-commit hooks for format/lint checks cockpit-apt#122 → PR #123
- Workspace documentation updated → PR docs: add lefthook setup instructions to workspace docs #52
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
enhancementNew feature or requestNew feature or request