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

feat: add the errorlint check for golangci-lint #2519

Merged
merged 4 commits into from
Jan 21, 2023

Conversation

Fish-pro
Copy link
Contributor

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

What this PR does / why we need it:

Adds errorlint checks to golangci-lint, standardizing the error format and error judgments

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:

@codecov-commenter
Copy link

codecov-commenter commented Jan 16, 2023

Codecov Report

Base: 53.78% // Head: 54.09% // Increases project coverage by +0.31% 🎉

Coverage data is based on head (a6bbb8b) compared to base (7786db9).
Patch coverage: 40.00% of modified lines in pull request are covered.

Additional details and impacted files
@@            Coverage Diff             @@
##           master    #2519      +/-   ##
==========================================
+ Coverage   53.78%   54.09%   +0.31%     
==========================================
  Files         116      116              
  Lines       10286    10287       +1     
==========================================
+ Hits         5532     5565      +33     
+ Misses       4324     4301      -23     
+ Partials      430      421       -9     
Flag Coverage Δ
unittests 54.09% <40.00%> (+0.31%) ⬆️

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

Impacted Files Coverage Δ
pkg/expansion/system.go 80.32% <0.00%> (ø)
pkg/gator/test/test.go 61.90% <0.00%> (ø)
pkg/webhook/policy.go 40.13% <16.66%> (ø)
pkg/mutation/schema/errors.go 33.33% <50.00%> (ø)
pkg/controller/mutators/core/status.go 100.00% <100.00%> (ø)
pkg/mutation/path/parser/errors.go 100.00% <100.00%> (ø)
pkg/readiness/ready_tracker.go 70.33% <0.00%> (+0.50%) ⬆️
pkg/readiness/object_tracker.go 83.98% <0.00%> (+1.06%) ⬆️
pkg/controller/config/config_controller.go 65.10% <0.00%> (+1.27%) ⬆️
... and 3 more

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

@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.

Thank you for adding this! LGTM

@sozercan sozercan requested a review from maxsmythe January 17, 2023 23:24
Signed-off-by: Fish-pro <zechun.chen@daocloud.io>
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, thank you for the PR!

@ritazh ritazh merged commit 73611cc into open-policy-agent:master Jan 21, 2023
davis-haba pushed a commit to davis-haba/gatekeeper that referenced this pull request Mar 7, 2023
Add the errorlint check

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

Signed-off-by: Fish-pro <zechun.chen@daocloud.io>
Co-authored-by: Sertaç Özercan <852750+sozercan@users.noreply.github.com>
Co-authored-by: Rita Zhang <rita.z.zhang@gmail.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