From 4639822c5e4bef025e524bd703c88e915a8638f4 Mon Sep 17 00:00:00 2001 From: Adam Hughes <9903835+tri-adam@users.noreply.github.com> Date: Mon, 21 Aug 2023 19:34:06 +0000 Subject: [PATCH] chore: remove unnecessary nolint:errorlint lines As of v1.4.4, go-errorlint exempts `Is` methods from type assertions (see https://github.com/polyfloyd/go-errorlint/issues/50). Signed-off-by: Dave Dykstra <2129743+DrDaveD@users.noreply.github.com> --- pkg/integrity/metadata.go | 4 +--- pkg/integrity/select.go | 3 +-- pkg/integrity/verify.go | 1 - pkg/sif/descriptor_input.go | 1 - 4 files changed, 2 insertions(+), 7 deletions(-) diff --git a/pkg/integrity/metadata.go b/pkg/integrity/metadata.go index f7dd60c5..491f47f7 100644 --- a/pkg/integrity/metadata.go +++ b/pkg/integrity/metadata.go @@ -2,7 +2,7 @@ // Apptainer a Series of LF Projects LLC. // For website terms of use, trademark policy, privacy policy and other // project policies see https://lfprojects.org/policies -// Copyright (c) 2020-2021, Sylabs Inc. All rights reserved. +// Copyright (c) 2020-2023, Sylabs Inc. All rights reserved. // This software is licensed under a 3-clause BSD license. Please consult the LICENSE.md file // distributed with the sources of this project regarding your rights to use or distribute this // software. @@ -44,7 +44,6 @@ 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 @@ -67,7 +66,6 @@ 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 diff --git a/pkg/integrity/select.go b/pkg/integrity/select.go index f0e6c530..c8cda40e 100644 --- a/pkg/integrity/select.go +++ b/pkg/integrity/select.go @@ -2,7 +2,7 @@ // Apptainer a Series of LF Projects LLC. // For website terms of use, trademark policy, privacy policy and other // project policies see https://lfprojects.org/policies -// Copyright (c) 2020-2022, Sylabs Inc. All rights reserved. +// Copyright (c) 2020-2023, Sylabs Inc. All rights reserved. // This software is licensed under a 3-clause BSD license. Please consult the LICENSE.md file // distributed with the sources of this project regarding your rights to use or distribute this // software. @@ -72,7 +72,6 @@ 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 diff --git a/pkg/integrity/verify.go b/pkg/integrity/verify.go index d4b5e5a1..eecafe9a 100644 --- a/pkg/integrity/verify.go +++ b/pkg/integrity/verify.go @@ -63,7 +63,6 @@ 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 diff --git a/pkg/sif/descriptor_input.go b/pkg/sif/descriptor_input.go index facf4f82..da522239 100644 --- a/pkg/sif/descriptor_input.go +++ b/pkg/sif/descriptor_input.go @@ -115,7 +115,6 @@ 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