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

Delete the function keyword to prevent shellcheck from failing #6811

Merged

Conversation

xichengliudui
Copy link
Contributor

No description provided.

@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 Apr 23, 2019
@xichengliudui
Copy link
Contributor Author

/assign @justinsb

@justinsb
Copy link
Member

Thanks for thinking about this! I ran shellcheck and got a lot of warnings about lack of quoting

e.g.

In hack/make-gendocs.sh line 52:
cp ${WORK_DIR}/go/bin/client-gen ${GOPATH}/bin/
   ^-- SC2086: Double quote to prevent globbing and word splitting.
                                 ^-- SC2086: Double quote to prevent globbing and word splitting.

But I didn't see any errors complaining about the use of function - and I would have thought that using function was correct.

What error are you getting from shellcheck?

@xichengliudui
Copy link
Contributor Author

xichengliudui commented Apr 24, 2019

@justinsb Is there a tool for retrieving scripts in kop? The function keyword error I encountered in k8s repo looks like this:

function cleanup {
^-- SC2113: 'function' keyword is non-standard. Use 'foo()' instead of 'function foo'.
Ref: https://www.shellcheck.net/wiki/SC2113 -- 'function' keyword is non-standar...

If you don't need this pr I can turn it off.

@xichengliudui
Copy link
Contributor Author

Also, if kop has tools for retrieving scripts, can I fix them?

@xichengliudui
Copy link
Contributor Author

here.

@xichengliudui
Copy link
Contributor Author

/assign @justinsb

1 similar comment
@xichengliudui
Copy link
Contributor Author

/assign @justinsb

@justinsb
Copy link
Member

I appreciate the change, so let's merge it. Would be great to get shellcheck actually working against our repo. How do you run shellcheck?

/approve
/lgtm

@k8s-ci-robot k8s-ci-robot added the lgtm "Looks good to me", indicates that a PR is ready to be merged. label Jul 19, 2019
@k8s-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: justinsb, xichengliudui

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

@k8s-ci-robot k8s-ci-robot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Jul 19, 2019
@k8s-ci-robot k8s-ci-robot merged commit 5340fc2 into kubernetes:master Jul 19, 2019
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. lgtm "Looks good to me", indicates that a PR is ready to be merged. size/XS Denotes a PR that changes 0-9 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants