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

chore: modify the typecheck as prompted #2553

Merged
merged 4 commits into from
Feb 10, 2023

Conversation

Fish-pro
Copy link
Contributor

@Fish-pro Fish-pro commented Feb 1, 2023

Signed-off-by: Fish-pro zechun.chen@daocloud.io

What this PR does / why we need it:

➜  gatekeeper git:(master) golangci-lint run -c .golangci.yaml
apis/status/v1beta1/constraintpodstatus_types_test.go:4:2: "strings" imported but not used (typecheck)
        "strings"
        ^
pkg/readiness/ready_tracker_test.go:574:21: invalid operation: cannot compare tc.tracker != nil (operator != not defined on untyped nil) (typecheck)
                        if tc.tracker != nil {
                                         ^

Which issue(s) this PR fixes (optional, using fixes #<issue number>(, fixes #<issue_number>, ...) format, will close the issue(s) when the PR gets merged):
Fixes #

Special notes for your reviewer:

@@ -53,7 +52,7 @@ func TestNewConstraintStatusForPod(t *testing.T) {
v1beta1.ConstraintNameLabel: "a-constraint",
v1beta1.ConstraintKindLabel: "AConstraintKind",
v1beta1.PodLabel: podName,
v1beta1.ConstraintTemplateNameLabel: strings.ToLower(cstrKind),
Copy link
Contributor

Choose a reason for hiding this comment

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

should this be reverted?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I've already found it, and I understand it's golang-lint problem, but in order to pass the check, I've made an irrelevant change

Copy link
Contributor

@maxsmythe maxsmythe left a comment

Choose a reason for hiding this comment

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

LGTM

@codecov-commenter
Copy link

codecov-commenter commented Feb 7, 2023

Codecov Report

Base: 53.54% // Head: 53.59% // Increases project coverage by +0.04% 🎉

Coverage data is based on head (81cd9f7) compared to base (05638fd).
Patch has no changes to coverable lines.

Additional details and impacted files
@@            Coverage Diff             @@
##           master    #2553      +/-   ##
==========================================
+ Coverage   53.54%   53.59%   +0.04%     
==========================================
  Files         120      120              
  Lines       10634    10634              
==========================================
+ Hits         5694     5699       +5     
+ Misses       4506     4502       -4     
+ Partials      434      433       -1     
Flag Coverage Δ
unittests 53.59% <ø> (+0.04%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

Impacted Files Coverage Δ
...onstrainttemplate/constrainttemplate_controller.go 59.33% <0.00%> (+1.19%) ⬆️

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

☔ View full report at Codecov.
📢 Do you have feedback about the report comment? Let us know in this issue.

Signed-off-by: Fish-pro <zechun.chen@daocloud.io>
@Fish-pro
Copy link
Contributor Author

@sozercan Thanks for update branch,Do you need me to rebase?

@sozercan
Copy link
Member

@Fish-pro thank you! no need, since we got the tests unblocked with #2573, i am merging to master for those that are already approved so i can merge them.

@sozercan sozercan merged commit 0f2c8ea into open-policy-agent:master Feb 10, 2023
davis-haba pushed a commit to davis-haba/gatekeeper that referenced this pull request Mar 7, 2023
Co-authored-by: Sertaç Özercan <852750+sozercan@users.noreply.github.com>
davis-haba pushed a commit to davis-haba/gatekeeper that referenced this pull request Mar 8, 2023
Co-authored-by: Sertaç Özercan <852750+sozercan@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants