Skip to content

Commit e0f770a

Browse files
authored
Merge pull request #160 from tri-adam/errorlint
Enable errorlint Linter
2 parents 55a90f0 + ab30e73 commit e0f770a

File tree

5 files changed

+6
-0
lines changed

5 files changed

+6
-0
lines changed

.golangci.yml

+1
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@ linters:
1313
- dupl
1414
- errcheck
1515
- errname
16+
- errorlint
1617
- exportloopref
1718
- gochecknoinits
1819
- gocritic

pkg/integrity/metadata.go

+2
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,7 @@ func (e *DescriptorIntegrityError) Error() string {
4040
// Is compares e against target. If target is a DescriptorIntegrityError and matches e or target
4141
// has a zero value ID, true is returned.
4242
func (e *DescriptorIntegrityError) Is(target error) bool {
43+
//nolint:errorlint // don't compare wrapped errors in Is()
4344
t, ok := target.(*DescriptorIntegrityError)
4445
if !ok {
4546
return false
@@ -62,6 +63,7 @@ func (e *ObjectIntegrityError) Error() string {
6263
// Is compares e against target. If target is a ObjectIntegrityError and matches e or target has a
6364
// zero value ID, true is returned.
6465
func (e *ObjectIntegrityError) Is(target error) bool {
66+
//nolint:errorlint // don't compare wrapped errors in Is()
6567
t, ok := target.(*ObjectIntegrityError)
6668
if !ok {
6769
return false

pkg/integrity/select.go

+1
Original file line numberDiff line numberDiff line change
@@ -67,6 +67,7 @@ func (e *SignatureNotFoundError) Error() string {
6767
// Is compares e against target. If target is a SignatureNotFoundError and matches e or target has
6868
// a zero value ID, true is returned.
6969
func (e *SignatureNotFoundError) Is(target error) bool {
70+
//nolint:errorlint // don't compare wrapped errors in Is()
7071
t, ok := target.(*SignatureNotFoundError)
7172
if !ok {
7273
return false

pkg/integrity/verify.go

+1
Original file line numberDiff line numberDiff line change
@@ -52,6 +52,7 @@ func (e *SignatureNotValidError) Unwrap() error {
5252
// Is compares e against target. If target is a SignatureNotValidError and matches e or target has
5353
// a zero value ID, true is returned.
5454
func (e *SignatureNotValidError) Is(target error) bool {
55+
//nolint:errorlint // don't compare wrapped errors in Is()
5556
t, ok := target.(*SignatureNotValidError)
5657
if !ok {
5758
return false

pkg/sif/descriptor_input.go

+1
Original file line numberDiff line numberDiff line change
@@ -103,6 +103,7 @@ func (e *unexpectedDataTypeError) Error() string {
103103
}
104104

105105
func (e *unexpectedDataTypeError) Is(target error) bool {
106+
//nolint:errorlint // don't compare wrapped errors in Is()
106107
t, ok := target.(*unexpectedDataTypeError)
107108
if !ok {
108109
return false

0 commit comments

Comments
 (0)