Skip to content

all: enable revive linter#1025

Draft
joshuasing wants to merge 1 commit into
mainfrom
joshua/revive
Draft

all: enable revive linter#1025
joshuasing wants to merge 1 commit into
mainfrom
joshua/revive

Conversation

@joshuasing
Copy link
Copy Markdown
Contributor

@joshuasing joshuasing commented May 12, 2026

Summary
Enable revive (https://github.com/mgechev/revive) linter in golangci-lint.

This linter contains a bunch of rules focusing on: code readability, maintainability, best practices, and correctness. It can be verbose (e.g. var-naming, unused) but can often catch very subtle bugs caused by the wrong variable being used, etc.

Some rules are based on recommendations from the Go team that are enforced in Go itself, e.g. from https://go.dev/wiki/CodeReviewComments

Changes

  • Enable revive linter in .golangci.yaml
  • Fix all issues from revive linter

@github-actions github-actions Bot added area: bfg This is a change to BFG (Bitcoin Finality Governor) area: popm This is a change to popm (PoP Miner) area: hemictl This is a change to hemictl area: tbc This is a change to TBC (Tiny Bitcoin) area: hproxy This is a change to hproxyd changelog: required This pull request must update the CHANGELOG.md file or explicitly be marked with changelog: skip labels May 12, 2026
@joshuasing joshuasing added type: enhancement This improves existing functionality changelog: skip This pull request does not require a changelog entry (e.g. tests, docs, CI, minor refactors). and removed changelog: required This pull request must update the CHANGELOG.md file or explicitly be marked with changelog: skip labels May 12, 2026
@joshuasing joshuasing force-pushed the joshua/revive branch 2 times, most recently from c8cf253 to 2f1aae0 Compare May 12, 2026 21:00
Copy link
Copy Markdown
Contributor

@marcopeereboom marcopeereboom left a comment

Choose a reason for hiding this comment

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

I hate this but will allow it but not before continuum goes in (and maybe the ordinal PR). This is way too much churn for large PRs.

@ClaytonNorthey92
Copy link
Copy Markdown
Contributor

@joshuasing , I have no objections, but could we wait to merge until after the PR @marcopeereboom is getting in?

@joshuasing joshuasing marked this pull request as draft May 13, 2026 14:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area: bfg This is a change to BFG (Bitcoin Finality Governor) area: hemictl This is a change to hemictl area: hproxy This is a change to hproxyd area: popm This is a change to popm (PoP Miner) area: tbc This is a change to TBC (Tiny Bitcoin) changelog: skip This pull request does not require a changelog entry (e.g. tests, docs, CI, minor refactors). type: enhancement This improves existing functionality

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants