intel / ccloudvm

Configurable Cloud VM is a small command line tool for automatically creating development and demo environments for complex projects. The tool sets up these development environments inside a virtual machine which it automatically creates on the user’s host computer. This avoids polluting the user’s host machine with components from the chosen development environment and provides a clean, predictable and repeatable environment in which this development environment can run.
Apache License 2.0
32 stars 19 forks source link

Ignore errcheck errors from fmt package #103

Closed rbradford closed 5 years ago

rbradford commented 5 years ago

The behaviour of errcheck has changed so that errors from the fmt package are no longer ignored. Restore the previous behaviour by overriding the errcheck linter syntax for gometalinter.

Signed-off-by: Rob Bradford robert.bradford@intel.com

ganeshmaharaj commented 5 years ago

LGTM

ganeshmaharaj commented 5 years ago

will hold on fixing up my patches until we fix this issue. Would be nice to get the CI green on them. @markdryan are you thinking along these lines? i also had an alternate patch that addressed this here. i liked @rbradford 's patch cause it was much more cleaner, but does either of those approaches tickle you? i personally like the commenting style, but i shall let you & @rbradford make the call.

markdryan commented 5 years ago

@ganeshmaharaj The correct way to fix this is to explicitly discard all of the errors that do not need to be checked or cannot usefully be processed. This is what is done elsewhere in the code, e.g.,

https://github.com/intel/ccloudvm/blob/master/client/client.go#L176

rbradford commented 5 years ago

I agree with @markdryan. Discarding the return value by assigning to _ is much nicer than dropping all fmt errors or the lint overrides.