Skip to content

Commit

Permalink
refactor: enable errorlint linter
Browse files Browse the repository at this point in the history
  • Loading branch information
Adam Hughes committed Oct 21, 2021
1 parent 55a90f0 commit ab30e73
Show file tree
Hide file tree
Showing 5 changed files with 6 additions and 0 deletions.
1 change: 1 addition & 0 deletions .golangci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ linters:
- dupl
- errcheck
- errname
- errorlint
- exportloopref
- gochecknoinits
- gocritic
Expand Down
2 changes: 2 additions & 0 deletions pkg/integrity/metadata.go
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@ func (e *DescriptorIntegrityError) Error() string {
// Is compares e against target. If target is a DescriptorIntegrityError and matches e or target
// has a zero value ID, true is returned.
func (e *DescriptorIntegrityError) Is(target error) bool {
//nolint:errorlint // don't compare wrapped errors in Is()
t, ok := target.(*DescriptorIntegrityError)
if !ok {
return false
Expand All @@ -62,6 +63,7 @@ func (e *ObjectIntegrityError) Error() string {
// Is compares e against target. If target is a ObjectIntegrityError and matches e or target has a
// zero value ID, true is returned.
func (e *ObjectIntegrityError) Is(target error) bool {
//nolint:errorlint // don't compare wrapped errors in Is()
t, ok := target.(*ObjectIntegrityError)
if !ok {
return false
Expand Down
1 change: 1 addition & 0 deletions pkg/integrity/select.go
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,7 @@ func (e *SignatureNotFoundError) Error() string {
// Is compares e against target. If target is a SignatureNotFoundError and matches e or target has
// a zero value ID, true is returned.
func (e *SignatureNotFoundError) Is(target error) bool {
//nolint:errorlint // don't compare wrapped errors in Is()
t, ok := target.(*SignatureNotFoundError)
if !ok {
return false
Expand Down
1 change: 1 addition & 0 deletions pkg/integrity/verify.go
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,7 @@ func (e *SignatureNotValidError) Unwrap() error {
// Is compares e against target. If target is a SignatureNotValidError and matches e or target has
// a zero value ID, true is returned.
func (e *SignatureNotValidError) Is(target error) bool {
//nolint:errorlint // don't compare wrapped errors in Is()
t, ok := target.(*SignatureNotValidError)
if !ok {
return false
Expand Down
1 change: 1 addition & 0 deletions pkg/sif/descriptor_input.go
Original file line number Diff line number Diff line change
Expand Up @@ -103,6 +103,7 @@ func (e *unexpectedDataTypeError) Error() string {
}

func (e *unexpectedDataTypeError) Is(target error) bool {
//nolint:errorlint // don't compare wrapped errors in Is()
t, ok := target.(*unexpectedDataTypeError)
if !ok {
return false
Expand Down

0 comments on commit ab30e73

Please sign in to comment.