Repository navigation
Conversation
Make `make lint` pass with a focused set of changes (no repo-wide reformatting): - staticcheck QF1003: use a tagged switch on validationResult.Status - gosec G306: tighten golden-file test write perms to 0600 - lll: wrap an over-length tool description in register.go - unparam: mark the unused context param of runValidationCheck as `_` - goconst: extract check-name and status constants in app/validation.go and a declTypeFunction constant in app/ast.go Config (.golangci.yaml exclusions): - exclude goconst/dupl from _test.go (repeated literals are expected in tests) - exclude dupl/goconst from the intentionally-parallel godoc/rustdoc/pydoc doc-integration files - exclude staticcheck QF1012 (Fprintf vs WriteString(Sprintf)); the codebase uses strings.Builder.WriteString consistently across ~30 sites Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Make
make lint(golangci-lint) pass cleanly. Deliberately focused — only the files with real lint issues are touched; no repo-widegofumpt/golinesreformatting (CI doesn't enforce formatting, and that would bury the actual fixes).Code fixes
mcptool/validation.go): taggedswitchonvalidationResult.Statusinstead of if/else-if.app/godoc_golden_test.go): golden-file write perms0o644→0o600.mcptool/register.go): wrap an over-length (141 char) tool description.app/validation.go): the unusedcontext.Contextparam ofrunValidationCheckis now named_.app/validation.go,app/ast.go): extractcheckGo*/status*constants and adeclTypeFunctionconstant for the repeated literals.Config (
.golangci.yamlexclusions)goconst/duplfrom_test.go— repeated small literals are expected in tests.dupl/goconstfrom the intentionally-parallelgodoc/rustdoc/pydocdoc-integration files (the project has anadd-doc-integrationskill that creates these as parallel implementations by design).FprintfvsWriteString(Sprintf(...))) — an opinionated style quickfix that fires at ~30 sites; the codebase usesstrings.Builder.WriteStringconsistently. (golangci-lint'smax-same-issuescap hid most of these, so fixing a few just surfaces the next batch — exclusion is the consistent choice.)Verification
make lint→ 0 issuesgo build ./...✅go test ./...✅🤖 Generated with Claude Code