-
Notifications
You must be signed in to change notification settings - Fork 115
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
Switch to golangci-lint meta-lint tool #272
Conversation
- removed unused code in `jobsupervisor/`
- address shellcheck issues - create generic `bin/lint` and `bin/format` helpers (not named after specific formatter / linter tools) - add TODO's around making tests more modular
599a220
to
9f03a0d
Compare
} | ||
} | ||
return hints | ||
} |
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.
I assume pruneNil
is not called anywhere. Nice job cleaning up!
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.
Yup, quite a bit of dead code. Mostly stuff that was replaced by sigar
but never removed.
@@ -275,7 +275,7 @@ var _ = Describe("cascadingBlobstore", func() { | |||
blobManagers = append(blobManagers, blobManager) | |||
} | |||
|
|||
index := rand.Intn(10) | |||
index := rand.Intn(10) //nolint:gosec |
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.
Why generating a random number could provoke a security problem?
@@ -60,7 +60,3 @@ func (r *StartManager) persistentBootoncePath() string { | |||
func (r *StartManager) tmpfsBootoncePath() string { | |||
return filepath.Join(r.dirProvider.CanRestartDir(), BootonceFileName) | |||
} | |||
|
|||
func touch(fs boshsys.FileSystem, path string) error { |
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.
Is this function never used?
…vior. This fixes an inconsistency between output vs behavior that was introduced by edfed12 as part of cloudfoundry#272.
Currently bin/test-unit runs
go run golang.org/x/lint/golint
via bin/golint.The
golang.org/x/lint/golint
command has been deprecated and frozen since 2020.This commit switches to the meta-lint tool https://golangci-lint.run/
Additional Changes
bin/
golangci-lint
goimports
as recommended bygolangci-lint
goimports
addsimport
formatting and is otherwise the same asgo fmt