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

Include tests in golint checks, fix warnings #2180

Merged
merged 1 commit into from
Mar 7, 2018
Merged

Include tests in golint checks, fix warnings #2180

merged 1 commit into from
Mar 7, 2018

Conversation

antoineco
Copy link
Contributor

@antoineco antoineco commented Mar 7, 2018

What this PR does / why we need it:

golint enforces good practices for writing Go code, therefore it makes sense to run checks on test packages as well. Since "should not use dot imports" is the only warning we really want to ignore (ginkgo imports), it is simple enough to exclude these warnings from the golint output.

List of lint warnings tackled by this PR:

test/e2e/framework/cleanup.go:21:6: exported type CleanupActionHandle should have comment or be unexported
test/e2e/framework/framework.go:40:2: exported const MaxRetry should have comment (or a comment on this block) or be unexported
test/e2e/framework/framework.go:44:6: exported type RequestScheme should have comment or be unexported
test/e2e/framework/k8s.go:30:1: exported method Framework.EnsureSecret should have comment or be unexported
test/e2e/framework/k8s.go:41:1: exported method Framework.EnsureIngress should have comment or be unexported
test/e2e/framework/k8s.go:52:1: exported method Framework.EnsureService should have comment or be unexported
test/e2e/framework/k8s.go:63:1: exported method Framework.EnsureDeployment should have comment or be unexported
test/e2e/framework/k8s.go:74:1: exported method Framework.WaitForPodsReady should have comment or be unexported
test/e2e/framework/logs.go:27:1: exported method Framework.Logs should have comment or be unexported
test/e2e/framework/ssl.go:77:21: error strings should not be capitalized or end with punctuation or a newline
test/e2e/framework/ssl.go:81:21: error strings should not be capitalized or end with punctuation or a newline
test/e2e/framework/ssl.go:122:21: error strings should not be capitalized or end with punctuation or a newline
test/e2e/framework/ssl.go:125:21: error strings should not be capitalized or end with punctuation or a newline
test/e2e/framework/ssl.go:128:21: error strings should not be capitalized or end with punctuation or a newline
test/e2e/framework/test_context.go:28:6: exported type TestContextType should have comment or be unexported
test/e2e/framework/test_context.go:34:5: exported var TestContext should have comment or be unexported
test/e2e/framework/test_context.go:36:1: comment on exported function RegisterCommonFlags should be of the form "RegisterCommonFlags ..."
test/e2e/framework/test_context.go:52:1: exported function RegisterParseFlags should have comment or be unexported
test/e2e/framework/util.go:55:1: exported function Logf should have comment or be unexported
test/e2e/framework/util.go:59:1: exported function Failf should have comment or be unexported
test/e2e/framework/util.go:65:1: exported function Skipf should have comment or be unexported
test/e2e/framework/util.go:71:1: exported function RestclientConfig should have comment or be unexported
test/e2e/framework/util.go:74:26: error strings should not be capitalized or end with punctuation or a newline
test/e2e/framework/util.go:87:6: exported type ClientConfigGetter should have comment or be unexported
test/e2e/framework/util.go:89:1: exported function LoadConfig should have comment or be unexported
test/e2e/framework/util.go:131:1: exported function ExpectNoError should have comment or be unexported

@k8s-ci-robot
Copy link
Contributor

Thanks for your pull request. Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA).

📝 Please follow instructions at https://git.k8s.io/community/CLA.md#the-contributor-license-agreement to sign the CLA.

It may take a couple minutes for the CLA signature to be fully registered; after that, please reply here with a new comment and we'll verify. Thanks.


Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. I understand the commands that are listed here.

@k8s-ci-robot k8s-ci-robot added cncf-cla: no Indicates the PR's author has not signed the CNCF CLA. size/M Denotes a PR that changes 30-99 lines, ignoring generated files. cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. and removed cncf-cla: no Indicates the PR's author has not signed the CNCF CLA. labels Mar 7, 2018
@codecov-io
Copy link

codecov-io commented Mar 7, 2018

Codecov Report

Merging #2180 into master will increase coverage by 0.06%.
The diff coverage is n/a.

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #2180      +/-   ##
==========================================
+ Coverage   36.45%   36.51%   +0.06%     
==========================================
  Files          69       69              
  Lines        4861     4861              
==========================================
+ Hits         1772     1775       +3     
+ Misses       2819     2817       -2     
+ Partials      270      269       -1
Impacted Files Coverage Δ
cmd/nginx/main.go 23.44% <0%> (+2.06%) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 3130665...3c8f0f3. Read the comment docs.

@k8s-ci-robot k8s-ci-robot removed the cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. label Mar 7, 2018
@k8s-ci-robot
Copy link
Contributor

Thanks for your pull request. Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA).

📝 Please follow instructions at https://git.k8s.io/community/CLA.md#the-contributor-license-agreement to sign the CLA.

It may take a couple minutes for the CLA signature to be fully registered; after that, please reply here with a new comment and we'll verify. Thanks.


Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. I understand the commands that are listed here.

@k8s-ci-robot k8s-ci-robot added the cncf-cla: no Indicates the PR's author has not signed the CNCF CLA. label Mar 7, 2018
@antoineco antoineco closed this Mar 7, 2018
@k8s-ci-robot k8s-ci-robot added approved Indicates a PR has been approved by an approver from all required OWNERS files. size/XS Denotes a PR that changes 0-9 lines, ignoring generated files. and removed size/M Denotes a PR that changes 30-99 lines, ignoring generated files. labels Mar 7, 2018
@antoineco antoineco reopened this Mar 7, 2018
@k8s-ci-robot k8s-ci-robot added size/M Denotes a PR that changes 30-99 lines, ignoring generated files. cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. and removed approved Indicates a PR has been approved by an approver from all required OWNERS files. size/XS Denotes a PR that changes 0-9 lines, ignoring generated files. cncf-cla: no Indicates the PR's author has not signed the CNCF CLA. labels Mar 7, 2018
@antoineco
Copy link
Contributor Author

/assign @aledbf

@aledbf
Copy link
Member

aledbf commented Mar 7, 2018

/approve

@k8s-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: aledbf, antoineco

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 /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@aledbf
Copy link
Member

aledbf commented Mar 7, 2018

@antoineco thanks!

@k8s-ci-robot k8s-ci-robot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Mar 7, 2018
@aledbf aledbf merged commit 86a3a63 into kubernetes:master Mar 7, 2018
@antoineco antoineco deleted the lint-tests branch March 7, 2018 16:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
approved Indicates a PR has been approved by an approver from all required OWNERS files. cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. size/M Denotes a PR that changes 30-99 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants