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:
commit
ea9230565f
2
.github/workflows/ci.yml
vendored
2
.github/workflows/ci.yml
vendored
@ -7,7 +7,7 @@ on:
|
||||
pull_request:
|
||||
|
||||
env:
|
||||
GOLANGCILINT_VERSION: "1.55.2"
|
||||
GOLANGCILINT_VERSION: "1.56.0"
|
||||
|
||||
jobs:
|
||||
lint:
|
||||
|
@ -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
|
||||
|
@ -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()
|
||||
}
|
||||
}
|
||||
|
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user