Skip to content

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

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, plugin.go.
  • Human line-by-line reviewed: None — not yet reviewed by a human.

Verification

Checkout ci/pin-golangci-lint-tools (verified commit 2d6f5e924d5c183c1c196abbd196bb1d09d6edd6), 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

No active review issues are recorded for the lint-tooling and CI standardization changes.

No open issues 🎉

What changed in this PR

This PR standardizes linting for the Drone Lambda plugin with isolated, pinned tooling and shared local and CI commands, while preserving existing build, release, and test targets.

Changes:

  • Pin golangci-lint v2.15.0 and its dependencies in a separate tools module.
  • Adopt Signet-based lint and formatting rules, wired through Makefile targets and CI.
  • Apply minimal source updates for the new lint rules.
File Description
plugin.go Replace AWS pointer helpers with new(value) and remove an obsolete lint suppression.
Makefile Add pinned lint and tool-download targets; route formatting through golangci-lint.
go.tools.sum Record checksums for tooling dependencies.
go.tools.mod Declare the isolated tools module and pinned golangci-lint dependency.
.golangci.yml Adopt shared lint and formatting rules with this module’s import prefix.
.github/​workflows/​testing.yml Run shared Makefile checks and include tooling dependencies in the cache key.

Review effort: Balanced

@appleboy
appleboy merged commit a9ac121 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