1
1
mirror of https://github.com/wader/fq.git synced 2024-10-26 20:06:29 +03:00

Merge pull request #866 from wader/bump-github-golangci-lint-1.56.0

Update github-golangci-lint to 1.56.0 from 1.55.2
This commit is contained in:
Mattias Wadman 2024-02-07 17:40:19 +01:00 committed by GitHub
commit ea9230565f
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
4 changed files with 5 additions and 5 deletions

View File

@ -7,7 +7,7 @@ on:
pull_request:
env:
GOLANGCILINT_VERSION: "1.55.2"
GOLANGCILINT_VERSION: "1.56.0"
jobs:
lint:

View File

@ -260,7 +260,7 @@ func Main(r *interp.Registry, version string) {
}
if err := i.Main(context.Background(), sos.Stdout(), version); err != nil {
if ex, ok := err.(interp.Exiter); ok { //nolint:errorlint
if ex, ok := err.(interp.Exiter); ok {
return ex.ExitCode()
}
return 1

View File

@ -43,7 +43,7 @@ func TestPath(t *testing.T, registry *interp.Registry, update bool) {
err = i.Main(context.Background(), cr.Stdout(), "testversion")
if err != nil {
if ex, ok := err.(interp.Exiter); ok { //nolint:errorlint
if ex, ok := err.(interp.Exiter); ok {
cr.ActualExitCode = ex.ExitCode()
}
}

View File

@ -300,7 +300,7 @@ func toBytes(v any) ([]byte, error) {
func queryErrorPosition(expr string, v error) pos.Pos {
var offset int
if tokIf, ok := v.(interface{ Token() (string, int) }); ok { //nolint:errorlint
if tokIf, ok := v.(interface{ Token() (string, int) }); ok {
_, offset = tokIf.Token()
}
if offset >= 0 {
@ -403,7 +403,7 @@ func (i *Interp) Main(ctx context.Context, output Output, versionStr string) err
switch v := v.(type) {
case error:
if emptyErr, ok := v.(IsEmptyErrorer); ok && emptyErr.IsEmptyError() { //nolint:errorlint
if emptyErr, ok := v.(IsEmptyErrorer); ok && emptyErr.IsEmptyError() {
// no output
} else if errors.Is(v, context.Canceled) {
// ignore context cancel here for now, which means user somehow interrupted the interpreter