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

@andrew andrew commented Mar 18, 2026

Copy link
Copy Markdown
Contributor

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
@andrew
andrew deleted the fix-lint-issues branch August 12, 2026 18:57
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