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 all error contrast judgments by errors #2491

Merged
merged 2 commits into from
Jan 5, 2023

Conversation

Fish-pro
Copy link
Contributor

@Fish-pro Fish-pro commented Jan 4, 2023

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

What this PR does / why we need it:

Filter out all error contrast judgments and modify them in the following way

➜  gatekeeper git:(master) git grep 'err ==' | grep -v ^vendor | sed 's/.*err == \([^ :),;.]\+\).*/\1/g' | grep -i Err | grep -v "err == 0" | grep -v "err == nil" | sort -u 
pkg/watch/replay.go:                                            if err == context.Canceled {

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:

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

codecov-commenter commented Jan 4, 2023

Codecov Report

Base: 53.32% // Head: 53.29% // Decreases project coverage by -0.02% ⚠️

Coverage data is based on head (e54f7ee) compared to base (0fc6306).
Patch coverage: 33.33% of modified lines in pull request are covered.

Additional details and impacted files
@@            Coverage Diff             @@
##           master    #2491      +/-   ##
==========================================
- Coverage   53.32%   53.29%   -0.03%     
==========================================
  Files         116      116              
  Lines       10270    10270              
==========================================
- Hits         5476     5473       -3     
- Misses       4373     4375       +2     
- Partials      421      422       +1     
Flag Coverage Δ
unittests 53.29% <33.33%> (-0.03%) ⬇️

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

Impacted Files Coverage Δ
pkg/watch/replay.go 78.97% <33.33%> (ø)
...onstrainttemplate/constrainttemplate_controller.go 56.45% <0.00%> (-0.72%) ⬇️

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.

Copy link
Member

@ritazh ritazh left a comment

Choose a reason for hiding this comment

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

LGTM

@ritazh ritazh requested a review from a team January 4, 2023 16:56
Copy link
Member

@sozercan sozercan left a comment

Choose a reason for hiding this comment

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

Thanks! LGTM

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

@maxsmythe maxsmythe merged commit a21f595 into open-policy-agent:master Jan 5, 2023
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.

None yet

5 participants