Fix various linting issues#2974
Conversation
|
@kolyshkin @AkihiroSuda PTAL still some to address after this (see #2966 (comment)), but cleaning up the other PR |
328690e to
a55f1d7
Compare
| type Cgroup struct { | ||
| // Deprecated, use Path instead | ||
| // Name specifies the name of the cgroup | ||
| // Deprecated: use Path instead |
There was a problem hiding this comment.
I recently found out that Name and Parent are not deprecated at least for systemd cgroup manager case, because Path can not be used in that case. This might have to be fixed, but for now, I guess, it's better to remove the deprecation notice.
| minId = 0 | ||
| maxId = 1<<31 - 1 //for 32-bit systems compatibility | ||
| minID = 0 | ||
| maxID = 1<<31 - 1 // for 32-bit systems compatibility |
kolyshkin
left a comment
There was a problem hiding this comment.
Mostly LGTM except for a few nits.
I wonder where these errors are coming from? I don't see it running golangci-lint run ./... locally, nor in GHA CI. Are you using a different golangci config or version?
|
Tentatively set 1.0.0 milestone as this seems like a good fit. |
|
I'm not sure we need to tag this for 1.0.0. If it makes it in, great -- but I think we should go for a release if #2986 fixes the Moby CI regression. |
|
Thanks for review! I'll try to update this PR later tonight
Yes; enabled "golint" and
I agree for the changes in this PR (they're "nice to have", but most can be merged at any time). That said; the linter also picked up some incorrectly named exported variables and properties; see #2966 (comment) Changing those after v1.0.0 would be a breaking change, so perhaps it's good to have a look at those, and decide wether or not they should be renamed, or "ignored" ("won't fix"). |
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
This prevents having to maintain GoDoc for the stub implementations, and makes sure that the "stub" implementations have the same signature as the "non-stub" versions. Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
libcontainer/cgroups/devices/devices_emulator.go:261:9: `if` block ends with a `return` statement, so drop this `else` and outdent its block (golint)
} else {
^
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
libcontainer/keys/keyctl.go:17:2: var `sessKeyId` should be `sessKeyID` (golint)
sessKeyId, err := unix.KeyctlJoinSessionKeyring(name)
^
libcontainer/keys/keyctl.go:27:21: func parameter `ringId` should be `ringID` (golint)
func ModKeyringPerm(ringId KeySerial, mask, setbits uint32) error {
^
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
a55f1d7 to
3e1bcb1
Compare
|
@kolyshkin @cyphar @AkihiroSuda updated; PTAL |
kolyshkin
left a comment
There was a problem hiding this comment.
LGTM (some missing periods at end of sentences but it's OK).
Thank you @thaJeztah!
Ah, sorry. yes, that's me. I have a tendency of omitting punctuation for single-line comments 😓 😅 |
splitting this from #2966
relates to #2627