fix: resolve golangci-lint issues in pkg/downloader#1445
Merged
aknysh merged 1 commit intoupdate-go-getterfrom Sep 3, 2025
Merged
fix: resolve golangci-lint issues in pkg/downloader#1445aknysh merged 1 commit intoupdate-go-getterfrom
aknysh merged 1 commit intoupdate-go-getterfrom
Conversation
- Replace deprecated io/ioutil with os.CreateTemp - Add constants for magic numbers (base10, portBitSize, sshKeyFileMode) - Add constants for repeated strings (gitCommand, originRemote, gitArgSeparator) - Create gitOperationParams struct to reduce function arguments - Fix invalid URL construction in tests - Remove unused return values from test helper functions - Fix potential index out of bounds issue - Add #nosec comments for validated subprocess commands - Apply gofumpt formatting Reduces linting issues from 20 to 6 (remaining are complexity warnings)
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## update-go-getter #1445 +/- ##
====================================================
+ Coverage 55.91% 55.97% +0.06%
====================================================
Files 274 274
Lines 28902 28928 +26
====================================================
+ Hits 16161 16193 +32
+ Misses 10945 10941 -4
+ Partials 1796 1794 -2
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
aknysh
approved these changes
Sep 3, 2025
aknysh
added a commit
that referenced
this pull request
Sep 3, 2025
* updates * updates * updates * updates * updates * updates * [autofix.ci] apply automated fixes * updates * [autofix.ci] apply automated fixes * updates * updates * updates * updates * test: increase test coverage for go-getter downloader to 77.7% (#1443) * test: increase test coverage for go-getter downloader to 77.7% - Add comprehensive tests for GetCustom() method covering various scenarios (89.1% coverage) - Add tests for git operations: clone (90.9%), update (86.5%), checkout (100%), fetchSubmodules (100%) - Add tests for findRemoteDefaultBranch() method (100% coverage) - Add tests for CustomGitGetter.Get() method (100% coverage) - Define static errors in errors/errors.go to comply with golangci-lint err113 - Format code with gofumpt - Overall package coverage increased from 46.1% to 77.7% 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com> * [autofix.ci] apply automated fixes * updates --------- Co-authored-by: Claude <noreply@anthropic.com> Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com> Co-authored-by: aknysh <andriy.knysh@gmail.com> * fix: resolve golangci-lint issues in pkg/downloader (#1445) - Replace deprecated io/ioutil with os.CreateTemp - Add constants for magic numbers (base10, portBitSize, sshKeyFileMode) - Add constants for repeated strings (gitCommand, originRemote, gitArgSeparator) - Create gitOperationParams struct to reduce function arguments - Fix invalid URL construction in tests - Remove unused return values from test helper functions - Fix potential index out of bounds issue - Add #nosec comments for validated subprocess commands - Apply gofumpt formatting Reduces linting issues from 20 to 6 (remaining are complexity warnings) --------- Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com> Co-authored-by: Erik Osterman (CEO @ Cloud Posse) <erik@cloudposse.com> Co-authored-by: Claude <noreply@anthropic.com>
osterman
added a commit
that referenced
this pull request
Sep 23, 2025
* updates * updates * updates * updates * updates * updates * [autofix.ci] apply automated fixes * updates * [autofix.ci] apply automated fixes * updates * updates * updates * updates * test: increase test coverage for go-getter downloader to 77.7% (#1443) * test: increase test coverage for go-getter downloader to 77.7% - Add comprehensive tests for GetCustom() method covering various scenarios (89.1% coverage) - Add tests for git operations: clone (90.9%), update (86.5%), checkout (100%), fetchSubmodules (100%) - Add tests for findRemoteDefaultBranch() method (100% coverage) - Add tests for CustomGitGetter.Get() method (100% coverage) - Define static errors in errors/errors.go to comply with golangci-lint err113 - Format code with gofumpt - Overall package coverage increased from 46.1% to 77.7% 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com> * [autofix.ci] apply automated fixes * updates --------- Co-authored-by: Claude <noreply@anthropic.com> Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com> Co-authored-by: aknysh <andriy.knysh@gmail.com> * fix: resolve golangci-lint issues in pkg/downloader (#1445) - Replace deprecated io/ioutil with os.CreateTemp - Add constants for magic numbers (base10, portBitSize, sshKeyFileMode) - Add constants for repeated strings (gitCommand, originRemote, gitArgSeparator) - Create gitOperationParams struct to reduce function arguments - Fix invalid URL construction in tests - Remove unused return values from test helper functions - Fix potential index out of bounds issue - Add #nosec comments for validated subprocess commands - Apply gofumpt formatting Reduces linting issues from 20 to 6 (remaining are complexity warnings) --------- Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com> Co-authored-by: Erik Osterman (CEO @ Cloud Posse) <erik@cloudposse.com> Co-authored-by: Claude <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.
what
pkg/downloader/packagewhy
go-getterto the latest version #1441 (update-go-getter) has failing linting checks that prevent it from being mergedChanges Made
Fixed Issues (14):
io/ioutilwithos.CreateTempgitOperationParamsstruct to reduce function argumentsRemaining Warnings (6):
All tests pass and the code compiles successfully.
references
go-getterto the latest version #1441