Skip to content
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

Build failing because of lint issues #256

Closed
jlewi opened this issue Dec 29, 2017 · 1 comment · Fixed by #257
Closed

Build failing because of lint issues #256

jlewi opened this issue Dec 29, 2017 · 1 comment · Fixed by #257
Assignees

Comments

@jlewi
Copy link
Contributor

jlewi commented Dec 29, 2017

$ gometalinter --config=linter_config.json ./pkg/...
pkg/apis/tensorflow/v1alpha1/zz_generated.deepcopy.go:416:2:warning: redundant return statement (S1023) (gosimple)
pkg/apis/tensorflow/v1alpha1/zz_generated.deepcopy.go:165:2:warning: redundant return statement (S1023) (gosimple)
pkg/apis/tensorflow/v1alpha1/zz_generated.deepcopy.go:181:2:warning: redundant return statement (S1023) (gosimple)
pkg/apis/tensorflow/v1alpha1/zz_generated.deepcopy.go:290:2:warning: redundant return statement (S1023) (gosimple)
pkg/apis/tensorflow/v1alpha1/defaults.go:1::warning: file is not goimported (goimports)
pkg/apis/tensorflow/v1alpha1/zz_generated.deepcopy.go:140:2:warning: redundant return statement (S1023) (gosimple)
pkg/apis/tensorflow/v1alpha1/zz_generated.deepcopy.go:108:2:warning: redundant return statement (S1023) (gosimple)
pkg/apis/tensorflow/v1alpha1/zz_generated.deepcopy.go:373:2:warning: redundant return statement (S1023) (gosimple)
pkg/client/informers/externalversions/internalinterfaces/factory_interfaces.go:1::warning: file is not goimported (goimports)
pkg/apis/tensorflow/v1alpha1/zz_generated.deepcopy.go:124:2:warning: redundant return statement (S1023) (gosimple)
pkg/client/clientset/versioned/fake/register.go:29:5:warning: unused variable or constant parameterCodec (varcheck)
pkg/apis/tensorflow/v1alpha1/zz_generated.deepcopy.go:1::warning: file is not goimported (goimports)
pkg/apis/tensorflow/v1alpha1/register.go:1::warning: file is not goimported (goimports)
pkg/apis/tensorflow/v1alpha1/types.go:1::warning: file is not goimported (goimports)
pkg/client/informers/externalversions/tensorflow/v1alpha1/tfjob.go:1::warning: file is not goimported (goimports)
pkg/apis/tensorflow/v1alpha1/zz_generated.deepcopy.go:345:2:warning: redundant return statement (S1023) (gosimple)
pkg/apis/tensorflow/v1alpha1/zz_generated.deepcopy.go:439:2:warning: redundant return statement (S1023) (gosimple)
pkg/client/clientset/versioned/scheme/register.go:51:32:warning: error return value not checked (tensorflowv1alpha1.AddToScheme(scheme)) (errcheck)
pkg/apis/tensorflow/helper/helpers_test.go:1::warning: file is not goimported (goimports)
pkg/apis/tensorflow/v1alpha1/zz_generated.deepcopy.go:211:2:warning: redundant return statement (S1023) (gosimple)
pkg/apis/tensorflow/helper/helpers.go:1::warning: file is not goimported (goimports)
pkg/client/informers/externalversions/factory.go:1::warning: file is not goimported (goimports)
pkg/client/informers/externalversions/generic.go:1::warning: file is not goimported (goimports)
pkg/apis/tensorflow/v1alpha1/zz_generated.deepcopy.go:236:2:warning: redundant return statement (S1023) (gosimple)
pkg/apis/tensorflow/v1alpha1/zz_generated.deepcopy.go:256:2:warning: redundant return statement (S1023) (gosimple)
pkg/client/clientset/versioned/fake/register.go:51:32:warning: error return value not checked (tensorflowv1alpha1.AddToScheme(scheme)) (errcheck)
pkg/apis/tensorflow/validation/validation.go:1::warning: file is not goimported (goimports)

My guess is that on #215 Travis hadn't been rerun since gomelinter had been added.

@jimexist Could you take a look please? I'd be ok with a quick fix of disabling lint checks on some or all of the files mentioned with problems. Some of this code like zz_generated is auto-generated and should probably be ignored.

@jlewi jlewi assigned jlewi and jimexist and unassigned jlewi Dec 29, 2017
jimexist pushed a commit to jimexist/tf-operator that referenced this issue Dec 30, 2017
@jimexist
Copy link
Member

@jlewi see #257

@jlewi jlewi closed this as completed in #257 Jan 3, 2018
jlewi pushed a commit that referenced this issue Jan 3, 2018
* fixes #256 travis build failures

* apply goimports -w to generated files to fix a bunch of lint issues.

* There's no good way to tell whether a file was generated. a better way is to ensure that all files and newly submitted ones are goimported. also from now on I think it is better to enforce that even generated code are pre-goimported.

* I didn't fix all the lint warnings because I am afraid of changing any code other than using goimport. I suggest that the original author do the changes instead.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants