-
Notifications
You must be signed in to change notification settings - Fork 243
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
Another bunch of warning cleanups #1364
Merged
Merged
Conversation
This file contains 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
mtrmac
changed the title
Another branch of of warning cleanups
Another bunch of of warning cleanups
Sep 26, 2022
mtrmac
changed the title
Another bunch of of warning cleanups
Another bunch of warning cleanups
Sep 26, 2022
mtrmac
force-pushed
the
warnings
branch
3 times, most recently
from
September 26, 2022 22:03
ae35e22
to
7e89278
Compare
(I’d prefer for this to be merged only after the Podman 4.3 branch point, to minimize risk.) |
rhatdan
changed the title
Another bunch of warning cleanups
[WIP] Another bunch of warning cleanups
Sep 27, 2022
mtrmac
force-pushed
the
warnings
branch
5 times, most recently
from
October 1, 2022 01:07
b4e1078
to
6475496
Compare
mtrmac
added a commit
to mtrmac/buildah
that referenced
this pull request
Oct 1, 2022
... to test containers/storage#1364 + containers/storage#1377 . Signed-off-by: Miloslav Trmač <[email protected]>
mtrmac
added a commit
to mtrmac/libpod
that referenced
this pull request
Oct 1, 2022
... to test containers/storage#1364 + containers/storage#1377 . Signed-off-by: Miloslav Trmač <[email protected]>
This was referenced Oct 1, 2022
mtrmac
added a commit
to mtrmac/buildah
that referenced
this pull request
Oct 1, 2022
... to test containers/storage#1364 + containers/storage#1377 . Signed-off-by: Miloslav Trmač <[email protected]>
mtrmac
changed the title
[WIP] Another bunch of warning cleanups
Another bunch of warning cleanups
Oct 7, 2022
mtrmac
force-pushed
the
warnings
branch
4 times, most recently
from
October 13, 2022 21:57
56f8eaa
to
c60574f
Compare
Should not change behavior. Signed-off-by: Miloslav Trmač <[email protected]>
Should not change behavior. Signed-off-by: Miloslav Trmač <[email protected]>
Should not change behavior. Signed-off-by: Miloslav Trmač <[email protected]>
Only moves unchanged code, should not change behavior. Signed-off-by: Miloslav Trmač <[email protected]>
Should not change behavior. Signed-off-by: Miloslav Trmač <[email protected]>
Should not change behavior. Signed-off-by: Miloslav Trmač <[email protected]>
Signed-off-by: Miloslav Trmač <[email protected]>
It is only used internally, and this avoids a warning about a conflict with io.ByteReader. Should not change behavior. Signed-off-by: Miloslav Trmač <[email protected]>
> ERRO [runner] Panic: paralleltest: package "main" (isInitialPkg: true, needAnalyzeSource: true): runtime error: index out of range [0] with length 0: goroutine 5859 [running]: > ... > github.com/kunwardeep/paralleltest/pkg/paralleltest.isTestFunction(0x1b7d8c0?) > github.com/kunwardeep/[email protected]/pkg/paralleltest/paralleltest.go:252 +0x165 Should not change behavior. Signed-off-by: Miloslav Trmač <[email protected]>
It can currently only fail with a broken pipe, or an invalid pattern; in either case there's no point continuing with the loop. Signed-off-by: Miloslav Trmač <[email protected]>
Signed-off-by: Miloslav Trmač <[email protected]>
Have the action handlers return an error value, and let main() format that error, if any; this avoids duplicated error formating code in the action handlers, dropping 89 lines. This might change the error format in some cases (typically %v vs. %+v). Signed-off-by: Miloslav Trmač <[email protected]>
Introduce an outputJSON helper to decrease repetition. Signed-off-by: Miloslav Trmač <[email protected]>
... and remove one WriteFile that was always failing. Signed-off-by: Miloslav Trmač <[email protected]>
... which allows us to remove an unnecessary NopCloser. Should not change behavior. Signed-off-by: Miloslav Trmač <[email protected]>
Should not change behavior. Signed-off-by: Miloslav Trmač <[email protected]>
go { cmd.Run() } means the cmd will be destructed, and stdin/stdout/stderr closed, concurrently with other goroutines trying to access stdin/stdout/stderr. Instead, do it the more traditional way and let the callers who create those subprocesses explicitly manage their lifetime. Signed-off-by: Miloslav Trmač <[email protected]>
vrothberg
approved these changes
Oct 17, 2022
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
LGTM |
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.
… slowly grinding away on
golangci-lint
outputs with various settings.Mostly just cleanups, but includes a few real bug fixes — and a change to the
golangci-lint
configuration.Note the
TarWithOptions
andImagesByTopLayer
changes, at least.Some recurring themes:
Eventually we should update to a recent Go, run
gofmt
, and re-enable all default linters ofgolangci-lint
, some of which are currently disabled.