Skip to content

Fix golangci-lint warnings for goconst, gocritic, and mnd#8

Merged
andrew merged 1 commit into
mainfrom
fix-lint-issues
Mar 29, 2026
Merged

Fix golangci-lint warnings for goconst, gocritic, and mnd#8
andrew merged 1 commit into
mainfrom
fix-lint-issues

Conversation

@andrew
Copy link
Copy Markdown
Contributor

@andrew andrew commented Mar 18, 2026

Resolves 20 lint warnings from golangci-lint run --enable gocritic,gocognit,gocyclo,maintidx,dupl,mnd,unparam,ireturn,goconst,errcheck:

  • Extract ecosystemMaven constant to fix goconst warning (3 occurrences)
  • Convert three if-else chains to switch statements (gocritic ifElseChain)
  • Replace magic 16 with len("?repository_url=") in capacity estimate
  • Add //nolint:mnd for idiomatic bit manipulation in hex encoding and regex match indices

Extract ecosystemMaven constant, convert if-else chains to switch
statements, replace magic number with len(), and add nolint directives
for idiomatic bit manipulation and regex match indices.
@andrew andrew merged commit e634dd5 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