-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
Conversation
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.
/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 |
There was a problem hiding this comment.
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
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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 |
There was a problem hiding this comment.
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?
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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
/approve I'll let @mattmoor @jessiezcc do the /lgtm |
[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 |
/lgtm |
/lgtm |
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