-
Notifications
You must be signed in to change notification settings - Fork 594
chore(general): minor cleanups #4704
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This PR includes cleanup and refactoring across multiple packages, improving naming consistency and test assertions while removing obsolete lint configurations.
- Use
slices.CloneinSortByTimefor clearer slice copying. - Rename the exported function
DropDeletedContentsto unexporteddropDeletedContentsand update references. - Refactor tests to use
requireassertions and remove an outdated.gometalinter.json.
Reviewed Changes
Copilot reviewed 7 out of 7 changed files in this pull request and generated no comments.
Show a summary per file
| File | Description |
|---|---|
| snapshot/manifest.go | Switched to slices.Clone instead of manual slice append. |
| repo/maintenance/maintenance_run.go | Updated call from DropDeletedContents to dropDeletedContents. |
| repo/maintenance/drop_deleted_contents.go | Renamed DropDeletedContents to dropDeletedContents. |
| repo/content/committed_content_index.go | Renamed fetchOne to fetchIndexBlob for clarity. |
| internal/repotesting/repotesting_test.go | Replaced manual error checks with require assertions. |
| cli/command_snapshot_verify.go | Removed //nolint:wrapcheck directive. |
| .gometalinter.json | Deleted obsolete linter configuration. |
Comments suppressed due to low confidence (4)
repo/maintenance/drop_deleted_contents.go:12
- Making
DropDeletedContentsunexported is a breaking change in the repo API; consider providing a deprecated alias or ensuring no external callers rely on this function.
func dropDeletedContents(ctx context.Context, rep repo.DirectRepositoryWriter, dropDeletedBefore time.Time, safety SafetyParameters) error {
internal/repotesting/repotesting_test.go:77
- [nitpick] The error message 'failed to get create snapshot' is grammatically incorrect; consider using 'failed to create snapshot' for clarity.
require.NoError(t, err, "failed to get create snapshot")
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## master #4704 +/- ##
==========================================
+ Coverage 75.86% 76.38% +0.51%
==========================================
Files 470 530 +60
Lines 37301 40371 +3070
==========================================
+ Hits 28299 30838 +2539
- Misses 7071 7494 +423
- Partials 1931 2039 +108 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
|
cc: @andrason |
Rohit-BM18
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
slices.Clone.gometalinter.jsonmaintenance.dropDeletedContentsfetchIndexBlobrequireinTestTimeFuncWiring