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

Enable errorlint and fix all issues #1223

Merged
merged 3 commits into from
Feb 13, 2021

Conversation

markusthoemmes
Copy link
Contributor

Description

This enables the errorlint linter, which is super helpful in catching "wrong" usages of errors (i.e. unsafe casts, ensuring errors are wrapped etc.)

Changes

  • Enable the errorlint linter
  • Make sure all errors that somehow contain a child error properly wrap the child
  • Replace all comparisons and casts with deepchecks using Is and As

/assign @rhuss

@google-cla google-cla bot added the cla: yes Indicates the PR's author has signed the CLA. label Feb 12, 2021
@knative-prow-robot knative-prow-robot added the size/M Denotes a PR that changes 30-99 lines, ignoring generated files. label Feb 12, 2021
@dsimansk
Copy link
Contributor

/retest

Copy link
Contributor

@maximilien maximilien left a comment

Choose a reason for hiding this comment

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

/ok-to-test
/lgtm
Thanks

@knative-prow-robot knative-prow-robot added the ok-to-test Indicates a non-member PR verified by an org member that is safe to test. label Feb 13, 2021
@knative-prow-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: markusthoemmes, maximilien

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

@knative-prow-robot knative-prow-robot added lgtm Indicates that a PR is ready to be merged. approved Indicates a PR has been approved by an approver from all required OWNERS files. labels Feb 13, 2021
@knative-metrics-robot
Copy link

The following is the coverage report on the affected files.
Say /test pull-knative-client-go-coverage to re-run this coverage report

File Old Coverage New Coverage Delta
pkg/errors/factory.go 96.0% 96.2% 0.2
pkg/kn/commands/service/update.go 92.7% 91.1% -1.7

@knative-prow-robot knative-prow-robot merged commit 9667e45 into knative:master Feb 13, 2021
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. cla: yes Indicates the PR's author has signed the CLA. lgtm Indicates that a PR is ready to be merged. ok-to-test Indicates a non-member PR verified by an org member that is safe to test. size/M Denotes a PR that changes 30-99 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants