Skip to content

go/lint: move gofmt into golangci-lint and add ONLY_GOLANGCI flag#325

Merged
adamdecaf merged 5 commits into
moov-io:masterfrom
rayjohnson:d0-fix
Apr 7, 2026
Merged

go/lint: move gofmt into golangci-lint and add ONLY_GOLANGCI flag#325
adamdecaf merged 5 commits into
moov-io:masterfrom
rayjohnson:d0-fix

Conversation

@rayjohnson

Copy link
Copy Markdown
Contributor

Summary

  • Removes the standalone gofmt check and adds gofmt (with simplify: true) as a linter within golangci-lint
  • Adds ONLY_GOLANGCI=yes flag to skip all other checks (dependency validation, retracted modules, build, tests) and run only golangci-lint

Test plan

  • Run ONLY_GOLANGCI=yes bash lint-project.sh and verify only golangci-lint runs
  • Run bash lint-project.sh normally and verify gofmt formatting is still checked via golangci-lint

🤖 Generated with Claude Code

@rayjohnson rayjohnson requested a review from adamdecaf as a code owner April 5, 2026 18:39

@gemini-code-assist gemini-code-assist Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Code Review

This pull request refactors the linting script to replace the manual gofmt check with the golangci-lint implementation and introduces an ONLY_GOLANGCI flag to skip auxiliary checks like gitleaks, govulncheck, and dependency verification. A review comment suggests also clearing the EXPERIMENTAL variable when ONLY_GOLANGCI is enabled to ensure experimental linters are correctly bypassed.

Comment thread go/lint-project.sh
@adamdecaf

Copy link
Copy Markdown
Member

Error: can't load config: gofmt is a formatter
The command is terminated due to an error: can't load config: gofmt is a formatter

rayjohnson and others added 2 commits April 6, 2026 16:27
Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com>
@rayjohnson

Copy link
Copy Markdown
Contributor Author

Tested in a couple repos - all seems good.

@adamdecaf adamdecaf merged commit 19ba912 into moov-io:master Apr 7, 2026
10 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