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

exclude test utility code from coverage testgrid #1256

Merged
merged 4 commits into from
Jun 18, 2018

Conversation

steuhs
Copy link
Contributor

@steuhs steuhs commented Jun 18, 2018

Coverage testgrid uses the github attribute linguist-generated=true to exclude items. This commit is to fix the issue #1122.

There may be side effects, because I am not sure whether other parties rely on the "linguist-generated" attribute as well and the change here may not be desired for them.

Fix some comments in hook.go

Release Note

Coverage testgrid uses the github attribute linguist-generated=true to exclude items. This commit is to fix the issue knative/serving#1122.

There may be side effects, because I am not sure whether other parties rely on the "linguist-generated" attribute as well and the change here may not be desired for them.
@steuhs steuhs requested review from grantr and mattmoor June 18, 2018 21:01
@steuhs steuhs self-assigned this Jun 18, 2018
@google-prow-robot google-prow-robot added the size/XS Denotes a PR that changes 0-9 lines, ignoring generated files. label Jun 18, 2018
@steuhs
Copy link
Contributor Author

steuhs commented Jun 18, 2018

/assign @evankanderson

.gitattributes Outdated
@@ -4,3 +4,4 @@

**/zz_generated.*.go linguist-generated=true
/pkg/client/** linguist-generated=true
/pkg/controller/testing/** linguist-generated=true
Copy link
Contributor

Choose a reason for hiding this comment

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

this is not linguisted-generated file. You should introduce a separate flag for it such as testcode

Copy link
Member

Choose a reason for hiding this comment

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

This will exclude it from Github code reviews, we do not want this.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

done.

This commit is a step toward fixing the issue knative/serving#1122. We add the
coverage-excluded to items we want to exclude from code coverage calculation & display
.gitattributes Outdated
@@ -4,3 +4,4 @@

**/zz_generated.*.go linguist-generated=true
/pkg/client/** linguist-generated=true
/pkg/controller/testing/** coverage-excluded=true
Copy link
Contributor

Choose a reason for hiding this comment

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

add a line of comment for this new tag?

Copy link
Member

Choose a reason for hiding this comment

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

Please verify that this code doesn't become ~unreviewable as well.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@jessiezcc added in commit 3
@mattmoor verified, check commit 4

This commit is a step toward fixing the issue knative/serving#1122. We add the
coverage-excluded to items we want to exclude from code coverage calculation & display
@evankanderson
Copy link
Member

/approve

I'll let @mattmoor @jessiezcc do the /lgtm

@google-prow-robot
Copy link

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: evankanderson, steuhs

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

@google-prow-robot google-prow-robot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Jun 18, 2018
@jessiezcc
Copy link
Contributor

/lgtm

@google-prow-robot google-prow-robot added the lgtm Indicates that a PR is ready to be merged. label Jun 18, 2018
@mattmoor
Copy link
Member

/lgtm

@google-prow-robot google-prow-robot merged commit b05b17a into knative:master Jun 18, 2018
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/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.

5 participants