Skip to content

chore: fix golangci-lint config and regenerate mocks#29

Open
JayT106 wants to merge 4 commits intocrypto-org-chain:v0.38.xfrom
JayT106:fix/ci-golangci-lint
Open

chore: fix golangci-lint config and regenerate mocks#29
JayT106 wants to merge 4 commits intocrypto-org-chain:v0.38.xfrom
JayT106:fix/ci-golangci-lint

Conversation

@JayT106
Copy link
Copy Markdown

@JayT106 JayT106 commented Mar 13, 2026

Summary

  • Remove deprecated golint and maligned linter settings from .golangci.yml
  • Regenerate mocks with make mockery metrics

Problem

Two CI checks have been failing on v0.38.x:

  1. golangci-lint: golangci-lint v1.64+ rejects the config because golint and maligned are no longer valid linter settings (additional properties 'golint', 'maligned' not allowed). Both linters were deprecated and removed in earlier golangci-lint versions.

  2. check-mocks-metrics: Generated mock files are out of date (12 files across abci, evidence, mempool, p2p, proxy, state packages).

Changes

  • .golangci.yml: Remove golint.min-confidence and maligned.suggest-new settings (lines 38-43)
  • 12 mock files: Regenerated via make mockery metrics

Note

Two other CI failures (govulncheck, tests (05)) are pre-existing and not addressed here:

  • govulncheck: 21 known vulnerabilities in dependencies — requires dependency upgrades
  • tests (05): Flaky psql integration test — infrastructure issue

🤖 Generated with Claude Code

JayT106 and others added 3 commits March 13, 2026 15:13
- Remove deprecated `golint` and `maligned` linter settings from
  `.golangci.yml` that cause golangci-lint v1.64+ to reject the config
- Regenerate mocks with `make mockery metrics` to fix check-mocks-metrics CI

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
- Add golang.org/x/crypto, golang.org/x/net to depguard main allowlist
- Add golang.org/x/crypto, google.golang.org/protobuf to depguard test allowlist
- Fix gosimple S1009 in light/detector.go: remove redundant nil check
  before len() (len of nil slice is defined as zero)

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Add top-level prefixes for all external dependencies used in the
codebase to the depguard allowlists:

Main: golang.org/x/sync, gonum.org/v1/gonum, google.golang.org/grpc,
      google.golang.org/protobuf
Test: golang.org/x/net, google.golang.org/grpc, google.golang.org/protobuf

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@JayT106 JayT106 self-assigned this Mar 13, 2026
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@JayT106 JayT106 requested a review from songgaoye March 14, 2026 00:51
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