Skip to content

Fix lint issues from golangci-lint quality checks#4

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

Fix lint issues from golangci-lint quality checks#4
andrew merged 1 commit intomainfrom
fix-lint-issues

Conversation

@andrew
Copy link
Copy Markdown
Contributor

@andrew andrew commented Mar 18, 2026

  • Return concrete types from openTar, openZip, openGem to satisfy ireturn (nolint on the two public factory functions where returning the interface is by design)
  • Extract compareFile helper from Compare to reduce cognitive complexity below threshold
  • Convert if-else chain to switch statement in file comparison logic
  • Replace magic number 8192 with binaryCheckSize constant
  • Add TypeModified/TypeAdded/TypeDeleted constants for repeated diff type strings

Return concrete types from internal factory functions to satisfy
ireturn, extract compareFile helper to reduce cognitive complexity,
convert if-else chain to switch, and replace magic numbers and
repeated strings with named constants.
@andrew andrew merged commit dd97082 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