-
Notifications
You must be signed in to change notification settings - Fork 261
ci: add nolintlint and unconvert linters, fix found issues #2307
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
1. Move common code to atime() helper. 2. Use Atim.Unix to simplify conversion and avoid explicit typecasts. Signed-off-by: Kir Kolyshkin <kolyshkin@gmail.com>
Mostly to avoid explicit typecasts. Signed-off-by: Kir Kolyshkin <kolyshkin@gmail.com>
Those are the cases where the value being converted is already of that type (checked to be that way for all os/arch combinations). Signed-off-by: Kir Kolyshkin <kolyshkin@gmail.com>
For struct Stat_t in syscall pkg: - Ino is always uint64; - Dev/Rdev can be uint64, uint32, or int32; - Nlink might be uint64, uint32, or uint16. Fix the code accordingly, adding or removing typecasts where needed, and annotating those with //nolint:unconvert to calm down the unconvert linter. Signed-off-by: Kir Kolyshkin <kolyshkin@gmail.com>
> pkg/reexec/reexec.go:52:27: directive `//nolint: unused` is unused for linter "unused" (nolintlint) > func naiveSelf() string { //nolint: unused > ^ Signed-off-by: Kir Kolyshkin <kolyshkin@gmail.com>
> pkg/unshare/unshare_linux.go:471:64: directive `// nolint: revive,goprintffuncname` should be written without leading space as `//nolint: revive,goprintffuncname` (nolintlint) > func bailOnError(err error, format string, a ...interface{}) { // nolint: revive,goprintffuncname > ^ Signed-off-by: Kir Kolyshkin <kolyshkin@gmail.com>
Signed-off-by: Kir Kolyshkin <kolyshkin@gmail.com>
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
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: giuseppe, kolyshkin The full list of commands accepted by this bot can be found here. The pull request process is described here
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
LGTM |
/lgtm |
Please review commit by commit. See individual commits for details.