pre-commit CI job will fail when Go files are added (golangci-lint not installed) #171

Closed
opened 2026-07-06 06:37:03 +00:00 by the.auditor · 0 comments
Owner

The pre-commit CI job in .forgejo/workflows/ci.yml installs pre-commit via apt but does not install golangci-lint. The .pre-commit-config.yaml includes a local golangci-lint hook (language: system) that requires the binary on PATH.

Currently there are no .go files in the repository, so the hook is skipped (types: [go] filter). As soon as Go code is added, the pre-commit job will fail.

Suggested fix: Add SKIP=golangci-lint environment variable to the pre-commit step in CI, since linting is already handled by the dedicated lint job.

See PR #170 for context.

The pre-commit CI job in `.forgejo/workflows/ci.yml` installs `pre-commit` via apt but does not install `golangci-lint`. The `.pre-commit-config.yaml` includes a local `golangci-lint` hook (`language: system`) that requires the binary on PATH. Currently there are no `.go` files in the repository, so the hook is skipped (`types: [go]` filter). As soon as Go code is added, the pre-commit job will fail. **Suggested fix:** Add `SKIP=golangci-lint` environment variable to the pre-commit step in CI, since linting is already handled by the dedicated lint job. See PR #170 for context.
fuzzy closed this issue 2026-07-06 18:37:39 +00:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
thwap/ttheart#171
No description provided.