Conversation
- Upgrade Go version in CI workflow to 1.25 and 1.26 - Update actions/checkout and actions/setup-go to v6 - Upgrade codecov-action to v6 - Refactor various functions to use context for better cancellation support - Improve variable naming for clarity - Add verification step in Makefile for Go installation - Update linters and their settings in .golangci.yml
Codecov Report❌ Patch coverage is
❌ Your patch status has failed because the patch coverage (64.29%) is below the target coverage (70.00%). You can increase the patch coverage or adjust the target coverage. Additional details and impacted files@@ Coverage Diff @@
## main #53 +/- ##
=======================================
Coverage 76.95% 76.95%
=======================================
Files 28 28
Lines 1167 1167
=======================================
Hits 898 898
Misses 218 218
Partials 51 51
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:
|
There was a problem hiding this comment.
Pull request overview
Updates the project to work with a newer golangci-lint configuration/tooling, including lint-driven Go code cleanups and CI/Makefile adjustments.
Changes:
- Refactors various identifiers and APIs to satisfy updated lint rules (e.g.,
any,assetID,downloadURL, request context propagation). - Updates golangci-lint configuration to v2-style YAML and adds/adjusts targeted
//nolintsuppressions. - Updates local tooling (Makefile) and CI workflow to install/run golangci-lint v2.
Reviewed changes
Copilot reviewed 22 out of 22 changed files in this pull request and generated 6 comments.
Show a summary per file
| File | Description |
|---|---|
| update.go | Renames assetId → assetID for Go initialism conventions. |
| repository_slug.go | Updates Get() return type to any. |
| repository_id.go | Updates Get() return type to any. |
| repository.go | Updates interface Get() return type to any. |
| package.go | Uses http.NewRequestWithContext for proper cancellation propagation. |
| mockdata_test.go | Minor formatting + identifier initialism cleanup in tests. |
| log.go | Updates logger variadics from interface{} to any. |
| internal/resolve_path_windows.go | Import formatting + adds gosec suppression on Windows syscall. |
| http_source_test.go | Renames test helper Http... → HTTP... (initialism). |
| http_source.go | downloadURL rename + adds //nolint:staticcheck suppressions on Http* API. |
| http_release.go | Adds //nolint:staticcheck suppressions on Http* API. |
| gitlab_source.go | downloadURL rename + related log/message update. |
| gitlab_release.go | Removes redundant cast when setting asset ID. |
| github_source.go | downloadURL rename in proxy download path. |
| github_release.go | Receiver rename (a → r) for consistency. |
| detect_test.go | Removes per-iteration loop var rebinding in parallel subtests. |
| decompress.go | Uses embedded gzip header field (r.Name) instead of r.Header.Name. |
| cmd/serve-repo/logger.go | Adds gosec suppression on a request logging line. |
| arm_test.go | Uses exec.CommandContext (adds context import). |
| Makefile | Adds tool installation targets and switches to a golangci-lint-v2 binary. |
| .golangci.yml | Migrates config to golangci-lint v2 format + updates exclusions/settings structure. |
| .github/workflows/build.yml | Updates Go matrix + action versions and adds golangci-lint GitHub Action step. |
Comments suppressed due to low confidence (2)
package.go:58
http.NewRequestWithContextalready attachesctxto the request, so the subsequentreq = req.WithContext(ctx)is redundant. Consider removing the extraWithContextcall to avoid confusion and keep the request construction minimal.
req, err := http.NewRequestWithContext(ctx, http.MethodGet, url, nil)
if err != nil {
return nil, err
}
req = req.WithContext(ctx)
http_release.go:32
- Same concern as in
http_source.go://nolint:staticcheckon these exportedHttp*types suppresses all staticcheck checks for the declaration. If this is only to avoid ST1003 (HTTP initialism), it’s safer to exclude that specific check in the linter config (or add a justification) rather than blanket-disabling staticcheck here.
type HttpAsset struct { //nolint:staticcheck
ID int64 `yaml:"id"`
Name string `yaml:"name"`
Size int `yaml:"size"`
URL string `yaml:"url"`
}
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 21 out of 21 changed files in this pull request and generated 1 comment.
Comments suppressed due to low confidence (1)
package.go:58
http.NewRequestWithContextalready attachesctxto the request, so the subsequentreq = req.WithContext(ctx)is redundant. Dropping the extraWithContextcall will simplify the code and avoid implying that the first call might not have set the context.
req, err := http.NewRequestWithContext(ctx, http.MethodGet, url, nil)
if err != nil {
return nil, err
}
req = req.WithContext(ctx)
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
No description provided.