Skip to content

Fix all golangci-lint issues across 35 files#25

Merged
andrew merged 1 commit intomainfrom
lint-fixes
Mar 29, 2026
Merged

Fix all golangci-lint issues across 35 files#25
andrew merged 1 commit intomainfrom
lint-fixes

Conversation

@andrew
Copy link
Copy Markdown
Contributor

@andrew andrew commented Mar 18, 2026

Resolve 62 lint issues reported by gocritic, gocognit, gocyclo, dupl, mnd, unparam, ireturn, goconst, and errcheck linters. Net reduction of 819 lines.

  • Extract test helpers to eliminate duplicate test code in carthage, cpan, gem, golang, maven, nuget, and pypi
  • Reduce cognitive complexity by extracting helpers from parsers in rubygems, github_actions, golang, bun, npm, pnpm, and yarn
  • Replace magic numbers with named constants across 15 packages
  • Replace repeated string literals with constants in cpan, maven, pypi, nuget, and rubygems
  • Simplify else-if chains in conan, golang, npm, and swift tests
  • Remove unused function parameters in git and golang test helpers

Resolve 62 lint issues reported by gocritic, gocognit, gocyclo, dupl,
mnd, unparam, ireturn, goconst, and errcheck linters.

- Extract test helpers to eliminate duplicate test code
- Reduce cognitive complexity by extracting helper functions from parsers
- Replace magic numbers with named constants
- Replace repeated string literals with constants
- Simplify else-if chains
- Remove unused function parameters
@andrew andrew merged commit 492df4a into main Mar 29, 2026
2 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.

1 participant