Skip to content

ci: pin golangci-lint tooling and checks - #150

Merged
appleboy merged 1 commit into
masterfrom
ci/pin-golangci-lint-tools
Nov 1, 2026
Merged

appleboy merged 1 commit into
masterfrom
ci/pin-golangci-lint-tools

Conversation

@appleboy

@appleboy appleboy commented Nov 1, 2026

Copy link
Copy Markdown
Owner

Summary

Standardize linting on signet's configuration, with the import prefix adapted to this module. Pin golangci-lint v2.15.0 in an isolated go.tools.mod / go.tools.sum, and run the same make lint and make fmt-check commands locally and in .github/workflows/testing.yml. Preserve existing build/release targets and test jobs. Apply formatting and the minimal lint fixes needed for the new checks.

Plan and classification

  • Goal: introduce reproducible linting in every Go repository under drone-plugin.
  • Leaf change: repository-local tooling and mechanical lint fixes; one reviewer recommended.
  • No issue identifiers were supplied.

Flow

flowchart TD
  W[testing.yml] --> M[Makefile lint and fmt-check]
  M --> T[go.tools.mod and go.tools.sum]
  M --> C[.golangci.yml]
  style W fill:#e0f2fe
  style M fill:#e0f2fe
  style T fill:#e0f2fe
  style C fill:#e0f2fe
Loading

AI authorship

  • AI used: OpenAI Codex.
  • AI-authored files: .github/workflows/testing.yml, .golangci.yml, Makefile, go.tools.mod, go.tools.sum.
  • Human line-by-line reviewed: None — not yet reviewed by a human.

Verification

Checkout ci/pin-golangci-lint-tools (verified commit a37e858b645d79ce6a321f68afede7eb0797a191), then run commands from the repository root with Go 1.26.10, Git, Make, and actionlint installed. Run make install-tools to download the pinned tools; network access to the Go module proxy is required on a cold cache. No production credentials are required.

Command Expected result Status Observed result
make lint All enabled linters pass Passed 0 issues
make fmt-check No formatting changes required Passed Exit 0
go build ./... All packages compile Passed Exit 0
go test -count=1 -timeout=5m ./... Existing tests pass Passed Exit 0
actionlint .github/workflows/testing.yml Valid workflow Passed No diagnostics
git diff --staged --check No whitespace errors Passed No diagnostics before commit

Formatting failure scenario

  1. In a disposable checkout, create lint_rollout_probe.go containing package main and func lintRolloutProbe( ){ } on separate lines.
  2. Run make fmt-check: expect a nonzero exit and a diff naming that file, with no source modification.
  3. Remove the probe and rerun make fmt-check: expect exit 0.

Execution: Passed; the malformed probe was rejected and removed. Existing code passes formatting checks.

Security, risk, and rollback

No new secrets or external interfaces. Application go.mod and go.sum remain unchanged. Stricter lint rules can reject future changes; revert this commit to restore the prior tooling. Review .golangci.yml, Makefile/workflow wiring, and source/test lint adjustments; spot-check generated tool dependencies. GitHub-hosted execution has not yet completed locally and should be checked before merge.

- Align lint rules and formatting with the signet configuration
- Pin isolated Go tooling and use the same Make targets in CI
- Resolve existing lint findings while preserving plugin behavior
Copilot AI balanced review requested due to automatic review settings November 1, 2026 06:07

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

🟢 Approval recommended

There are no active review issues blocking the lint-tooling and CI changes.

No open issues 🎉

What changed in this PR

Standardizes linting for the Telegram plugin with isolated, pinned tooling and shared local and CI commands, while preserving existing build, release, and test targets.

Changes:

  • Pins golangci-lint v2.15.0 and its dependencies in a separate tools module.
  • Routes formatting and lint checks through Makefile targets used by CI.
  • Updates import grouping and gofumpt rules to align with signet’s configuration.
File Description
Makefile Uses pinned tooling for formatting and adds lint and tool-download targets.
go.tools.sum Records checksums for tool dependencies.
go.tools.mod Declares the isolated tools module and pins golangci-lint.
.golangci.yml Configures module-specific import grouping and gofumpt rules.
.github/​workflows/​testing.yml Runs shared Makefile checks and includes tool dependencies in caching.

Review effort: Balanced

@appleboy
appleboy merged commit e90cb55 into master Nov 1, 2026
13 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants

⌂ 换网址