aboutsummaryrefslogtreecommitdiffstats
path: root/vendor/github.com/polyfloyd
diff options
context:
space:
mode:
authordependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>2024-03-04 17:40:11 +0000
committerTaras Madan <tarasmadan@google.com>2024-03-04 18:34:55 +0000
commit5fc5366972c874b919f93165bb4ed4e2bcb7c350 (patch)
tree287c3361a0dee0c72af80d9a1a66714a06e98a62 /vendor/github.com/polyfloyd
parent1be5ce38a9059c356eb193a8c34d60d61c9fc31f (diff)
mod: bump github.com/golangci/golangci-lint from 1.55.2 to 1.56.2
Bumps [github.com/golangci/golangci-lint](https://github.com/golangci/golangci-lint) from 1.55.2 to 1.56.2. - [Release notes](https://github.com/golangci/golangci-lint/releases) - [Changelog](https://github.com/golangci/golangci-lint/blob/master/CHANGELOG.md) - [Commits](https://github.com/golangci/golangci-lint/compare/v1.55.2...v1.56.2) --- updated-dependencies: - dependency-name: github.com/golangci/golangci-lint dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] <support@github.com>
Diffstat (limited to 'vendor/github.com/polyfloyd')
-rw-r--r--vendor/github.com/polyfloyd/go-errorlint/errorlint/allowed.go4
-rw-r--r--vendor/github.com/polyfloyd/go-errorlint/errorlint/lint.go5
-rw-r--r--vendor/github.com/polyfloyd/go-errorlint/errorlint/printf.go17
3 files changed, 9 insertions, 17 deletions
diff --git a/vendor/github.com/polyfloyd/go-errorlint/errorlint/allowed.go b/vendor/github.com/polyfloyd/go-errorlint/errorlint/allowed.go
index df8d5f713..8bfb4c9b2 100644
--- a/vendor/github.com/polyfloyd/go-errorlint/errorlint/allowed.go
+++ b/vendor/github.com/polyfloyd/go-errorlint/errorlint/allowed.go
@@ -41,6 +41,7 @@ var allowedErrors = []struct {
{err: "io.EOF", fun: "debug/elf.Open"},
{err: "io.EOF", fun: "debug/elf.NewFile"},
// pkg/io
+ {err: "io.EOF", fun: "(io.ReadCloser).Read"},
{err: "io.EOF", fun: "(io.Reader).Read"},
{err: "io.EOF", fun: "(io.ReaderAt).ReadAt"},
{err: "io.EOF", fun: "(*io.LimitedReader).Read"},
@@ -71,6 +72,9 @@ var allowedErrors = []struct {
{err: "io.EOF", fun: "(*strings.Reader).ReadAt"},
{err: "io.EOF", fun: "(*strings.Reader).ReadByte"},
{err: "io.EOF", fun: "(*strings.Reader).ReadRune"},
+ // pkg/context
+ {err: "context.DeadlineExceeded", fun: "(context.Context).Err"},
+ {err: "context.Canceled", fun: "(context.Context).Err"},
}
var allowedErrorWildcards = []struct {
diff --git a/vendor/github.com/polyfloyd/go-errorlint/errorlint/lint.go b/vendor/github.com/polyfloyd/go-errorlint/errorlint/lint.go
index 817cd6904..572a3816d 100644
--- a/vendor/github.com/polyfloyd/go-errorlint/errorlint/lint.go
+++ b/vendor/github.com/polyfloyd/go-errorlint/errorlint/lint.go
@@ -307,6 +307,11 @@ func LintErrorTypeAssertions(fset *token.FileSet, info *TypesInfoExt) []analysis
continue
}
+ // If the asserted type is not an error, allow the expression.
+ if !implementsError(info.TypesInfo.Types[typeAssert.Type].Type) {
+ continue
+ }
+
lints = append(lints, analysis.Diagnostic{
Message: "type assertion on error will fail on wrapped errors. Use errors.As to check for specific errors",
Pos: typeAssert.Pos(),
diff --git a/vendor/github.com/polyfloyd/go-errorlint/errorlint/printf.go b/vendor/github.com/polyfloyd/go-errorlint/errorlint/printf.go
index 973752592..4c0e12525 100644
--- a/vendor/github.com/polyfloyd/go-errorlint/errorlint/printf.go
+++ b/vendor/github.com/polyfloyd/go-errorlint/errorlint/printf.go
@@ -7,23 +7,6 @@ import (
"strings"
)
-func verbOrder(verbs []verb, numArgs int) [][]verb {
- orderedVerbs := make([][]verb, numArgs)
- i := 0
- for _, v := range verbs {
- if v.index != -1 {
- i = v.index - 1
- }
- if i >= len(orderedVerbs) {
- continue
- }
- orderedVerbs[i] = append(orderedVerbs[i], v)
- verbs = verbs[1:]
- i++
- }
- return orderedVerbs
-}
-
type verb struct {
format string
formatOffset int