Skip to content

ci: standardize lint tooling and testing - #210

Merged
appleboy merged 1 commit into
masterfrom
ci/standardize-lint-tooling
Oct 31, 2026
Merged

appleboy merged 1 commit into
masterfrom
ci/standardize-lint-tooling

Conversation

@appleboy

Copy link
Copy Markdown
Member

Summary

Standardize the local and CI lint/test entry points using the signet reference. Pin golangci-lint v2.15.0 in a separate tools module and commit its checksums. Consolidate lint/testing in .github/workflows/testing.yml, run the same Make targets in CI, and retain repository-specific test matrices, service setup, benchmarks, and security steps.

  • Resolve lint findings and normalize formatting in the affected source/tests, preserving public APIs.

Plan and classification

Scope: align .golangci.yml, go.tools.mod, Makefile and testing workflow; resolve enabled lint findings, including tracked nested example modules. No issue or Jira reference was supplied.

Leaf change — changes are bounded to development tooling, tests and/or examples; one reviewer is recommended.

flowchart TD
    CI[testing.yml] --> Make[Makefile lint and test]
    Make --> Tools[go.tools.mod pinned lint tool]
    style CI fill:#e8f4ff,stroke:#246
    style Make fill:#e8f4ff,stroke:#246
    style Tools fill:#e8f4ff,stroke:#246
Loading

Verification

Checkout ci/standardize-lint-tooling and use the repository root. Go 1.26.10 or newer, Make, Git, network access for Go modules, and actionlint. Run all commands from the repository root.

Command Expected behavior Observed result
make install-tools Download pinned tooling Passed
go tool -modfile=go.tools.mod golangci-lint config verify Accept the lint configuration Passed
make fmt then make lint Format and lint all configured modules Passed; 0 lint issues in every configured module
make test Run the repository tests and compile included examples All configured packages and nested example modules passed (where present); examples without tests compiled successfully.
actionlint .github/workflows/testing.yml Validate workflow syntax and expressions Passed
git diff --staged --check No whitespace errors Passed before commit

Behavioral check (Passed): from this branch, run make install-tools, make lint, then make test; each exits zero. Lint resolves its executable through go.tools.mod rather than relying on a globally installed binary. Any configured module failure propagates a nonzero exit to CI.

Verification runtime: Go 1.26.10 darwin/arm64. The Go 1.26/1.27 hosted CI matrix has not been observed before opening this PR. External security scanners and Codecov upload require GitHub Actions and were not executed locally.

Cleanup: remove generated coverage.txt/coverage.out if present; stop only disposable test containers created for this verification.

AI authorship

  • AI was used: OpenAI Codex.
  • AI-authored files: .github/workflows/golangci-lint.yml, .github/workflows/testing.yml, .golangci.yml, Makefile, ace-template/main_test.go, app-engine/go11x/hello.go, basic/main_test.go, cors-middleware/main.go, custom-validation/server.go, file-binding/main.go, go.tools.mod, go.tools.sum, grpc/example1/gin/main.go, grpc/example1/grpc/server.go, new_relic/main.go, oidc/main.go, otel/main.go, realtime-advanced/main.go, realtime-advanced/routes.go, realtime-advanced/stats.go, realtime-chat/main.go, realtime-chat/rooms.go, send_chunked_data/send_chunked_data.go, server-sent-event/main.go, upload-file/limit-bytes/main_test.go.
  • Human line-by-line reviewed: None — not yet reviewed by a human.

Risk and rollback

Stricter lint checks may reject future code or require formatting updates. Review the Makefile module coverage and workflow matrix/service preservation. Dependency changes are confined to the tools module; revert this commit to restore the prior tooling.

No secrets were added. Any service credentials in the verification recipe are disposable test-only values. Review source changes carefully; checksum updates are mechanical.

- Pin lint tooling and align local checks with CI
- Cover configured modules and resolve lint findings
@appleboy
appleboy merged commit aa72e3e into master Oct 31, 2026
10 checks passed
@appleboy
appleboy deleted the ci/standardize-lint-tooling branch October 31, 2026 04:14
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.

1 participant