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

Make govet check glog.Info/Warning calls #16801

Merged
merged 2 commits into from
Oct 12, 2017

Conversation

danwinship
Copy link
Contributor

The default set of names covered by govet's checking of Printf-like functions includes Log, Error, and Fatal, but not Info or Warning. (Noticed in #16793.)

@openshift-ci-robot openshift-ci-robot added the size/S Denotes a PR that changes 10-29 lines, ignoring generated files. label Oct 11, 2017
@bparees
Copy link
Contributor

bparees commented Oct 11, 2017

/lgtm

@openshift-ci-robot openshift-ci-robot added the lgtm Indicates that a PR is ready to be merged. label Oct 11, 2017
@openshift-merge-robot openshift-merge-robot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Oct 11, 2017
for test_dir in $(os::util::list_go_src_dirs); do
if ! result="$(go tool vet -shadow=false "${test_dir}" 2>&1)"; then
if ! result="$(go tool vet ${govet_args} "${test_dir}" 2>&1)"; then
Copy link
Contributor

Choose a reason for hiding this comment

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

If you're using them once, just inline them here

Copy link
Contributor

Choose a reason for hiding this comment

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

personally i like the way it's called out as a var, makes it easier to see the args and update them rather than embedding them in a messy line of bash.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

oops, just pushed a change. i'm fine either way

Copy link
Contributor

Choose a reason for hiding this comment

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

no need to churn on it so i guess we'll leave it.

The default set of names covered by govet's checking of Printf-like
functions includes Log, Error, and Fatal, but not Info or Warning.
@openshift-merge-robot openshift-merge-robot removed the lgtm Indicates that a PR is ready to be merged. label Oct 11, 2017
@@ -30,7 +30,7 @@ function govet_blacklist_contains() {
}

for test_dir in $(os::util::list_go_src_dirs); do
if ! result="$(go tool vet -shadow=false "${test_dir}" 2>&1)"; then
if ! result="$(go tool vet -shadow=false -printfuncs=Info,Infof,Warning,Warningf "${test_dir}" 2>&1)"; then
Copy link
Contributor

Choose a reason for hiding this comment

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

i'm going on record as liking it better the way it was.

Copy link
Contributor

Choose a reason for hiding this comment

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

And expecting that people understand this this one place the "${args}" are not quoted because we need word splitting for proper parameter passing for the call to go tool vet? No thanks

@bparees
Copy link
Contributor

bparees commented Oct 11, 2017

/lgtm

@openshift-ci-robot openshift-ci-robot added the lgtm Indicates that a PR is ready to be merged. label Oct 11, 2017
@openshift-merge-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: bparees, danwinship

The full list of commands accepted by this bot can be found here.

Needs approval from an approver in each of these OWNERS Files:

You can indicate your approval by writing /approve in a comment
You can cancel your approval by writing /approve cancel in a comment

Copy link

@pravisankar pravisankar left a comment

Choose a reason for hiding this comment

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

LGTM

@danwinship
Copy link
Contributor Author

/retest

@danwinship
Copy link
Contributor Author

flakes #12007 #16775
/retest

@openshift-merge-robot
Copy link
Contributor

Automatic merge from submit-queue (batch tested with PRs 15807, 16778, 16801, 16804, 16793).

@openshift-merge-robot openshift-merge-robot merged commit ae2eaf2 into openshift:master Oct 12, 2017
@danwinship danwinship deleted the govet-warningf branch October 19, 2017 19:04
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. lgtm Indicates that a PR is ready to be merged. 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

7 participants