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

Improve GoReportCard metrics, both gofmt and golint #90

Merged
merged 2 commits into from Mar 5, 2018

Conversation

okartau
Copy link
Contributor

@okartau okartau commented Jan 31, 2018

Order of import changed in main.go and network.go,
missing ending newline added in fake.go

[warm-up exercise as just starting with this project. This change is expected to set gofmt metrics to 100%]

@k8s-ci-robot k8s-ci-robot added cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. size/XS Denotes a PR that changes 0-9 lines, ignoring generated files. labels Jan 31, 2018
@k8s-ci-robot k8s-ci-robot added size/S Denotes a PR that changes 10-29 lines, ignoring generated files. and removed size/XS Denotes a PR that changes 0-9 lines, ignoring generated files. labels Feb 12, 2018
@okartau okartau changed the title Format main,fake,network go source to improve GoReportCard Improve GoReportCard metrics, both gofmt and golint Feb 12, 2018
@@ -6,6 +6,7 @@ import (
api "k8s.io/client-go/pkg/api/v1"
)

// MockAPIHelpers for testing support
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This file is auto-generated. Making manual changes to auto-generated files is not recommended. Please revert this change.

@@ -2,6 +2,7 @@ package main

import "github.com/stretchr/testify/mock"

// MockFeatureSource for testing support
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This file is auto-generated. Making manual changes to auto-generated files is not recommended. Please revert this change.

@@ -19,13 +19,15 @@ package fake
// Source implements FeatureSource.
type Source struct{}

// Name returns a friendly name for this source.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe change this description to Name returns a identifier string for this feature source?

)

// Source implements FeatureSource.
type Source struct{}

// Name returns a friendly name for this source.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe change this description to Name returns a identifier string for this feature source?

@@ -19,8 +19,10 @@ package panic_fake
// Source implements FeatureSource.
type Source struct{}

// Name returns a friendly name for this source.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe change this description to Name returns a identifier string for this feature source?

@@ -24,6 +24,7 @@ import (
// Source implements FeatureSource.
type Source struct{}

// Name returns a friendly name for this source.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe change this description to Name returns a identifier string for this feature source?

@@ -31,9 +31,10 @@ const (
// Source implements FeatureSource.
type Source struct{}

// Name returns a friendly name for this source.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe change this description to Name returns a identifier string for this feature source?

@okartau
Copy link
Contributor Author

okartau commented Feb 22, 2018

I made proposed changes. I used "an identifier" as this seems grammatically more correct.
About generated files, seems no right that generated code drags down quality metrics, is it possible to
affect or improve the genaration part then?

@balajismaniam
Copy link
Contributor

balajismaniam commented Feb 22, 2018

Thanks for making these changes. During linting there are ways to ignore files if required. Also fair point on the changes to those mock files in #102. If you add back the changes you made earlier, I can re-approve it.

balajismaniam
balajismaniam previously approved these changes Feb 22, 2018
@balajismaniam
Copy link
Contributor

@okartau Any updates on this?

Order of import changed in main.go and network.go,
missing ending newline added in fake.go
Mostly about missing or incomplete comments
@okartau
Copy link
Contributor Author

okartau commented Mar 2, 2018

rebased and force pushed, should be up to date now

@balajismaniam balajismaniam merged commit 1555990 into kubernetes-sigs:master Mar 5, 2018
@marquiz marquiz mentioned this pull request May 4, 2018
10 tasks
marquiz added a commit to marquiz/node-feature-discovery that referenced this pull request Jul 9, 2018
Adding a note that these files are auto-generated, including
instructions how to re-generate these files.

Rename the files, using the defaults provided by the mockery tool, in
order to make their generation easier.
@marquiz
Copy link
Contributor

marquiz commented Jul 9, 2018

PR #141 is aiming at resolving this

marquiz added a commit to marquiz/node-feature-discovery that referenced this pull request Aug 14, 2018
Adding a note that these files are auto-generated, including
instructions how to re-generate these files.

Rename the files, using the defaults provided by the mockery tool, in
order to make their generation easier.
marquiz added a commit to marquiz/node-feature-discovery that referenced this pull request Aug 17, 2018
Adding a note that these files are auto-generated, including
instructions how to re-generate these files.

Rename the files, using the defaults provided by the mockery tool, in
order to make their generation easier.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. size/S Denotes a PR that changes 10-29 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants