Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Using --fix option results in panic: runtime error: index out of range [146] with length 146 #1726

Closed
tobias-kuendig opened this issue Feb 10, 2021 · 23 comments · Fixed by #5232
Labels
area: auto-fix bug Something isn't working feedback required Requires additional feedback

Comments

@tobias-kuendig
Copy link

It always crashes when processing the same file. The file is valid Go code and does not contain anything special.

panic: runtime error: index out of range [146] with length 146

goroutine 1 [running]:
github.com/golangci/golangci-lint/pkg/result/processors.Fixer.mergeLineIssues(0xc0003cee00, 0x107e0e0, 0xc00058c930, 0xc0006559e0, 0xc0022b9ae0, 0x93, 0xc00501cb00, 0x2, 0x2, 0xc009ba8000, ...)
        /home/runner/work/golangci-lint/golangci-lint/pkg/result/processors/fixer.go:121 +0x599
github.com/golangci/golangci-lint/pkg/result/processors.Fixer.fixIssuesInFile(0xc0003cee00, 0x107e0e0, 0xc00058c930, 0xc0006559e0, 0xc0022b9ae0, 0xc009313c5d, 0x1c, 0xc004dd7500, 0x3, 0x10, ...)
        /home/runner/work/golangci-lint/golangci-lint/pkg/result/processors/fixer.go:98 +0x625
github.com/golangci/golangci-lint/pkg/result/processors.Fixer.Process.func1()
        /home/runner/work/golangci-lint/golangci-lint/pkg/result/processors/fixer.go:60 +0xae
github.com/golangci/golangci-lint/pkg/timeutils.(*Stopwatch).TrackStage(0xc0022b9ae0, 0xea3194, 0x3, 0xc0044c76a0)
        /home/runner/work/golangci-lint/golangci-lint/pkg/timeutils/stopwatch.go:111 +0x50
github.com/golangci/golangci-lint/pkg/result/processors.Fixer.Process(0xc0003cee00, 0x107e0e0, 0xc00058c930, 0xc0006559e0, 0xc0022b9ae0, 0xc005a06000, 0x374, 0x374, 0x3, 0x4, ...)
        /home/runner/work/golangci-lint/golangci-lint/pkg/result/processors/fixer.go:59 +0x665
github.com/golangci/golangci-lint/pkg/commands.(*Executor).runAnalysis(0xc00011b000, 0x1074160, 0xc0007d4480, 0xc0007e7ec0, 0x0, 0x2, 0xc0007d4480, 0x1074120, 0xc00018e000, 0x0, ...)
        /home/runner/work/golangci-lint/golangci-lint/pkg/commands/run.go:352 +0x6f7
github.com/golangci/golangci-lint/pkg/commands.(*Executor).runAndPrint(0xc00011b000, 0x1074160, 0xc0007d4480, 0xc0007e7ec0, 0x0, 0x2, 0x0, 0x0)
        /home/runner/work/golangci-lint/golangci-lint/pkg/commands/run.go:387 +0x12f
github.com/golangci/golangci-lint/pkg/commands.(*Executor).executeRun(0xc00011b000, 0xc000142840, 0xc0007e7ec0, 0x0, 0x2)
        /home/runner/work/golangci-lint/golangci-lint/pkg/commands/run.go:452 +0x177
github.com/spf13/cobra.(*Command).execute(0xc000142840, 0xc0007e7ea0, 0x2, 0x2, 0xc000142840, 0xc0007e7ea0)
        /home/runner/go/pkg/mod/github.com/spf13/[email protected]/command.go:854 +0x2c2
github.com/spf13/cobra.(*Command).ExecuteC(0xc000142580, 0x6, 0x103d200, 0x7)
        /home/runner/go/pkg/mod/github.com/spf13/[email protected]/command.go:958 +0x375
github.com/spf13/cobra.(*Command).Execute(...)
        /home/runner/go/pkg/mod/github.com/spf13/[email protected]/command.go:895
github.com/golangci/golangci-lint/pkg/commands.(*Executor).Execute(...)
        /home/runner/work/golangci-lint/golangci-lint/pkg/commands/executor.go:147
main.main()
        /home/runner/work/golangci-lint/golangci-lint/cmd/golangci-lint/main.go:21 +0x7e
        
Version of golangci-lint
$ golangci-lint --version
golangci-lint has version 1.36.0 built from 6c25d06 on 2021-01-26T13:14:05Z
Config file
$ cat .golangci.yml
linters-settings:
  govet:
    check-shadowing: true
  golint:
    min-confidence: 0
  gocyclo:
    min-complexity: 15
  maligned:
    suggest-new: true
  misspell:
    locale: US
  lll:
    line-length: 160
  goimports:
    local-prefixes: myproject
  gocritic:
    enabled-tags:
    - diagnostic
    - performance
    - style
    - experimental
    disabled-checks:
    - hugeParam
    - whyNoLint
    - typeDefFirst

linters:
  enable-all: true
  disable:
  - wrapcheck
  - ifshort
  - forbidigo
  - paralleltest
  - thelper
  - nlreturn
  - sqlclosecheck
  - exhaustivestruct
  - exhaustive
  - prealloc
  - depguard
  - gochecknoglobals
  - goconst
  - dupl
  - wsl
  - godox
  - gomnd
  - testpackage
  - goerr113
  - godot


run:
  deadline: 10m
  skip-dirs:
  - internal/graphql/server
  - build
Go environment
$ go version && go env
go version go1.15.6 linux/amd64
GO111MODULE=""
GOARCH="amd64"
GOBIN=""
GOCACHE="/home/myuser/.cache/go-build"
GOENV="/home/myuser/.config/go/env"
GOEXE=""
GOFLAGS=""
GOHOSTARCH="amd64"
GOHOSTOS="linux"
GOINSECURE=""
GOMODCACHE="/home/myuser/code/go/pkg/mod"
GONOPROXY=""
GONOSUMDB=""
GOOS="linux"
GOPATH="/home/myuser/code/go"
GOPRIVATE=""
GOPROXY="https://proxy.golang.org,direct"
GOROOT="/usr/local/go"
GOSUMDB="sum.golang.org"
GOTMPDIR=""
GOTOOLDIR="/usr/local/go/pkg/tool/linux_amd64"
GCCGO="gccgo"
AR="ar"
CC="gcc"
CXX="g++"
CGO_ENABLED="1"
GOMOD=""
CGO_CFLAGS="-g -O2"
CGO_CPPFLAGS=""
CGO_CXXFLAGS="-g -O2"
CGO_FFLAGS="-g -O2"
CGO_LDFLAGS="-g -O2"
PKG_CONFIG="pkg-config"
GOGCCFLAGS="-fPIC -m64 -pthread -fmessage-length=0 -fdebug-prefix-map=/tmp/go-build239942231=/tmp/go-build -gno-record-gcc-switches"
Verbose output of running
$ golangci-lint cache clean
$ golangci-lint run -v
INFO [config_reader] Config search paths: [./ /home/myuser/code/myproject /home/myuser/code /home/myuser /home /] 
INFO [config_reader] Used config file .golangci.yml 
INFO [lintersdb] Active 46 linters: [asciicheck bodyclose deadcode dogsled errcheck errorlint exportloopref funlen gci gochecknoinits gocognit gocritic gocyclo gofmt gofumpt goheader goimports golint gomodguard goprintffuncname gosec gosimple govet ineffassign interfacer lll makezero maligned misspell nakedret nestif noctx nolintlint predeclared rowserrcheck scopelint staticcheck structcheck stylecheck tparallel typecheck unconvert unparam unused varcheck whitespace] 
INFO [loader] Go packages loading at mode 575 (compiled_files|types_sizes|deps|exports_file|files|imports|name) took 1.831348196s 
INFO [runner/filename_unadjuster] Pre-built 0 adjustments in 43.099847ms 
INFO [linters context/goanalysis] analyzers took 1m32.228722817s with top 10 stages: the_only_name: 9.068714483s, buildir: 5.965001727s, buildssa: 4.052142714s, gofumpt: 3.493561952s, gocritic: 3.258138896s, golint: 3.12736462s, gosec: 2.887005096s, whitespace: 2.765741987s, unconvert: 2.694748776s, gofmt: 2.643236132s 
INFO [linters context/goanalysis] analyzers took 10.24647ms with top 10 stages: makezero: 10.24647ms 
INFO [linters context/goanalysis] analyzers took 3.264733239s with top 10 stages: buildir: 2.882973816s, U1000: 381.759423ms 
WARN [runner/source_code] Failed to get line 147 for file internal/pkg/call/service.go: invalid file line index0 (146) >= len(fc) (146) 
WARN [runner/source_code] Failed to get line 147 for file internal/pkg/call/service.go: invalid file line index0 (146) >= len(fc) (146) 
INFO [runner] Issues before processing: 3625, after processing: 884 
INFO [runner] Processors filtering stat (out/in): path_shortener: 884/884, path_prefixer: 884/884, cgo: 3625/3625, identifier_marker: 2218/2218, uniq_by_line: 884/884, diff: 884/884, max_same_issues: 884/884, max_from_linter: 884/884, severity-rules: 884/884, sort_results: 884/884, skip_files: 3625/3625, skip_dirs: 3625/3625, exclude: 2218/2218, nolint: 884/1336, max_per_file_from_linter: 884/884, source_code: 884/884, filename_unadjuster: 3625/3625, autogenerated_exclude: 2218/3625, path_prettifier: 3625/3625, exclude-rules: 1336/2218 
INFO [runner] processing took 121.223048ms with stages: nolint: 54.009266ms, exclude-rules: 28.460913ms, identifier_marker: 25.641998ms, path_prettifier: 4.739204ms, autogenerated_exclude: 3.60679ms, source_code: 3.307528ms, skip_dirs: 848.213µs, cgo: 223.937µs, filename_unadjuster: 154.22µs, path_shortener: 91.523µs, uniq_by_line: 38.608µs, max_per_file_from_linter: 34.662µs, max_same_issues: 32.855µs, max_from_linter: 31.781µs, exclude: 448ns, diff: 273ns, sort_results: 263ns, skip_files: 253ns, severity-rules: 201ns, path_prefixer: 112ns 
INFO [runner] linters took 5.434738186s with stages: goanalysis_metalinter: 3.898376217s, unused: 1.150504908s, makezero: 264.56546ms 
INFO Fix issue &result.Issue{FromLinter:"gofumpt", Text:"File is not `gofumpt`-ed", Severity:"", SourceLines:[]string{"\t\"context\"", "\t\"database/sql\"", ""}, Replacement:(*result.Replacement)(0xc006b728d0), Pkg:(*packages.Package)(0xc0013b2240), LineRange:(*result.Range)(0xc006b728c0), Pos:token.Position{Filename:"internal/pkg/role/store.go", Offset:0, Line:4, Column:0}, HunkPos:0, ExpectNoLint:false, ExpectedNoLintLinter:""} with range {4 6} 
INFO Skip issue &result.Issue{FromLinter:"gci", Text:"File is not `gci`-ed with -local myproject", Severity:"", SourceLines:[]string{"\t\"database/sql\""}, Replacement:(*result.Replacement)(0xc0000adb90), Pkg:(*packages.Package)(0xc0013b2240), LineRange:(*result.Range)(nil), Pos:token.Position{Filename:"internal/pkg/role/store.go", Offset:0, Line:5, Column:0}, HunkPos:0, ExpectNoLint:false, ExpectedNoLintLinter:""}: intersects with end 6 
INFO Fix issue &result.Issue{FromLinter:"gofumpt", Text:"File is not `gofumpt`-ed", Severity:"", SourceLines:[]string{"\t\"myproject/pkg/util\""}, Replacement:(*result.Replacement)(0xc006b72910), Pkg:(*packages.Package)(0xc0013b2240), LineRange:(*result.Range)(nil), Pos:token.Position{Filename:"internal/pkg/role/store.go", Offset:0, Line:10, Column:0}, HunkPos:0, ExpectNoLint:false, ExpectedNoLintLinter:""} with range {10 10} 
INFO Fix issue &result.Issue{FromLinter:"gci", Text:"File is not `gci`-ed with -local myproject", Severity:"", SourceLines:[]string{"", "\t\"github.com/pkg/errors\"", "\t\"gopkg.in/guregu/null.v3\"", "", "\tsq \"github.com/Masterminds/squirrel\""}, Replacement:(*result.Replacement)(0xc0000adbd0), Pkg:(*packages.Package)(0xc0013b2240), LineRange:(*result.Range)(0xc0000adbc0), Pos:token.Position{Filename:"internal/pkg/role/store.go", Offset:0, Line:11, Column:0}, HunkPos:0, ExpectNoLint:false, ExpectedNoLintLinter:""} with range {11 15} 
INFO Fix issue &result.Issue{FromLinter:"gofumpt", Text:"File is not `gofumpt`-ed", Severity:"", SourceLines:[]string{"\t\"context\"", "\t\"fmt\"", "\t\"strings\"", ""}, Replacement:(*result.Replacement)(0xc00504ce50), Pkg:(*packages.Package)(0xc0012e5b00), LineRange:(*result.Range)(0xc00504ce40), Pos:token.Position{Filename:"internal/pkg/audit/service.go", Offset:0, Line:4, Column:0}, HunkPos:0, ExpectNoLint:false, ExpectedNoLintLinter:""} with range {4 7} 
INFO Skip issue &result.Issue{FromLinter:"gci", Text:"File is not `gci`-ed with -local myproject", Severity:"", SourceLines:[]string{""}, Replacement:(*result.Replacement)(0xc009e68550), Pkg:(*packages.Package)(0xc0012e5b00), LineRange:(*result.Range)(nil), Pos:token.Position{Filename:"internal/pkg/audit/service.go", Offset:0, Line:7, Column:0}, HunkPos:0, ExpectNoLint:false, ExpectedNoLintLinter:""}: intersects with end 7 
INFO Fix issue &result.Issue{FromLinter:"gofumpt", Text:"File is not `gofumpt`-ed", Severity:"", SourceLines:[]string{"\t\"myproject/pkg/session\""}, Replacement:(*result.Replacement)(0xc00504ce90), Pkg:(*packages.Package)(0xc0012e5b00), LineRange:(*result.Range)(nil), Pos:token.Position{Filename:"internal/pkg/audit/service.go", Offset:0, Line:11, Column:0}, HunkPos:0, ExpectNoLint:false, ExpectedNoLintLinter:""} with range {11 11} 
INFO Fix issue &result.Issue{FromLinter:"gci", Text:"File is not `gci`-ed with -local myproject", Severity:"", SourceLines:[]string{"", "\t\"github.com/pkg/errors\"", "\t\"github.com/r3labs/diff\"", "\t\"gopkg.in/guregu/null.v3\""}, Replacement:(*result.Replacement)(0xc009e68590), Pkg:(*packages.Package)(0xc0012e5b00), LineRange:(*result.Range)(0xc009e68580), Pos:token.Position{Filename:"internal/pkg/audit/service.go", Offset:0, Line:12, Column:0}, HunkPos:0, ExpectNoLint:false, ExpectedNoLintLinter:""} with range {12 15} 
INFO Fix issue &result.Issue{FromLinter:"gofumpt", Text:"File is not `gofumpt`-ed", Severity:"", SourceLines:[]string{"\t\"testing\"", ""}, Replacement:(*result.Replacement)(0xc00f8f14d0), Pkg:(*packages.Package)(0xc001326ea0), LineRange:(*result.Range)(0xc00f8f14c0), Pos:token.Position{Filename:"internal/pkg/calltype/validation_test.go", Offset:0, Line:4, Column:0}, HunkPos:0, ExpectNoLint:false, ExpectedNoLintLinter:""} with range {4 5} 
INFO Skip issue &result.Issue{FromLinter:"gci", Text:"File is not `gci`-ed with -local myproject", Severity:"", SourceLines:[]string{""}, Replacement:(*result.Replacement)(0xc00caad690), Pkg:(*packages.Package)(0xc001326ea0), LineRange:(*result.Range)(nil), Pos:token.Position{Filename:"internal/pkg/calltype/validation_test.go", Offset:0, Line:5, Column:0}, HunkPos:0, ExpectNoLint:false, ExpectedNoLintLinter:""}: intersects with end 5 
INFO Fix issue &result.Issue{FromLinter:"gofumpt", Text:"File is not `gofumpt`-ed", Severity:"", SourceLines:[]string{"\t\"myproject/pkg/util\""}, Replacement:(*result.Replacement)(0xc00f8f1510), Pkg:(*packages.Package)(0xc001326ea0), LineRange:(*result.Range)(nil), Pos:token.Position{Filename:"internal/pkg/calltype/validation_test.go", Offset:0, Line:7, Column:0}, HunkPos:0, ExpectNoLint:false, ExpectedNoLintLinter:""} with range {7 7} 
INFO Fix issue &result.Issue{FromLinter:"gci", Text:"File is not `gci`-ed with -local myproject", Severity:"", SourceLines:[]string{"", "\t\"github.com/stretchr/testify/require\""}, Replacement:(*result.Replacement)(0xc00caad6d0), Pkg:(*packages.Package)(0xc001326ea0), LineRange:(*result.Range)(0xc00caad6c0), Pos:token.Position{Filename:"internal/pkg/calltype/validation_test.go", Offset:0, Line:8, Column:0}, HunkPos:0, ExpectNoLint:false, ExpectedNoLintLinter:""} with range {8 9} 
INFO Fix issue &result.Issue{FromLinter:"gofumpt", Text:"File is not `gofumpt`-ed", Severity:"", SourceLines:[]string{"import ("}, Replacement:(*result.Replacement)(0xc010a02f10), Pkg:(*packages.Package)(0xc0009ed320), LineRange:(*result.Range)(nil), Pos:token.Position{Filename:"internal/daemon/time.go", Offset:0, Line:3, Column:0}, HunkPos:0, ExpectNoLint:false, ExpectedNoLintLinter:""} with range {3 3} 
INFO Fix issue &result.Issue{FromLinter:"gofumpt", Text:"File is not `gofumpt`-ed", Severity:"", SourceLines:[]string{"", "\t\"myproject/internal/pkg/entity\"", "\t\"myproject/internal/pkg/system\"", "\t\"myproject/pkg/log\""}, Replacement:(*result.Replacement)(0xc010a02f50), Pkg:(*packages.Package)(0xc0009ed320), LineRange:(*result.Range)(0xc010a02f40), Pos:token.Position{Filename:"internal/daemon/time.go", Offset:0, Line:7, Column:0}, HunkPos:0, ExpectNoLint:false, ExpectedNoLintLinter:""} with range {7 10} 
INFO Line 13 has multiple issues but at least one of them isn't inline: []result.Issue{result.Issue{FromLinter:"gofmt", Text:"File is not `gofmt`-ed with `-s`", Severity:"", SourceLines:[]string{")"}, Replacement:(*result.Replacement)(0xc009872e90), Pkg:(*packages.Package)(0xc0007d7e60), LineRange:(*result.Range)(nil), Pos:token.Position{Filename:"pkg/db/migration.go", Offset:0, Line:13, Column:0}, HunkPos:0, ExpectNoLint:false, ExpectedNoLintLinter:""}, result.Issue{FromLinter:"gofumpt", Text:"File is not `gofumpt`-ed", Severity:"", SourceLines:[]string{")"}, Replacement:(*result.Replacement)(0xc008691d90), Pkg:(*packages.Package)(0xc0007d7e60), LineRange:(*result.Range)(nil), Pos:token.Position{Filename:"pkg/db/migration.go", Offset:0, Line:13, Column:0}, HunkPos:0, ExpectNoLint:false, ExpectedNoLintLinter:""}, result.Issue{FromLinter:"goimports", Text:"File is not `goimports`-ed with -local myproject", Severity:"", SourceLines:[]string{")"}, Replacement:(*result.Replacement)(0xc008ccb990), Pkg:(*packages.Package)(0xc0007d7e60), LineRange:(*result.Range)(nil), Pos:token.Position{Filename:"pkg/db/migration.go", Offset:0, Line:13, Column:0}, HunkPos:0, ExpectNoLint:false, ExpectedNoLintLinter:""}} 
INFO Line 55 has multiple issues but at least one of them isn't inline: []result.Issue{result.Issue{FromLinter:"gofmt", Text:"File is not `gofmt`-ed with `-s`", Severity:"", SourceLines:[]string{"\t\tif errors.Is(err ,migrate.ErrNoChange) {"}, Replacement:(*result.Replacement)(0xc009872f10), Pkg:(*packages.Package)(0xc0007d7e60), LineRange:(*result.Range)(nil), Pos:token.Position{Filename:"pkg/db/migration.go", Offset:0, Line:55, Column:0}, HunkPos:0, ExpectNoLint:false, ExpectedNoLintLinter:""}, result.Issue{FromLinter:"gofumpt", Text:"File is not `gofumpt`-ed", Severity:"", SourceLines:[]string{"\t\tif errors.Is(err ,migrate.ErrNoChange) {"}, Replacement:(*result.Replacement)(0xc008691e10), Pkg:(*packages.Package)(0xc0007d7e60), LineRange:(*result.Range)(nil), Pos:token.Position{Filename:"pkg/db/migration.go", Offset:0, Line:55, Column:0}, HunkPos:0, ExpectNoLint:false, ExpectedNoLintLinter:""}, result.Issue{FromLinter:"goimports", Text:"File is not `goimports`-ed with -local myproject", Severity:"", SourceLines:[]string{"\t\tif errors.Is(err ,migrate.ErrNoChange) {"}, Replacement:(*result.Replacement)(0xc008ccba10), Pkg:(*packages.Package)(0xc0007d7e60), LineRange:(*result.Range)(nil), Pos:token.Position{Filename:"pkg/db/migration.go", Offset:0, Line:55, Column:0}, HunkPos:0, ExpectNoLint:false, ExpectedNoLintLinter:""}} 
INFO Line 66 has multiple issues but at least one of them isn't inline: []result.Issue{result.Issue{FromLinter:"gofmt", Text:"File is not `gofmt`-ed with `-s`", Severity:"", SourceLines:[]string{"\t\tif errors.Is(err ,migrate.ErrNoChange) {"}, Replacement:(*result.Replacement)(0xc009872f90), Pkg:(*packages.Package)(0xc0007d7e60), LineRange:(*result.Range)(nil), Pos:token.Position{Filename:"pkg/db/migration.go", Offset:0, Line:66, Column:0}, HunkPos:0, ExpectNoLint:false, ExpectedNoLintLinter:""}, result.Issue{FromLinter:"gofumpt", Text:"File is not `gofumpt`-ed", Severity:"", SourceLines:[]string{"\t\tif errors.Is(err ,migrate.ErrNoChange) {"}, Replacement:(*result.Replacement)(0xc008691e90), Pkg:(*packages.Package)(0xc0007d7e60), LineRange:(*result.Range)(nil), Pos:token.Position{Filename:"pkg/db/migration.go", Offset:0, Line:66, Column:0}, HunkPos:0, ExpectNoLint:false, ExpectedNoLintLinter:""}, result.Issue{FromLinter:"goimports", Text:"File is not `goimports`-ed with -local myproject", Severity:"", SourceLines:[]string{"\t\tif errors.Is(err ,migrate.ErrNoChange) {"}, Replacement:(*result.Replacement)(0xc008ccba90), Pkg:(*packages.Package)(0xc0007d7e60), LineRange:(*result.Range)(nil), Pos:token.Position{Filename:"pkg/db/migration.go", Offset:0, Line:66, Column:0}, HunkPos:0, ExpectNoLint:false, ExpectedNoLintLinter:""}} 
INFO Fix issue &result.Issue{FromLinter:"gofumpt", Text:"File is not `gofumpt`-ed", Severity:"", SourceLines:[]string{"import ("}, Replacement:(*result.Replacement)(0xc008691d10), Pkg:(*packages.Package)(0xc0007d7e60), LineRange:(*result.Range)(nil), Pos:token.Position{Filename:"pkg/db/migration.go", Offset:0, Line:3, Column:0}, HunkPos:0, ExpectNoLint:false, ExpectedNoLintLinter:""} with range {3 3} 
INFO Fix issue &result.Issue{FromLinter:"gofumpt", Text:"File is not `gofumpt`-ed", Severity:"", SourceLines:[]string{"", "\t\"myproject/pkg/log\""}, Replacement:(*result.Replacement)(0xc008691d50), Pkg:(*packages.Package)(0xc0007d7e60), LineRange:(*result.Range)(0xc008691d40), Pos:token.Position{Filename:"pkg/db/migration.go", Offset:0, Line:6, Column:0}, HunkPos:0, ExpectNoLint:false, ExpectedNoLintLinter:""} with range {6 7} 
INFO Skip issue &result.Issue{FromLinter:"gci", Text:"File is not `gci`-ed with -local myproject", Severity:"", SourceLines:[]string{"\t\"myproject/pkg/log\"", ""}, Replacement:(*result.Replacement)(0xc008416250), Pkg:(*packages.Package)(0xc0007d7e60), LineRange:(*result.Range)(0xc008416240), Pos:token.Position{Filename:"pkg/db/migration.go", Offset:0, Line:7, Column:0}, HunkPos:0, ExpectNoLint:false, ExpectedNoLintLinter:""}: intersects with end 7 
INFO Fix issue &result.Issue{FromLinter:"gci", Text:"File is not `gci`-ed with -local myproject", Severity:"", SourceLines:[]string{"\t\"github.com/pkg/errors\""}, Replacement:(*result.Replacement)(0xc008416290), Pkg:(*packages.Package)(0xc0007d7e60), LineRange:(*result.Range)(nil), Pos:token.Position{Filename:"pkg/db/migration.go", Offset:0, Line:12, Column:0}, HunkPos:0, ExpectNoLint:false, ExpectedNoLintLinter:""} with range {12 12} 
INFO Fix issue &result.Issue{FromLinter:"gofmt", Text:"File is not `gofmt`-ed with `-s`", Severity:"", SourceLines:[]string{")"}, Replacement:(*result.Replacement)(0xc009872e90), Pkg:(*packages.Package)(0xc0007d7e60), LineRange:(*result.Range)(nil), Pos:token.Position{Filename:"pkg/db/migration.go", Offset:0, Line:13, Column:0}, HunkPos:0, ExpectNoLint:false, ExpectedNoLintLinter:""} with range {13 13} 
INFO Fix issue &result.Issue{FromLinter:"gofmt", Text:"File is not `gofmt`-ed with `-s`", Severity:"", SourceLines:[]string{"\t\tif errors.Is(err ,migrate.ErrNoChange) {"}, Replacement:(*result.Replacement)(0xc009872f10), Pkg:(*packages.Package)(0xc0007d7e60), LineRange:(*result.Range)(nil), Pos:token.Position{Filename:"pkg/db/migration.go", Offset:0, Line:55, Column:0}, HunkPos:0, ExpectNoLint:false, ExpectedNoLintLinter:""} with range {55 55} 
INFO Fix issue &result.Issue{FromLinter:"gofmt", Text:"File is not `gofmt`-ed with `-s`", Severity:"", SourceLines:[]string{"\t\tif errors.Is(err ,migrate.ErrNoChange) {"}, Replacement:(*result.Replacement)(0xc009872f90), Pkg:(*packages.Package)(0xc0007d7e60), LineRange:(*result.Range)(nil), Pos:token.Position{Filename:"pkg/db/migration.go", Offset:0, Line:66, Column:0}, HunkPos:0, ExpectNoLint:false, ExpectedNoLintLinter:""} with range {66 66} 
INFO Line 6 has multiple issues but at least one of them isn't inline: []result.Issue{result.Issue{FromLinter:"gci", Text:"File is not `gci`-ed with -local myproject", Severity:"", SourceLines:[]string{""}, Replacement:(*result.Replacement)(0xc0132ac110), Pkg:(*packages.Package)(0xc0012bad80), LineRange:(*result.Range)(nil), Pos:token.Position{Filename:"internal/gets/getshttp/displaygroup_test.go", Offset:0, Line:6, Column:0}, HunkPos:0, ExpectNoLint:false, ExpectedNoLintLinter:""}, result.Issue{FromLinter:"gofumpt", Text:"File is not `gofumpt`-ed", Severity:"", SourceLines:[]string{"", "\t\"myproject/internal/gets\"", "\t\"myproject/internal/pkg/entity\""}, Replacement:(*result.Replacement)(0xc00cfd7690), Pkg:(*packages.Package)(0xc0012bad80), LineRange:(*result.Range)(0xc00cfd7680), Pos:token.Position{Filename:"internal/gets/getshttp/displaygroup_test.go", Offset:0, Line:6, Column:0}, HunkPos:0, ExpectNoLint:false, ExpectedNoLintLinter:""}} 
INFO Fix issue &result.Issue{FromLinter:"gofumpt", Text:"File is not `gofumpt`-ed", Severity:"", SourceLines:[]string{"import ("}, Replacement:(*result.Replacement)(0xc00cfd7650), Pkg:(*packages.Package)(0xc0012bad80), LineRange:(*result.Range)(nil), Pos:token.Position{Filename:"internal/gets/getshttp/displaygroup_test.go", Offset:0, Line:3, Column:0}, HunkPos:0, ExpectNoLint:false, ExpectedNoLintLinter:""} with range {3 3} 
INFO Fix issue &result.Issue{FromLinter:"gci", Text:"File is not `gci`-ed with -local myproject", Severity:"", SourceLines:[]string{""}, Replacement:(*result.Replacement)(0xc0132ac110), Pkg:(*packages.Package)(0xc0012bad80), LineRange:(*result.Range)(nil), Pos:token.Position{Filename:"internal/gets/getshttp/displaygroup_test.go", Offset:0, Line:6, Column:0}, HunkPos:0, ExpectNoLint:false, ExpectedNoLintLinter:""} with range {6 6} 
INFO Fix issue &result.Issue{FromLinter:"gci", Text:"File is not `gci`-ed with -local myproject", Severity:"", SourceLines:[]string{"", "\t\"github.com/stretchr/testify/require\""}, Replacement:(*result.Replacement)(0xc0132ac150), Pkg:(*packages.Package)(0xc0012bad80), LineRange:(*result.Range)(0xc0132ac140), Pos:token.Position{Filename:"internal/gets/getshttp/displaygroup_test.go", Offset:0, Line:9, Column:0}, HunkPos:0, ExpectNoLint:false, ExpectedNoLintLinter:""} with range {9 10} 
INFO Fix issue &result.Issue{FromLinter:"gofumpt", Text:"File is not `gofumpt`-ed", Severity:"", SourceLines:[]string{"import ("}, Replacement:(*result.Replacement)(0xc0031333d0), Pkg:(*packages.Package)(0xc0012c4fc0), LineRange:(*result.Range)(nil), Pos:token.Position{Filename:"internal/graphql/gqlresolvers/indicator_test.go", Offset:0, Line:3, Column:0}, HunkPos:0, ExpectNoLint:false, ExpectedNoLintLinter:""} with range {3 3} 
INFO Fix issue &result.Issue{FromLinter:"gofumpt", Text:"File is not `gofumpt`-ed", Severity:"", SourceLines:[]string{"", "\t\"myproject/internal/pkg\""}, Replacement:(*result.Replacement)(0xc003133410), Pkg:(*packages.Package)(0xc0012c4fc0), LineRange:(*result.Range)(0xc003133400), Pos:token.Position{Filename:"internal/graphql/gqlresolvers/indicator_test.go", Offset:0, Line:7, Column:0}, HunkPos:0, ExpectNoLint:false, ExpectedNoLintLinter:""} with range {7 8} 
INFO Skip issue &result.Issue{FromLinter:"gci", Text:"File is not `gci`-ed with -local myproject", Severity:"", SourceLines:[]string{"\t\"myproject/internal/pkg\"", ""}, Replacement:(*result.Replacement)(0xc00581ffd0), Pkg:(*packages.Package)(0xc0012c4fc0), LineRange:(*result.Range)(0xc00581ffc0), Pos:token.Position{Filename:"internal/graphql/gqlresolvers/indicator_test.go", Offset:0, Line:8, Column:0}, HunkPos:0, ExpectNoLint:false, ExpectedNoLintLinter:""}: intersects with end 8 
INFO Fix issue &result.Issue{FromLinter:"gci", Text:"File is not `gci`-ed with -local myproject", Severity:"", SourceLines:[]string{"\t\"github.com/stretchr/testify/require\""}, Replacement:(*result.Replacement)(0xc009096010), Pkg:(*packages.Package)(0xc0012c4fc0), LineRange:(*result.Range)(nil), Pos:token.Position{Filename:"internal/graphql/gqlresolvers/indicator_test.go", Offset:0, Line:11, Column:0}, HunkPos:0, ExpectNoLint:false, ExpectedNoLintLinter:""} with range {11 11} 
INFO Fix issue &result.Issue{FromLinter:"gofumpt", Text:"File is not `gofumpt`-ed", Severity:"", SourceLines:[]string{"import ("}, Replacement:(*result.Replacement)(0xc00f1b2f90), Pkg:(*packages.Package)(0xc0012c4fc0), LineRange:(*result.Range)(nil), Pos:token.Position{Filename:"internal/graphql/gqlresolvers/section_test.go", Offset:0, Line:3, Column:0}, HunkPos:0, ExpectNoLint:false, ExpectedNoLintLinter:""} with range {3 3} 
INFO Fix issue &result.Issue{FromLinter:"gofumpt", Text:"File is not `gofumpt`-ed", Severity:"", SourceLines:[]string{"", "\t\"myproject/internal/pkg\""}, Replacement:(*result.Replacement)(0xc00f1b2fd0), Pkg:(*packages.Package)(0xc0012c4fc0), LineRange:(*result.Range)(0xc00f1b2fc0), Pos:token.Position{Filename:"internal/graphql/gqlresolvers/section_test.go", Offset:0, Line:7, Column:0}, HunkPos:0, ExpectNoLint:false, ExpectedNoLintLinter:""} with range {7 8} 
INFO Skip issue &result.Issue{FromLinter:"gci", Text:"File is not `gci`-ed with -local myproject", Severity:"", SourceLines:[]string{"\t\"myproject/internal/pkg\"", ""}, Replacement:(*result.Replacement)(0xc009096390), Pkg:(*packages.Package)(0xc0012c4fc0), LineRange:(*result.Range)(0xc009096380), Pos:token.Position{Filename:"internal/graphql/gqlresolvers/section_test.go", Offset:0, Line:8, Column:0}, HunkPos:0, ExpectNoLint:false, ExpectedNoLintLinter:""}: intersects with end 8 
INFO Fix issue &result.Issue{FromLinter:"gci", Text:"File is not `gci`-ed with -local myproject", Severity:"", SourceLines:[]string{"\t\"github.com/stretchr/testify/require\""}, Replacement:(*result.Replacement)(0xc0090963d0), Pkg:(*packages.Package)(0xc0012c4fc0), LineRange:(*result.Range)(nil), Pos:token.Position{Filename:"internal/graphql/gqlresolvers/section_test.go", Offset:0, Line:11, Column:0}, HunkPos:0, ExpectNoLint:false, ExpectedNoLintLinter:""} with range {11 11} 
INFO Fix issue &result.Issue{FromLinter:"gofumpt", Text:"File is not `gofumpt`-ed", Severity:"", SourceLines:[]string{"import ("}, Replacement:(*result.Replacement)(0xc00b682310), Pkg:(*packages.Package)(0xc0012bad80), LineRange:(*result.Range)(nil), Pos:token.Position{Filename:"internal/gets/getshttp/subscription.go", Offset:0, Line:3, Column:0}, HunkPos:0, ExpectNoLint:false, ExpectedNoLintLinter:""} with range {3 3} 
INFO Fix issue &result.Issue{FromLinter:"gofumpt", Text:"File is not `gofumpt`-ed", Severity:"", SourceLines:[]string{"", "\t\"myproject/pkg/log\"", "\t\"myproject/pkg/util\""}, Replacement:(*result.Replacement)(0xc00b682350), Pkg:(*packages.Package)(0xc0012bad80), LineRange:(*result.Range)(0xc00b682340), Pos:token.Position{Filename:"internal/gets/getshttp/subscription.go", Offset:0, Line:6, Column:0}, HunkPos:0, ExpectNoLint:false, ExpectedNoLintLinter:""} with range {6 8} 
INFO Line 7 has multiple issues but at least one of them isn't inline: []result.Issue{result.Issue{FromLinter:"gci", Text:"File is not `gci`-ed with -local myproject", Severity:"", SourceLines:[]string{""}, Replacement:(*result.Replacement)(0xc00bbccd50), Pkg:(*packages.Package)(0xc0012fb680), LineRange:(*result.Range)(nil), Pos:token.Position{Filename:"internal/pkg/call/search_test.go", Offset:0, Line:7, Column:0}, HunkPos:0, ExpectNoLint:false, ExpectedNoLintLinter:""}, result.Issue{FromLinter:"gofumpt", Text:"File is not `gofumpt`-ed", Severity:"", SourceLines:[]string{"", "\t\"myproject/internal/graphql/gqlmodels\""}, Replacement:(*result.Replacement)(0xc00535e090), Pkg:(*packages.Package)(0xc0012fb680), LineRange:(*result.Range)(0xc00535e080), Pos:token.Position{Filename:"internal/pkg/call/search_test.go", Offset:0, Line:7, Column:0}, HunkPos:0, ExpectNoLint:false, ExpectedNoLintLinter:""}} 
INFO Fix issue &result.Issue{FromLinter:"gofumpt", Text:"File is not `gofumpt`-ed", Severity:"", SourceLines:[]string{"import ("}, Replacement:(*result.Replacement)(0xc00535e050), Pkg:(*packages.Package)(0xc0012fb680), LineRange:(*result.Range)(nil), Pos:token.Position{Filename:"internal/pkg/call/search_test.go", Offset:0, Line:3, Column:0}, HunkPos:0, ExpectNoLint:false, ExpectedNoLintLinter:""} with range {3 3} 
INFO Fix issue &result.Issue{FromLinter:"gci", Text:"File is not `gci`-ed with -local myproject", Severity:"", SourceLines:[]string{""}, Replacement:(*result.Replacement)(0xc00bbccd50), Pkg:(*packages.Package)(0xc0012fb680), LineRange:(*result.Range)(nil), Pos:token.Position{Filename:"internal/pkg/call/search_test.go", Offset:0, Line:7, Column:0}, HunkPos:0, ExpectNoLint:false, ExpectedNoLintLinter:""} with range {7 7} 
INFO Fix issue &result.Issue{FromLinter:"gci", Text:"File is not `gci`-ed with -local myproject", Severity:"", SourceLines:[]string{"", "\t\"github.com/stretchr/testify/require\""}, Replacement:(*result.Replacement)(0xc00bbccd90), Pkg:(*packages.Package)(0xc0012fb680), LineRange:(*result.Range)(0xc00bbccd80), Pos:token.Position{Filename:"internal/pkg/call/search_test.go", Offset:0, Line:9, Column:0}, HunkPos:0, ExpectNoLint:false, ExpectedNoLintLinter:""} with range {9 10} 
INFO Fix issue &result.Issue{FromLinter:"gofumpt", Text:"File is not `gofumpt`-ed", Severity:"", SourceLines:[]string{"\t\"context\"", ""}, Replacement:(*result.Replacement)(0xc00a4ebfd0), Pkg:(*packages.Package)(0xc001316fc0), LineRange:(*result.Range)(0xc00a4ebfc0), Pos:token.Position{Filename:"internal/pkg/callsource/usecases.go", Offset:0, Line:4, Column:0}, HunkPos:0, ExpectNoLint:false, ExpectedNoLintLinter:""} with range {4 5} 
INFO Skip issue &result.Issue{FromLinter:"gci", Text:"File is not `gci`-ed with -local myproject", Severity:"", SourceLines:[]string{""}, Replacement:(*result.Replacement)(0xc00a30cb10), Pkg:(*packages.Package)(0xc001316fc0), LineRange:(*result.Range)(nil), Pos:token.Position{Filename:"internal/pkg/callsource/usecases.go", Offset:0, Line:5, Column:0}, HunkPos:0, ExpectNoLint:false, ExpectedNoLintLinter:""}: intersects with end 5 
INFO Fix issue &result.Issue{FromLinter:"gofumpt", Text:"File is not `gofumpt`-ed", Severity:"", SourceLines:[]string{"\t\"myproject/pkg/db\""}, Replacement:(*result.Replacement)(0xc00aa02010), Pkg:(*packages.Package)(0xc001316fc0), LineRange:(*result.Range)(nil), Pos:token.Position{Filename:"internal/pkg/callsource/usecases.go", Offset:0, Line:9, Column:0}, HunkPos:0, ExpectNoLint:false, ExpectedNoLintLinter:""} with range {9 9} 
INFO Fix issue &result.Issue{FromLinter:"gci", Text:"File is not `gci`-ed with -local myproject", Severity:"", SourceLines:[]string{"", "\t\"github.com/pkg/errors\""}, Replacement:(*result.Replacement)(0xc00a30cb50), Pkg:(*packages.Package)(0xc001316fc0), LineRange:(*result.Range)(0xc00a30cb40), Pos:token.Position{Filename:"internal/pkg/callsource/usecases.go", Offset:0, Line:10, Column:0}, HunkPos:0, ExpectNoLint:false, ExpectedNoLintLinter:""} with range {10 11} 
INFO Fix issue &result.Issue{FromLinter:"gofumpt", Text:"File is not `gofumpt`-ed", Severity:"", SourceLines:[]string{"import ("}, Replacement:(*result.Replacement)(0xc008c9be50), Pkg:(*packages.Package)(0xc00126d680), LineRange:(*result.Range)(nil), Pos:token.Position{Filename:"cmd/serve.go", Offset:0, Line:3, Column:0}, HunkPos:0, ExpectNoLint:false, ExpectedNoLintLinter:""} with range {3 3} 
INFO Fix issue &result.Issue{FromLinter:"gofumpt", Text:"File is not `gofumpt`-ed", Severity:"", SourceLines:[]string{"", "\t\"myproject/internal/app\"", "\t\"myproject/pkg/log\""}, Replacement:(*result.Replacement)(0xc008c9bf10), Pkg:(*packages.Package)(0xc00126d680), LineRange:(*result.Range)(0xc008c9bf00), Pos:token.Position{Filename:"cmd/serve.go", Offset:0, Line:11, Column:0}, HunkPos:0, ExpectNoLint:false, ExpectedNoLintLinter:""} with range {11 13} 
INFO Skip issue &result.Issue{FromLinter:"gci", Text:"File is not `gci`-ed with -local myproject", Severity:"", SourceLines:[]string{"\t\"myproject/internal/app\"", "\t\"myproject/pkg/log\"", ""}, Replacement:(*result.Replacement)(0xc015058810), Pkg:(*packages.Package)(0xc00126d680), LineRange:(*result.Range)(0xc015058800), Pos:token.Position{Filename:"cmd/serve.go", Offset:0, Line:12, Column:0}, HunkPos:0, ExpectNoLint:false, ExpectedNoLintLinter:""}: intersects with end 13 
INFO Fix issue &result.Issue{FromLinter:"gci", Text:"File is not `gci`-ed with -local myproject", Severity:"", SourceLines:[]string{"\t\"github.com/spf13/cobra\""}, Replacement:(*result.Replacement)(0xc0150588d0), Pkg:(*packages.Package)(0xc00126d680), LineRange:(*result.Range)(nil), Pos:token.Position{Filename:"cmd/serve.go", Offset:0, Line:17, Column:0}, HunkPos:0, ExpectNoLint:false, ExpectedNoLintLinter:""} with range {17 17} 
INFO Fix issue &result.Issue{FromLinter:"gofumpt", Text:"File is not `gofumpt`-ed", Severity:"", SourceLines:[]string{"\t\"context\"", ""}, Replacement:(*result.Replacement)(0xc015dce110), Pkg:(*packages.Package)(0xc0012c4fc0), LineRange:(*result.Range)(0xc015dce100), Pos:token.Position{Filename:"internal/graphql/gqlresolvers/checkpointmap.go", Offset:0, Line:7, Column:0}, HunkPos:0, ExpectNoLint:false, ExpectedNoLintLinter:""} with range {7 8} 
INFO Fix issue &result.Issue{FromLinter:"gofumpt", Text:"File is not `gofumpt`-ed", Severity:"", SourceLines:[]string{"\t\"myproject/internal/pkg/entity\""}, Replacement:(*result.Replacement)(0xc015dce150), Pkg:(*packages.Package)(0xc0012c4fc0), LineRange:(*result.Range)(nil), Pos:token.Position{Filename:"internal/graphql/gqlresolvers/checkpointmap.go", Offset:0, Line:11, Column:0}, HunkPos:0, ExpectNoLint:false, ExpectedNoLintLinter:""} with range {11 11} 
INFO Line 7 has multiple issues but at least one of them isn't inline: []result.Issue{result.Issue{FromLinter:"gci", Text:"File is not `gci`-ed with -local myproject", Severity:"", SourceLines:[]string{""}, Replacement:(*result.Replacement)(0xc004dd0210), Pkg:(*packages.Package)(0xc00036ed80), LineRange:(*result.Range)(nil), Pos:token.Position{Filename:"pkg/log/log.go", Offset:0, Line:7, Column:0}, HunkPos:0, ExpectNoLint:false, ExpectedNoLintLinter:""}, result.Issue{FromLinter:"gofumpt", Text:"File is not `gofumpt`-ed", Severity:"", SourceLines:[]string{"", "\t\"myproject/pkg/fs\""}, Replacement:(*result.Replacement)(0xc007c686d0), Pkg:(*packages.Package)(0xc00036ed80), LineRange:(*result.Range)(0xc007c686c0), Pos:token.Position{Filename:"pkg/log/log.go", Offset:0, Line:7, Column:0}, HunkPos:0, ExpectNoLint:false, ExpectedNoLintLinter:""}} 
INFO Fix issue &result.Issue{FromLinter:"gofumpt", Text:"File is not `gofumpt`-ed", Severity:"", SourceLines:[]string{"import ("}, Replacement:(*result.Replacement)(0xc007c68690), Pkg:(*packages.Package)(0xc00036ed80), LineRange:(*result.Range)(nil), Pos:token.Position{Filename:"pkg/log/log.go", Offset:0, Line:3, Column:0}, HunkPos:0, ExpectNoLint:false, ExpectedNoLintLinter:""} with range {3 3} 
INFO Fix issue &result.Issue{FromLinter:"gci", Text:"File is not `gci`-ed with -local myproject", Severity:"", SourceLines:[]string{""}, Replacement:(*result.Replacement)(0xc004dd0210), Pkg:(*packages.Package)(0xc00036ed80), LineRange:(*result.Range)(nil), Pos:token.Position{Filename:"pkg/log/log.go", Offset:0, Line:7, Column:0}, HunkPos:0, ExpectNoLint:false, ExpectedNoLintLinter:""} with range {7 7} 
INFO Fix issue &result.Issue{FromLinter:"gci", Text:"File is not `gci`-ed with -local myproject", Severity:"", SourceLines:[]string{"", "\t\"github.com/sirupsen/logrus\""}, Replacement:(*result.Replacement)(0xc004dd0250), Pkg:(*packages.Package)(0xc00036ed80), LineRange:(*result.Range)(0xc004dd0240), Pos:token.Position{Filename:"pkg/log/log.go", Offset:0, Line:9, Column:0}, HunkPos:0, ExpectNoLint:false, ExpectedNoLintLinter:""} with range {9 10} 
INFO Line 5 has multiple issues but at least one of them isn't inline: []result.Issue{result.Issue{FromLinter:"gci", Text:"File is not `gci`-ed with -local myproject", Severity:"", SourceLines:[]string{""}, Replacement:(*result.Replacement)(0xc0185ff150), Pkg:(*packages.Package)(0xc0012af9e0), LineRange:(*result.Range)(nil), Pos:token.Position{Filename:"internal/gets/getsdiff/device_test.go", Offset:0, Line:5, Column:0}, HunkPos:0, ExpectNoLint:false, ExpectedNoLintLinter:""}, result.Issue{FromLinter:"gofumpt", Text:"File is not `gofumpt`-ed", Severity:"", SourceLines:[]string{"", "\t\"myproject/internal/gets\""}, Replacement:(*result.Replacement)(0xc0181e5310), Pkg:(*packages.Package)(0xc0012af9e0), LineRange:(*result.Range)(0xc0181e5300), Pos:token.Position{Filename:"internal/gets/getsdiff/device_test.go", Offset:0, Line:5, Column:0}, HunkPos:0, ExpectNoLint:false, ExpectedNoLintLinter:""}} 
INFO Fix issue &result.Issue{FromLinter:"gofumpt", Text:"File is not `gofumpt`-ed", Severity:"", SourceLines:[]string{"import ("}, Replacement:(*result.Replacement)(0xc0181e52d0), Pkg:(*packages.Package)(0xc0012af9e0), LineRange:(*result.Range)(nil), Pos:token.Position{Filename:"internal/gets/getsdiff/device_test.go", Offset:0, Line:3, Column:0}, HunkPos:0, ExpectNoLint:false, ExpectedNoLintLinter:""} with range {3 3} 
INFO Fix issue &result.Issue{FromLinter:"gci", Text:"File is not `gci`-ed with -local myproject", Severity:"", SourceLines:[]string{""}, Replacement:(*result.Replacement)(0xc0185ff150), Pkg:(*packages.Package)(0xc0012af9e0), LineRange:(*result.Range)(nil), Pos:token.Position{Filename:"internal/gets/getsdiff/device_test.go", Offset:0, Line:5, Column:0}, HunkPos:0, ExpectNoLint:false, ExpectedNoLintLinter:""} with range {5 5} 
INFO Fix issue &result.Issue{FromLinter:"gci", Text:"File is not `gci`-ed with -local myproject", Severity:"", SourceLines:[]string{"", "\t\"github.com/stretchr/testify/require\""}, Replacement:(*result.Replacement)(0xc0185ff190), Pkg:(*packages.Package)(0xc0012af9e0), LineRange:(*result.Range)(0xc0185ff180), Pos:token.Position{Filename:"internal/gets/getsdiff/device_test.go", Offset:0, Line:7, Column:0}, HunkPos:0, ExpectNoLint:false, ExpectedNoLintLinter:""} with range {7 8} 
INFO Fix issue &result.Issue{FromLinter:"gofumpt", Text:"File is not `gofumpt`-ed", Severity:"", SourceLines:[]string{"\t\"context\"", "\t\"testing\"", "\t\"time\"", ""}, Replacement:(*result.Replacement)(0xc007c56c10), Pkg:(*packages.Package)(0xc0013d0120), LineRange:(*result.Range)(0xc007c56c00), Pos:token.Position{Filename:"internal/pkg/section/service_test.go", Offset:0, Line:4, Column:0}, HunkPos:0, ExpectNoLint:false, ExpectedNoLintLinter:""} with range {4 7} 
INFO Skip issue &result.Issue{FromLinter:"gci", Text:"File is not `gci`-ed with -local myproject", Severity:"", SourceLines:[]string{"\t\"time\""}, Replacement:(*result.Replacement)(0xc00c772710), Pkg:(*packages.Package)(0xc0013d0120), LineRange:(*result.Range)(nil), Pos:token.Position{Filename:"internal/pkg/section/service_test.go", Offset:0, Line:6, Column:0}, HunkPos:0, ExpectNoLint:false, ExpectedNoLintLinter:""}: intersects with end 7 
INFO Fix issue &result.Issue{FromLinter:"gofumpt", Text:"File is not `gofumpt`-ed", Severity:"", SourceLines:[]string{"\t\"myproject/pkg/db\""}, Replacement:(*result.Replacement)(0xc007c56c50), Pkg:(*packages.Package)(0xc0013d0120), LineRange:(*result.Range)(nil), Pos:token.Position{Filename:"internal/pkg/section/service_test.go", Offset:0, Line:13, Column:0}, HunkPos:0, ExpectNoLint:false, ExpectedNoLintLinter:""} with range {13 13} 
INFO Fix issue &result.Issue{FromLinter:"gci", Text:"File is not `gci`-ed with -local myproject", Severity:"", SourceLines:[]string{"", "\t\"github.com/DATA-DOG/go-sqlmock\"", "\t\"github.com/stretchr/testify/require\""}, Replacement:(*result.Replacement)(0xc00c772790), Pkg:(*packages.Package)(0xc0013d0120), LineRange:(*result.Range)(0xc00c772780), Pos:token.Position{Filename:"internal/pkg/section/service_test.go", Offset:0, Line:14, Column:0}, HunkPos:0, ExpectNoLint:false, ExpectedNoLintLinter:""} with range {14 16} 
INFO Fix issue &result.Issue{FromLinter:"gofumpt", Text:"File is not `gofumpt`-ed", Severity:"", SourceLines:[]string{"\t\"fmt\"", ""}, Replacement:(*result.Replacement)(0xc008079790), Pkg:(*packages.Package)(0xc000c4cb40), LineRange:(*result.Range)(0xc008079780), Pos:token.Position{Filename:"pkg/auth/auth.go", Offset:0, Line:4, Column:0}, HunkPos:0, ExpectNoLint:false, ExpectedNoLintLinter:""} with range {4 5} 
INFO Fix issue &result.Issue{FromLinter:"gci", Text:"File is not `gci`-ed with -local myproject", Severity:"", SourceLines:[]string{"\t\"myproject/pkg/db\"", "\t\"myproject/pkg/log\"", ""}, Replacement:(*result.Replacement)(0xc0032d3b10), Pkg:(*packages.Package)(0xc000c4cb40), LineRange:(*result.Range)(0xc0032d3b00), Pos:token.Position{Filename:"pkg/auth/auth.go", Offset:0, Line:6, Column:0}, HunkPos:0, ExpectNoLint:false, ExpectedNoLintLinter:""} with range {6 8} 
INFO Skip issue &result.Issue{FromLinter:"gofumpt", Text:"File is not `gofumpt`-ed", Severity:"", SourceLines:[]string{"\t\"myproject/pkg/log\""}, Replacement:(*result.Replacement)(0xc0080797d0), Pkg:(*packages.Package)(0xc000c4cb40), LineRange:(*result.Range)(nil), Pos:token.Position{Filename:"pkg/auth/auth.go", Offset:0, Line:7, Column:0}, HunkPos:0, ExpectNoLint:false, ExpectedNoLintLinter:""}: intersects with end 8 
INFO Fix issue &result.Issue{FromLinter:"gci", Text:"File is not `gci`-ed with -local myproject", Severity:"", SourceLines:[]string{"\tcasbinlog \"github.com/casbin/casbin/log\""}, Replacement:(*result.Replacement)(0xc0032d3b50), Pkg:(*packages.Package)(0xc000c4cb40), LineRange:(*result.Range)(nil), Pos:token.Position{Filename:"pkg/auth/auth.go", Offset:0, Line:11, Column:0}, HunkPos:0, ExpectNoLint:false, ExpectedNoLintLinter:""} with range {11 11} 
INFO Fix issue &result.Issue{FromLinter:"gofumpt", Text:"File is not `gofumpt`-ed", Severity:"", SourceLines:[]string{"}"}, Replacement:(*result.Replacement)(0xc008079850), Pkg:(*packages.Package)(0xc000c4cb40), LineRange:(*result.Range)(nil), Pos:token.Position{Filename:"pkg/auth/auth.go", Offset:0, Line:94, Column:0}, HunkPos:0, ExpectNoLint:false, ExpectedNoLintLinter:""} with range {94 94} 
INFO Fix issue &result.Issue{FromLinter:"gofumpt", Text:"File is not `gofumpt`-ed", Severity:"", SourceLines:[]string{"}"}, Replacement:(*result.Replacement)(0xc008079890), Pkg:(*packages.Package)(0xc000c4cb40), LineRange:(*result.Range)(nil), Pos:token.Position{Filename:"pkg/auth/auth.go", Offset:0, Line:97, Column:0}, HunkPos:0, ExpectNoLint:false, ExpectedNoLintLinter:""} with range {97 97} 
INFO Fix issue &result.Issue{FromLinter:"gofumpt", Text:"File is not `gofumpt`-ed", Severity:"", SourceLines:[]string{"}"}, Replacement:(*result.Replacement)(0xc0080798d0), Pkg:(*packages.Package)(0xc000c4cb40), LineRange:(*result.Range)(nil), Pos:token.Position{Filename:"pkg/auth/auth.go", Offset:0, Line:100, Column:0}, HunkPos:0, ExpectNoLint:false, ExpectedNoLintLinter:""} with range {100 100} 
INFO Fix issue &result.Issue{FromLinter:"gofumpt", Text:"File is not `gofumpt`-ed", Severity:"", SourceLines:[]string{"}"}, Replacement:(*result.Replacement)(0xc008079910), Pkg:(*packages.Package)(0xc000c4cb40), LineRange:(*result.Range)(nil), Pos:token.Position{Filename:"pkg/auth/auth.go", Offset:0, Line:103, Column:0}, HunkPos:0, ExpectNoLint:false, ExpectedNoLintLinter:""} with range {103 103} 
INFO Fix issue &result.Issue{FromLinter:"gofumpt", Text:"File is not `gofumpt`-ed", Severity:"", SourceLines:[]string{"}"}, Replacement:(*result.Replacement)(0xc008079950), Pkg:(*packages.Package)(0xc000c4cb40), LineRange:(*result.Range)(nil), Pos:token.Position{Filename:"pkg/auth/auth.go", Offset:0, Line:106, Column:0}, HunkPos:0, ExpectNoLint:false, ExpectedNoLintLinter:""} with range {106 106} 
INFO Fix issue &result.Issue{FromLinter:"gofumpt", Text:"File is not `gofumpt`-ed", Severity:"", SourceLines:[]string{"\t\"context\"", "\t\"database/sql\"", ""}, Replacement:(*result.Replacement)(0xc017446b90), Pkg:(*packages.Package)(0xc0012f58c0), LineRange:(*result.Range)(0xc017446b80), Pos:token.Position{Filename:"internal/pkg/button/store.go", Offset:0, Line:4, Column:0}, HunkPos:0, ExpectNoLint:false, ExpectedNoLintLinter:""} with range {4 6} 
INFO Skip issue &result.Issue{FromLinter:"gci", Text:"File is not `gci`-ed with -local myproject", Severity:"", SourceLines:[]string{"\t\"database/sql\""}, Replacement:(*result.Replacement)(0xc01658a0d0), Pkg:(*packages.Package)(0xc0012f58c0), LineRange:(*result.Range)(nil), Pos:token.Position{Filename:"internal/pkg/button/store.go", Offset:0, Line:5, Column:0}, HunkPos:0, ExpectNoLint:false, ExpectedNoLintLinter:""}: intersects with end 6 
INFO Fix issue &result.Issue{FromLinter:"gofumpt", Text:"File is not `gofumpt`-ed", Severity:"", SourceLines:[]string{"\t\"myproject/pkg/util\""}, Replacement:(*result.Replacement)(0xc017446bd0), Pkg:(*packages.Package)(0xc0012f58c0), LineRange:(*result.Range)(nil), Pos:token.Position{Filename:"internal/pkg/button/store.go", Offset:0, Line:11, Column:0}, HunkPos:0, ExpectNoLint:false, ExpectedNoLintLinter:""} with range {11 11} 
INFO Fix issue &result.Issue{FromLinter:"gci", Text:"File is not `gci`-ed with -local myproject", Severity:"", SourceLines:[]string{"", "\tsq \"github.com/Masterminds/squirrel\"", "\t\"github.com/pkg/errors\""}, Replacement:(*result.Replacement)(0xc01658a110), Pkg:(*packages.Package)(0xc0012f58c0), LineRange:(*result.Range)(0xc01658a100), Pos:token.Position{Filename:"internal/pkg/button/store.go", Offset:0, Line:12, Column:0}, HunkPos:0, ExpectNoLint:false, ExpectedNoLintLinter:""} with range {12 14} 
INFO Fix issue &result.Issue{FromLinter:"gofumpt", Text:"File is not `gofumpt`-ed", Severity:"", SourceLines:[]string{"\t\"context\"", "\t\"database/sql\"", ""}, Replacement:(*result.Replacement)(0xc0097e57d0), Pkg:(*packages.Package)(0xc001316fc0), LineRange:(*result.Range)(0xc0097e57c0), Pos:token.Position{Filename:"internal/pkg/callsource/store.go", Offset:0, Line:4, Column:0}, HunkPos:0, ExpectNoLint:false, ExpectedNoLintLinter:""} with range {4 6} 
INFO Skip issue &result.Issue{FromLinter:"gci", Text:"File is not `gci`-ed with -local myproject", Severity:"", SourceLines:[]string{""}, Replacement:(*result.Replacement)(0xc00a30c9d0), Pkg:(*packages.Package)(0xc001316fc0), LineRange:(*result.Range)(nil), Pos:token.Position{Filename:"internal/pkg/callsource/store.go", Offset:0, Line:6, Column:0}, HunkPos:0, ExpectNoLint:false, ExpectedNoLintLinter:""}: intersects with end 6 
INFO Fix issue &result.Issue{FromLinter:"gofumpt", Text:"File is not `gofumpt`-ed", Severity:"", SourceLines:[]string{"\t\"myproject/pkg/util\""}, Replacement:(*result.Replacement)(0xc0097e5810), Pkg:(*packages.Package)(0xc001316fc0), LineRange:(*result.Range)(nil), Pos:token.Position{Filename:"internal/pkg/callsource/store.go", Offset:0, Line:11, Column:0}, HunkPos:0, ExpectNoLint:false, ExpectedNoLintLinter:""} with range {11 11} 
INFO Fix issue &result.Issue{FromLinter:"gci", Text:"File is not `gci`-ed with -local myproject", Severity:"", SourceLines:[]string{"", "\tsq \"github.com/Masterminds/squirrel\"", "\t\"github.com/pkg/errors\""}, Replacement:(*result.Replacement)(0xc00a30ca10), Pkg:(*packages.Package)(0xc001316fc0), LineRange:(*result.Range)(0xc00a30ca00), Pos:token.Position{Filename:"internal/pkg/callsource/store.go", Offset:0, Line:12, Column:0}, HunkPos:0, ExpectNoLint:false, ExpectedNoLintLinter:""} with range {12 14} 
INFO Fix issue &result.Issue{FromLinter:"gofumpt", Text:"File is not `gofumpt`-ed", Severity:"", SourceLines:[]string{"\t\"context\"", ""}, Replacement:(*result.Replacement)(0xc01857c4d0), Pkg:(*packages.Package)(0xc0012c4fc0), LineRange:(*result.Range)(0xc01857c4c0), Pos:token.Position{Filename:"internal/graphql/gqlresolvers/displaygroup.go", Offset:0, Line:7, Column:0}, HunkPos:0, ExpectNoLint:false, ExpectedNoLintLinter:""} with range {7 8} 
INFO Fix issue &result.Issue{FromLinter:"gofumpt", Text:"File is not `gofumpt`-ed", Severity:"", SourceLines:[]string{"\t\"myproject/internal/pkg/entity\""}, Replacement:(*result.Replacement)(0xc01857c510), Pkg:(*packages.Package)(0xc0012c4fc0), LineRange:(*result.Range)(nil), Pos:token.Position{Filename:"internal/graphql/gqlresolvers/displaygroup.go", Offset:0, Line:11, Column:0}, HunkPos:0, ExpectNoLint:false, ExpectedNoLintLinter:""} with range {11 11} 
INFO Fix issue &result.Issue{FromLinter:"gofumpt", Text:"File is not `gofumpt`-ed", Severity:"", SourceLines:[]string{"type displayGroupResolver struct{ *Resolver }", "type displayGroupConnectionResolver struct{ *Resolver }"}, Replacement:(*result.Replacement)(0xc01857c8d0), Pkg:(*packages.Package)(0xc0012c4fc0), LineRange:(*result.Range)(0xc01857c8c0), Pos:token.Position{Filename:"internal/graphql/gqlresolvers/displaygroup.go", Offset:0, Line:34, Column:0}, HunkPos:0, ExpectNoLint:false, ExpectedNoLintLinter:""} with range {34 35} 
INFO Line 5 has multiple issues but at least one of them isn't inline: []result.Issue{result.Issue{FromLinter:"gci", Text:"File is not `gci`-ed with -local myproject", Severity:"", SourceLines:[]string{""}, Replacement:(*result.Replacement)(0xc0185fed50), Pkg:(*packages.Package)(0xc0012af9e0), LineRange:(*result.Range)(nil), Pos:token.Position{Filename:"internal/gets/getsdiff/button_test.go", Offset:0, Line:5, Column:0}, HunkPos:0, ExpectNoLint:false, ExpectedNoLintLinter:""}, result.Issue{FromLinter:"gofumpt", Text:"File is not `gofumpt`-ed", Severity:"", SourceLines:[]string{"", "\t\"myproject/internal/gets\""}, Replacement:(*result.Replacement)(0xc017ec73d0), Pkg:(*packages.Package)(0xc0012af9e0), LineRange:(*result.Range)(0xc017ec73c0), Pos:token.Position{Filename:"internal/gets/getsdiff/button_test.go", Offset:0, Line:5, Column:0}, HunkPos:0, ExpectNoLint:false, ExpectedNoLintLinter:""}} 
INFO Fix issue &result.Issue{FromLinter:"gofumpt", Text:"File is not `gofumpt`-ed", Severity:"", SourceLines:[]string{"import ("}, Replacement:(*result.Replacement)(0xc017ec7390), Pkg:(*packages.Package)(0xc0012af9e0), LineRange:(*result.Range)(nil), Pos:token.Position{Filename:"internal/gets/getsdiff/button_test.go", Offset:0, Line:3, Column:0}, HunkPos:0, ExpectNoLint:false, ExpectedNoLintLinter:""} with range {3 3} 
INFO Fix issue &result.Issue{FromLinter:"gci", Text:"File is not `gci`-ed with -local myproject", Severity:"", SourceLines:[]string{""}, Replacement:(*result.Replacement)(0xc0185fed50), Pkg:(*packages.Package)(0xc0012af9e0), LineRange:(*result.Range)(nil), Pos:token.Position{Filename:"internal/gets/getsdiff/button_test.go", Offset:0, Line:5, Column:0}, HunkPos:0, ExpectNoLint:false, ExpectedNoLintLinter:""} with range {5 5} 
INFO Fix issue &result.Issue{FromLinter:"gci", Text:"File is not `gci`-ed with -local myproject", Severity:"", SourceLines:[]string{"", "\t\"github.com/stretchr/testify/require\""}, Replacement:(*result.Replacement)(0xc0185fed90), Pkg:(*packages.Package)(0xc0012af9e0), LineRange:(*result.Range)(0xc0185fed80), Pos:token.Position{Filename:"internal/gets/getsdiff/button_test.go", Offset:0, Line:7, Column:0}, HunkPos:0, ExpectNoLint:false, ExpectedNoLintLinter:""} with range {7 8} 
INFO Line 6 has multiple issues but at least one of them isn't inline: []result.Issue{result.Issue{FromLinter:"gci", Text:"File is not `gci`-ed with -local myproject", Severity:"", SourceLines:[]string{""}, Replacement:(*result.Replacement)(0xc015058110), Pkg:(*packages.Package)(0xc00126d680), LineRange:(*result.Range)(nil), Pos:token.Position{Filename:"cmd/root.go", Offset:0, Line:6, Column:0}, HunkPos:0, ExpectNoLint:false, ExpectedNoLintLinter:""}, result.Issue{FromLinter:"gofumpt", Text:"File is not `gofumpt`-ed", Severity:"", SourceLines:[]string{"", "\t\"myproject/internal/app\"", "\t\"myproject/pkg/log\""}, Replacement:(*result.Replacement)(0xc00a5d0cd0), Pkg:(*packages.Package)(0xc00126d680), LineRange:(*result.Range)(0xc00a5d0cc0), Pos:token.Position{Filename:"cmd/root.go", Offset:0, Line:6, Column:0}, HunkPos:0, ExpectNoLint:false, ExpectedNoLintLinter:""}} 
INFO Fix issue &result.Issue{FromLinter:"gofumpt", Text:"File is not `gofumpt`-ed", Severity:"", SourceLines:[]string{"import ("}, Replacement:(*result.Replacement)(0xc00a5d0c90), Pkg:(*packages.Package)(0xc00126d680), LineRange:(*result.Range)(nil), Pos:token.Position{Filename:"cmd/root.go", Offset:0, Line:3, Column:0}, HunkPos:0, ExpectNoLint:false, ExpectedNoLintLinter:""} with range {3 3} 
INFO Fix issue &result.Issue{FromLinter:"gci", Text:"File is not `gci`-ed with -local myproject", Severity:"", SourceLines:[]string{""}, Replacement:(*result.Replacement)(0xc015058110), Pkg:(*packages.Package)(0xc00126d680), LineRange:(*result.Range)(nil), Pos:token.Position{Filename:"cmd/root.go", Offset:0, Line:6, Column:0}, HunkPos:0, ExpectNoLint:false, ExpectedNoLintLinter:""} with range {6 6} 
INFO Fix issue &result.Issue{FromLinter:"gci", Text:"File is not `gci`-ed with -local myproject", Severity:"", SourceLines:[]string{"", "\t\"github.com/spf13/cobra\"", "", "\t// Enable file support for golang-migrate.", "\t_ \"github.com/golang-migrate/migrate/v4/source/file\""}, Replacement:(*result.Replacement)(0xc015058150), Pkg:(*packages.Package)(0xc00126d680), LineRange:(*result.Range)(0xc015058140), Pos:token.Position{Filename:"cmd/root.go", Offset:0, Line:9, Column:0}, HunkPos:0, ExpectNoLint:false, ExpectedNoLintLinter:""} with range {9 13} 
INFO Fix issue &result.Issue{FromLinter:"gofumpt", Text:"File is not `gofumpt`-ed", Severity:"", SourceLines:[]string{"\t\"context\"", "\t\"database/sql\"", "\t\"fmt\"", "\t\"strings\"", ""}, Replacement:(*result.Replacement)(0xc00f5c6e10), Pkg:(*packages.Package)(0xc0013605a0), LineRange:(*result.Range)(0xc00f5c6e00), Pos:token.Position{Filename:"internal/pkg/device/store.go", Offset:0, Line:4, Column:0}, HunkPos:0, ExpectNoLint:false, ExpectedNoLintLinter:""} with range {4 8} 
INFO Skip issue &result.Issue{FromLinter:"gci", Text:"File is not `gci`-ed with -local myproject", Severity:"", SourceLines:[]string{""}, Replacement:(*result.Replacement)(0xc00f1b22d0), Pkg:(*packages.Package)(0xc0013605a0), LineRange:(*result.Range)(nil), Pos:token.Position{Filename:"internal/pkg/device/store.go", Offset:0, Line:8, Column:0}, HunkPos:0, ExpectNoLint:false, ExpectedNoLintLinter:""}: intersects with end 8 
INFO Fix issue &result.Issue{FromLinter:"gofumpt", Text:"File is not `gofumpt`-ed", Severity:"", SourceLines:[]string{"\t\"myproject/pkg/util\""}, Replacement:(*result.Replacement)(0xc00f5c6e50), Pkg:(*packages.Package)(0xc0013605a0), LineRange:(*result.Range)(nil), Pos:token.Position{Filename:"internal/pkg/device/store.go", Offset:0, Line:13, Column:0}, HunkPos:0, ExpectNoLint:false, ExpectedNoLintLinter:""} with range {13 13} 
INFO Fix issue &result.Issue{FromLinter:"gci", Text:"File is not `gci`-ed with -local myproject", Severity:"", SourceLines:[]string{"", "\tsq \"github.com/Masterminds/squirrel\"", "\t\"github.com/pkg/errors\""}, Replacement:(*result.Replacement)(0xc00f1b2310), Pkg:(*packages.Package)(0xc0013605a0), LineRange:(*result.Range)(0xc00f1b2300), Pos:token.Position{Filename:"internal/pkg/device/store.go", Offset:0, Line:14, Column:0}, HunkPos:0, ExpectNoLint:false, ExpectedNoLintLinter:""} with range {14 16} 
INFO Line 9 has multiple issues but at least one of them isn't inline: []result.Issue{result.Issue{FromLinter:"gci", Text:"File is not `gci`-ed with -local myproject", Severity:"", SourceLines:[]string{"\t\"myproject/internal/graphql/gqlmodels\""}, Replacement:(*result.Replacement)(0xc00f1b2490), Pkg:(*packages.Package)(0xc0013605a0), LineRange:(*result.Range)(nil), Pos:token.Position{Filename:"internal/pkg/device/validation.go", Offset:0, Line:9, Column:0}, HunkPos:0, ExpectNoLint:false, ExpectedNoLintLinter:""}, result.Issue{FromLinter:"gofumpt", Text:"File is not `gofumpt`-ed", Severity:"", SourceLines:[]string{"\t\"myproject/internal/graphql/gqlmodels\""}, Replacement:(*result.Replacement)(0xc00f9bc890), Pkg:(*packages.Package)(0xc0013605a0), LineRange:(*result.Range)(nil), Pos:token.Position{Filename:"internal/pkg/device/validation.go", Offset:0, Line:9, Column:0}, HunkPos:0, ExpectNoLint:false, ExpectedNoLintLinter:""}} 
INFO Fix issue &result.Issue{FromLinter:"gofumpt", Text:"File is not `gofumpt`-ed", Severity:"", SourceLines:[]string{"\t\"strconv\"", "", "\t\"myproject/pkg/db\"", ""}, Replacement:(*result.Replacement)(0xc00f9bc850), Pkg:(*packages.Package)(0xc0013605a0), LineRange:(*result.Range)(0xc00f9bc840), Pos:token.Position{Filename:"internal/pkg/device/validation.go", Offset:0, Line:4, Column:0}, HunkPos:0, ExpectNoLint:false, ExpectedNoLintLinter:""} with range {4 7} 
INFO Skip issue &result.Issue{FromLinter:"gci", Text:"File is not `gci`-ed with -local myproject", Severity:"", SourceLines:[]string{"\t\"myproject/pkg/db\"", ""}, Replacement:(*result.Replacement)(0xc00f1b2450), Pkg:(*packages.Package)(0xc0013605a0), LineRange:(*result.Range)(0xc00f1b2440), Pos:token.Position{Filename:"internal/pkg/device/validation.go", Offset:0, Line:6, Column:0}, HunkPos:0, ExpectNoLint:false, ExpectedNoLintLinter:""}: intersects with end 7 
INFO Fix issue &result.Issue{FromLinter:"gci", Text:"File is not `gci`-ed with -local myproject", Severity:"", SourceLines:[]string{"\t\"myproject/internal/graphql/gqlmodels\""}, Replacement:(*result.Replacement)(0xc00f1b2490), Pkg:(*packages.Package)(0xc0013605a0), LineRange:(*result.Range)(nil), Pos:token.Position{Filename:"internal/pkg/device/validation.go", Offset:0, Line:9, Column:0}, HunkPos:0, ExpectNoLint:false, ExpectedNoLintLinter:""} with range {9 9} 
INFO Fix issue &result.Issue{FromLinter:"gofumpt", Text:"File is not `gofumpt`-ed", Severity:"", SourceLines:[]string{"\t\"myproject/pkg/validation\""}, Replacement:(*result.Replacement)(0xc00f9bc8d0), Pkg:(*packages.Package)(0xc0013605a0), LineRange:(*result.Range)(nil), Pos:token.Position{Filename:"internal/pkg/device/validation.go", Offset:0, Line:10, Column:0}, HunkPos:0, ExpectNoLint:false, ExpectedNoLintLinter:""} with range {10 10} 
INFO Line 5 has multiple issues but at least one of them isn't inline: []result.Issue{result.Issue{FromLinter:"gci", Text:"File is not `gci`-ed with -local myproject", Severity:"", SourceLines:[]string{""}, Replacement:(*result.Replacement)(0xc00f9bde90), Pkg:(*packages.Package)(0xc001344b40), LineRange:(*result.Range)(nil), Pos:token.Position{Filename:"internal/pkg/checkpointmap/validation_test.go", Offset:0, Line:5, Column:0}, HunkPos:0, ExpectNoLint:false, ExpectedNoLintLinter:""}, result.Issue{FromLinter:"gofumpt", Text:"File is not `gofumpt`-ed", Severity:"", SourceLines:[]string{"", "\t\"myproject/internal/graphql/gqlmodels\""}, Replacement:(*result.Replacement)(0xc00089ac90), Pkg:(*packages.Package)(0xc001344b40), LineRange:(*result.Range)(0xc00089ac80), Pos:token.Position{Filename:"internal/pkg/checkpointmap/validation_test.go", Offset:0, Line:5, Column:0}, HunkPos:0, ExpectNoLint:false, ExpectedNoLintLinter:""}} 
INFO Fix issue &result.Issue{FromLinter:"gofumpt", Text:"File is not `gofumpt`-ed", Severity:"", SourceLines:[]string{"import ("}, Replacement:(*result.Replacement)(0xc00089abd0), Pkg:(*packages.Package)(0xc001344b40), LineRange:(*result.Range)(nil), Pos:token.Position{Filename:"internal/pkg/checkpointmap/validation_test.go", Offset:0, Line:3, Column:0}, HunkPos:0, ExpectNoLint:false, ExpectedNoLintLinter:""} with range {3 3} 
INFO Fix issue &result.Issue{FromLinter:"gci", Text:"File is not `gci`-ed with -local myproject", Severity:"", SourceLines:[]string{""}, Replacement:(*result.Replacement)(0xc00f9bde90), Pkg:(*packages.Package)(0xc001344b40), LineRange:(*result.Range)(nil), Pos:token.Position{Filename:"internal/pkg/checkpointmap/validation_test.go", Offset:0, Line:5, Column:0}, HunkPos:0, ExpectNoLint:false, ExpectedNoLintLinter:""} with range {5 5} 
INFO Fix issue &result.Issue{FromLinter:"gci", Text:"File is not `gci`-ed with -local myproject", Severity:"", SourceLines:[]string{"", "\t\"github.com/stretchr/testify/require\""}, Replacement:(*result.Replacement)(0xc00f9bdf10), Pkg:(*packages.Package)(0xc001344b40), LineRange:(*result.Range)(0xc00f9bdf00), Pos:token.Position{Filename:"internal/pkg/checkpointmap/validation_test.go", Offset:0, Line:7, Column:0}, HunkPos:0, ExpectNoLint:false, ExpectedNoLintLinter:""} with range {7 8} 
INFO Fix issue &result.Issue{FromLinter:"gofumpt", Text:"File is not `gofumpt`-ed", Severity:"", SourceLines:[]string{"\t\"context\"", "\t\"testing\"", "\t\"time\"", ""}, Replacement:(*result.Replacement)(0xc00b29b210), Pkg:(*packages.Package)(0xc001316fc0), LineRange:(*result.Range)(0xc00b29b200), Pos:token.Position{Filename:"internal/pkg/callsource/service_test.go", Offset:0, Line:4, Column:0}, HunkPos:0, ExpectNoLint:false, ExpectedNoLintLinter:""} with range {4 7} 
INFO Skip issue &result.Issue{FromLinter:"gci", Text:"File is not `gci`-ed with -local myproject", Severity:"", SourceLines:[]string{"\t\"time\""}, Replacement:(*result.Replacement)(0xc00a30cdd0), Pkg:(*packages.Package)(0xc001316fc0), LineRange:(*result.Range)(nil), Pos:token.Position{Filename:"internal/pkg/callsource/service_test.go", Offset:0, Line:6, Column:0}, HunkPos:0, ExpectNoLint:false, ExpectedNoLintLinter:""}: intersects with end 7 
INFO Fix issue &result.Issue{FromLinter:"gofumpt", Text:"File is not `gofumpt`-ed", Severity:"", SourceLines:[]string{"\t\"myproject/pkg/db\""}, Replacement:(*result.Replacement)(0xc00b29b350), Pkg:(*packages.Package)(0xc001316fc0), LineRange:(*result.Range)(nil), Pos:token.Position{Filename:"internal/pkg/callsource/service_test.go", Offset:0, Line:15, Column:0}, HunkPos:0, ExpectNoLint:false, ExpectedNoLintLinter:""} with range {15 15} 
INFO Fix issue &result.Issue{FromLinter:"gci", Text:"File is not `gci`-ed with -local myproject", Severity:"", SourceLines:[]string{"", "\t\"github.com/DATA-DOG/go-sqlmock\"", "\t\"github.com/stretchr/testify/require\""}, Replacement:(*result.Replacement)(0xc00a30ce50), Pkg:(*packages.Package)(0xc001316fc0), LineRange:(*result.Range)(0xc00a30ce40), Pos:token.Position{Filename:"internal/pkg/callsource/service_test.go", Offset:0, Line:16, Column:0}, HunkPos:0, ExpectNoLint:false, ExpectedNoLintLinter:""} with range {16 18} 
INFO Line 6 has multiple issues but at least one of them isn't inline: []result.Issue{result.Issue{FromLinter:"gci", Text:"File is not `gci`-ed with -local myproject", Severity:"", SourceLines:[]string{""}, Replacement:(*result.Replacement)(0xc019ff5550), Pkg:(*packages.Package)(0xc0012bad80), LineRange:(*result.Range)(nil), Pos:token.Position{Filename:"internal/gets/getshttp/indicator.go", Offset:0, Line:6, Column:0}, HunkPos:0, ExpectNoLint:false, ExpectedNoLintLinter:""}, result.Issue{FromLinter:"gofumpt", Text:"File is not `gofumpt`-ed", Severity:"", SourceLines:[]string{"", "\t\"myproject/internal/gets\"", "\t\"myproject/internal/pkg/entity\""}, Replacement:(*result.Replacement)(0xc015093f90), Pkg:(*packages.Package)(0xc0012bad80), LineRange:(*result.Range)(0xc015093f80), Pos:token.Position{Filename:"internal/gets/getshttp/indicator.go", Offset:0, Line:6, Column:0}, HunkPos:0, ExpectNoLint:false, ExpectedNoLintLinter:""}} 
INFO Fix issue &result.Issue{FromLinter:"gofumpt", Text:"File is not `gofumpt`-ed", Severity:"", SourceLines:[]string{"import ("}, Replacement:(*result.Replacement)(0xc015093f10), Pkg:(*packages.Package)(0xc0012bad80), LineRange:(*result.Range)(nil), Pos:token.Position{Filename:"internal/gets/getshttp/indicator.go", Offset:0, Line:3, Column:0}, HunkPos:0, ExpectNoLint:false, ExpectedNoLintLinter:""} with range {3 3} 
INFO Fix issue &result.Issue{FromLinter:"gci", Text:"File is not `gci`-ed with -local myproject", Severity:"", SourceLines:[]string{""}, Replacement:(*result.Replacement)(0xc019ff5550), Pkg:(*packages.Package)(0xc0012bad80), LineRange:(*result.Range)(nil), Pos:token.Position{Filename:"internal/gets/getshttp/indicator.go", Offset:0, Line:6, Column:0}, HunkPos:0, ExpectNoLint:false, ExpectedNoLintLinter:""} with range {6 6} 
INFO Fix issue &result.Issue{FromLinter:"gci", Text:"File is not `gci`-ed with -local myproject", Severity:"", SourceLines:[]string{"", "\t\"github.com/pkg/errors\""}, Replacement:(*result.Replacement)(0xc019ff5590), Pkg:(*packages.Package)(0xc0012bad80), LineRange:(*result.Range)(0xc019ff5580), Pos:token.Position{Filename:"internal/gets/getshttp/indicator.go", Offset:0, Line:9, Column:0}, HunkPos:0, ExpectNoLint:false, ExpectedNoLintLinter:""} with range {9 10} 
INFO Fix issue &result.Issue{FromLinter:"gofumpt", Text:"File is not `gofumpt`-ed", Severity:"", SourceLines:[]string{"}"}, Replacement:(*result.Replacement)(0xc015254010), Pkg:(*packages.Package)(0xc0012bad80), LineRange:(*result.Range)(nil), Pos:token.Position{Filename:"internal/gets/getshttp/indicator.go", Offset:0, Line:79, Column:0}, HunkPos:0, ExpectNoLint:false, ExpectedNoLintLinter:""} with range {79 79} 
INFO Fix issue &result.Issue{FromLinter:"gofumpt", Text:"File is not `gofumpt`-ed", Severity:"", SourceLines:[]string{"import ("}, Replacement:(*result.Replacement)(0xc003f90810), Pkg:(*packages.Package)(0xc0012bad80), LineRange:(*result.Range)(nil), Pos:token.Position{Filename:"internal/gets/getshttp/calltype.go", Offset:0, Line:3, Column:0}, HunkPos:0, ExpectNoLint:false, ExpectedNoLintLinter:""} with range {3 3} 
INFO Fix issue &result.Issue{FromLinter:"gofumpt", Text:"File is not `gofumpt`-ed", Severity:"", SourceLines:[]string{"", "\t\"myproject/internal/gets\"", "\t\"myproject/internal/pkg/entity\""}, Replacement:(*result.Replacement)(0xc003f90850), Pkg:(*packages.Package)(0xc0012bad80), LineRange:(*result.Range)(0xc003f90840), Pos:token.Position{Filename:"internal/gets/getshttp/calltype.go", Offset:0, Line:6, Column:0}, HunkPos:0, ExpectNoLint:false, ExpectedNoLintLinter:""} with range {6 8} 
INFO Fix issue &result.Issue{FromLinter:"gofumpt", Text:"File is not `gofumpt`-ed", Severity:"", SourceLines:[]string{"\t\"context\"", ""}, Replacement:(*result.Replacement)(0xc01915c550), Pkg:(*packages.Package)(0xc0012c4fc0), LineRange:(*result.Range)(0xc01915c540), Pos:token.Position{Filename:"internal/graphql/gqlresolvers/indicator.go", Offset:0, Line:7, Column:0}, HunkPos:0, ExpectNoLint:false, ExpectedNoLintLinter:""} with range {7 8} 
INFO Fix issue &result.Issue{FromLinter:"gofumpt", Text:"File is not `gofumpt`-ed", Severity:"", SourceLines:[]string{"\t\"myproject/internal/pkg/entity\""}, Replacement:(*result.Replacement)(0xc01915c590), Pkg:(*packages.Package)(0xc0012c4fc0), LineRange:(*result.Range)(nil), Pos:token.Position{Filename:"internal/graphql/gqlresolvers/indicator.go", Offset:0, Line:11, Column:0}, HunkPos:0, ExpectNoLint:false, ExpectedNoLintLinter:""} with range {11 11} 
INFO Fix issue &result.Issue{FromLinter:"gofumpt", Text:"File is not `gofumpt`-ed", Severity:"", SourceLines:[]string{"\t\"context\"", "\t\"encoding/json\"", "\t\"errors\"", "\t\"fmt\"", "\t\"io\"", "\t\"net/http\"", ""}, Replacement:(*result.Replacement)(0xc007e9fcd0), Pkg:(*packages.Package)(0xc000d1b680), LineRange:(*result.Range)(0xc007e9fcc0), Pos:token.Position{Filename:"internal/pkg/auth/auth.go", Offset:0, Line:4, Column:0}, HunkPos:0, ExpectNoLint:false, ExpectedNoLintLinter:""} with range {4 10} 
INFO Skip issue &result.Issue{FromLinter:"gci", Text:"File is not `gci`-ed with -local myproject", Severity:"", SourceLines:[]string{""}, Replacement:(*result.Replacement)(0xc01449ee50), Pkg:(*packages.Package)(0xc000d1b680), LineRange:(*result.Range)(nil), Pos:token.Position{Filename:"internal/pkg/auth/auth.go", Offset:0, Line:10, Column:0}, HunkPos:0, ExpectNoLint:false, ExpectedNoLintLinter:""}: intersects with end 10 
INFO Fix issue &result.Issue{FromLinter:"gofumpt", Text:"File is not `gofumpt`-ed", Severity:"", SourceLines:[]string{"\t\"myproject/pkg/validation\""}, Replacement:(*result.Replacement)(0xc007e9fe10), Pkg:(*packages.Package)(0xc000d1b680), LineRange:(*result.Range)(nil), Pos:token.Position{Filename:"internal/pkg/auth/auth.go", Offset:0, Line:19, Column:0}, HunkPos:0, ExpectNoLint:false, ExpectedNoLintLinter:""} with range {19 19} 
INFO Fix issue &result.Issue{FromLinter:"gci", Text:"File is not `gci`-ed with -local myproject", Severity:"", SourceLines:[]string{"", "\t\"gopkg.in/guregu/null.v3\""}, Replacement:(*result.Replacement)(0xc01449eed0), Pkg:(*packages.Package)(0xc000d1b680), LineRange:(*result.Range)(0xc01449eec0), Pos:token.Position{Filename:"internal/pkg/auth/auth.go", Offset:0, Line:20, Column:0}, HunkPos:0, ExpectNoLint:false, ExpectedNoLintLinter:""} with range {20 21} 
INFO Line 5 has multiple issues but at least one of them isn't inline: []result.Issue{result.Issue{FromLinter:"gci", Text:"File is not `gci`-ed with -local myproject", Severity:"", SourceLines:[]string{""}, Replacement:(*result.Replacement)(0xc0185ff550), Pkg:(*packages.Package)(0xc0012af9e0), LineRange:(*result.Range)(nil), Pos:token.Position{Filename:"internal/gets/getsdiff/meta_test.go", Offset:0, Line:5, Column:0}, HunkPos:0, ExpectNoLint:false, ExpectedNoLintLinter:""}, result.Issue{FromLinter:"gofumpt", Text:"File is not `gofumpt`-ed", Severity:"", SourceLines:[]string{"", "\t\"myproject/internal/gets\""}, Replacement:(*result.Replacement)(0xc019a6bc50), Pkg:(*packages.Package)(0xc0012af9e0), LineRange:(*result.Range)(0xc019a6bc40), Pos:token.Position{Filename:"internal/gets/getsdiff/meta_test.go", Offset:0, Line:5, Column:0}, HunkPos:0, ExpectNoLint:false, ExpectedNoLintLinter:""}} 
INFO Fix issue &result.Issue{FromLinter:"gofumpt", Text:"File is not `gofumpt`-ed", Severity:"", SourceLines:[]string{"import ("}, Replacement:(*result.Replacement)(0xc019a6bc10), Pkg:(*packages.Package)(0xc0012af9e0), LineRange:(*result.Range)(nil), Pos:token.Position{Filename:"internal/gets/getsdiff/meta_test.go", Offset:0, Line:3, Column:0}, HunkPos:0, ExpectNoLint:false, ExpectedNoLintLinter:""} with range {3 3} 
INFO Fix issue &result.Issue{FromLinter:"gci", Text:"File is not `gci`-ed with -local myproject", Severity:"", SourceLines:[]string{""}, Replacement:(*result.Replacement)(0xc0185ff550), Pkg:(*packages.Package)(0xc0012af9e0), LineRange:(*result.Range)(nil), Pos:token.Position{Filename:"internal/gets/getsdiff/meta_test.go", Offset:0, Line:5, Column:0}, HunkPos:0, ExpectNoLint:false, ExpectedNoLintLinter:""} with range {5 5} 
INFO Fix issue &result.Issue{FromLinter:"gci", Text:"File is not `gci`-ed with -local myproject", Severity:"", SourceLines:[]string{"", "\t\"github.com/stretchr/testify/require\""}, Replacement:(*result.Replacement)(0xc0185ff590), Pkg:(*packages.Package)(0xc0012af9e0), LineRange:(*result.Range)(0xc0185ff580), Pos:token.Position{Filename:"internal/gets/getsdiff/meta_test.go", Offset:0, Line:7, Column:0}, HunkPos:0, ExpectNoLint:false, ExpectedNoLintLinter:""} with range {7 8} 
INFO Fix issue &result.Issue{FromLinter:"gofumpt", Text:"File is not `gofumpt`-ed", Severity:"", SourceLines:[]string{"\t\"context\"", "\t\"database/sql\"", "\t\"strings\"", ""}, Replacement:(*result.Replacement)(0xc011c52e90), Pkg:(*packages.Package)(0xc001388240), LineRange:(*result.Range)(0xc011c52e80), Pos:token.Position{Filename:"internal/pkg/hub/store.go", Offset:0, Line:4, Column:0}, HunkPos:0, ExpectNoLint:false, ExpectedNoLintLinter:""} with range {4 7} 
INFO Skip issue &result.Issue{FromLinter:"gci", Text:"File is not `gci`-ed with -local myproject", Severity:"", SourceLines:[]string{"\t\"strings\""}, Replacement:(*result.Replacement)(0xc010ab2f50), Pkg:(*packages.Package)(0xc001388240), LineRange:(*result.Range)(nil), Pos:token.Position{Filename:"internal/pkg/hub/store.go", Offset:0, Line:6, Column:0}, HunkPos:0, ExpectNoLint:false, ExpectedNoLintLinter:""}: intersects with end 7 
INFO Fix issue &result.Issue{FromLinter:"gofumpt", Text:"File is not `gofumpt`-ed", Severity:"", SourceLines:[]string{"\t\"myproject/pkg/util\""}, Replacement:(*result.Replacement)(0xc011c52ed0), Pkg:(*packages.Package)(0xc001388240), LineRange:(*result.Range)(nil), Pos:token.Position{Filename:"internal/pkg/hub/store.go", Offset:0, Line:12, Column:0}, HunkPos:0, ExpectNoLint:false, ExpectedNoLintLinter:""} with range {12 12} 
INFO Fix issue &result.Issue{FromLinter:"gci", Text:"File is not `gci`-ed with -local myproject", Severity:"", SourceLines:[]string{"", "\tsq \"github.com/Masterminds/squirrel\"", "\t\"github.com/pkg/errors\""}, Replacement:(*result.Replacement)(0xc010ab2f90), Pkg:(*packages.Package)(0xc001388240), LineRange:(*result.Range)(0xc010ab2f80), Pos:token.Position{Filename:"internal/pkg/hub/store.go", Offset:0, Line:13, Column:0}, HunkPos:0, ExpectNoLint:false, ExpectedNoLintLinter:""} with range {13 15} 
INFO Fix issue &result.Issue{FromLinter:"gofumpt", Text:"File is not `gofumpt`-ed", Severity:"", SourceLines:[]string{"\t\"testing\"", ""}, Replacement:(*result.Replacement)(0xc00b4df590), Pkg:(*packages.Package)(0xc001316fc0), LineRange:(*result.Range)(0xc00b4df580), Pos:token.Position{Filename:"internal/pkg/callsource/validation_test.go", Offset:0, Line:4, Column:0}, HunkPos:0, ExpectNoLint:false, ExpectedNoLintLinter:""} with range {4 5} 
INFO Skip issue &result.Issue{FromLinter:"gci", Text:"File is not `gci`-ed with -local myproject", Severity:"", SourceLines:[]string{""}, Replacement:(*result.Replacement)(0xc00a30d050), Pkg:(*packages.Package)(0xc001316fc0), LineRange:(*result.Range)(nil), Pos:token.Position{Filename:"internal/pkg/callsource/validation_test.go", Offset:0, Line:5, Column:0}, HunkPos:0, ExpectNoLint:false, ExpectedNoLintLinter:""}: intersects with end 5 
INFO Fix issue &result.Issue{FromLinter:"gofumpt", Text:"File is not `gofumpt`-ed", Severity:"", SourceLines:[]string{"\t\"myproject/pkg/util\""}, Replacement:(*result.Replacement)(0xc00b4df5d0), Pkg:(*packages.Package)(0xc001316fc0), LineRange:(*result.Range)(nil), Pos:token.Position{Filename:"internal/pkg/callsource/validation_test.go", Offset:0, Line:8, Column:0}, HunkPos:0, ExpectNoLint:false, ExpectedNoLintLinter:""} with range {8 8} 
INFO Fix issue &result.Issue{FromLinter:"gci", Text:"File is not `gci`-ed with -local myproject", Severity:"", SourceLines:[]string{"", "\t\"github.com/DATA-DOG/go-sqlmock\"", "\t\"github.com/stretchr/testify/require\""}, Replacement:(*result.Replacement)(0xc00a30d090), Pkg:(*packages.Package)(0xc001316fc0), LineRange:(*result.Range)(0xc00a30d080), Pos:token.Position{Filename:"internal/pkg/callsource/validation_test.go", Offset:0, Line:9, Column:0}, HunkPos:0, ExpectNoLint:false, ExpectedNoLintLinter:""} with range {9 11} 
INFO Fix issue &result.Issue{FromLinter:"gofumpt", Text:"File is not `gofumpt`-ed", Severity:"", SourceLines:[]string{"const CallTypeFlagNone string = \"None\"", "const CallTypeFlagPresence string = \"Presence\"", "const CallTypeFlagDefect string = \"Defect\""}, Replacement:(*result.Replacement)(0xc007275f10), Pkg:(*packages.Package)(0xc0007f06c0), LineRange:(*result.Range)(0xc007275f00), Pos:token.Position{Filename:"internal/pkg/entity/calltype.go", Offset:0, Line:5, Column:0}, HunkPos:0, ExpectNoLint:false, ExpectedNoLintLinter:""} with range {5 7} 
INFO Fix issue &result.Issue{FromLinter:"gofumpt", Text:"File is not `gofumpt`-ed", Severity:"", SourceLines:[]string{"const UrgencyNormal string = \"Normal\"", "const UrgencyUrgent string = \"Urgent\"", "const UrgencyEmergency string = \"Emergency\""}, Replacement:(*result.Replacement)(0xc007275f50), Pkg:(*packages.Package)(0xc0007f06c0), LineRange:(*result.Range)(0xc007275f40), Pos:token.Position{Filename:"internal/pkg/entity/calltype.go", Offset:0, Line:9, Column:0}, HunkPos:0, ExpectNoLint:false, ExpectedNoLintLinter:""} with range {9 11} 
INFO Fix issue &result.Issue{FromLinter:"gofumpt", Text:"File is not `gofumpt`-ed", Severity:"", SourceLines:[]string{"import ("}, Replacement:(*result.Replacement)(0xc006657150), Pkg:(*packages.Package)(0xc0012c4fc0), LineRange:(*result.Range)(nil), Pos:token.Position{Filename:"internal/graphql/gqlresolvers/hub.go", Offset:0, Line:6, Column:0}, HunkPos:0, ExpectNoLint:false, ExpectedNoLintLinter:""} with range {6 6} 
INFO Fix issue &result.Issue{FromLinter:"gofumpt", Text:"File is not `gofumpt`-ed", Severity:"", SourceLines:[]string{"", "\t\"myproject/internal/graphql/gqlserver\"", "\t\"myproject/internal/pkg/entity\""}, Replacement:(*result.Replacement)(0xc006657190), Pkg:(*packages.Package)(0xc0012c4fc0), LineRange:(*result.Range)(0xc006657180), Pos:token.Position{Filename:"internal/graphql/gqlresolvers/hub.go", Offset:0, Line:9, Column:0}, HunkPos:0, ExpectNoLint:false, ExpectedNoLintLinter:""} with range {9 11} 
INFO Line 6 has multiple issues but at least one of them isn't inline: []result.Issue{result.Issue{FromLinter:"gci", Text:"File is not `gci`-ed with -local myproject", Severity:"", SourceLines:[]string{""}, Replacement:(*result.Replacement)(0xc00974b110), Pkg:(*packages.Package)(0xc00130bb00), LineRange:(*result.Range)(nil), Pos:token.Position{Filename:"internal/pkg/callindex/service_test.go", Offset:0, Line:6, Column:0}, HunkPos:0, ExpectNoLint:false, ExpectedNoLintLinter:""}, result.Issue{FromLinter:"gofumpt", Text:"File is not `gofumpt`-ed", Severity:"", SourceLines:[]string{"", "\t\"myproject/internal/pkg/entity\"", "\t\"myproject/internal/pkg/test\""}, Replacement:(*result.Replacement)(0xc00974ab90), Pkg:(*packages.Package)(0xc00130bb00), LineRange:(*result.Range)(0xc00974ab80), Pos:token.Position{Filename:"internal/pkg/callindex/service_test.go", Offset:0, Line:6, Column:0}, HunkPos:0, ExpectNoLint:false, ExpectedNoLintLinter:""}} 
INFO Fix issue &result.Issue{FromLinter:"gofumpt", Text:"File is not `gofumpt`-ed", Severity:"", SourceLines:[]string{"import ("}, Replacement:(*result.Replacement)(0xc00974ab50), Pkg:(*packages.Package)(0xc00130bb00), LineRange:(*result.Range)(nil), Pos:token.Position{Filename:"internal/pkg/callindex/service_test.go", Offset:0, Line:3, Column:0}, HunkPos:0, ExpectNoLint:false, ExpectedNoLintLinter:""} with range {3 3} 
INFO Fix issue &result.Issue{FromLinter:"gci", Text:"File is not `gci`-ed with -local myproject", Severity:"", SourceLines:[]string{""}, Replacement:(*result.Replacement)(0xc00974b110), Pkg:(*packages.Package)(0xc00130bb00), LineRange:(*result.Range)(nil), Pos:token.Position{Filename:"internal/pkg/callindex/service_test.go", Offset:0, Line:6, Column:0}, HunkPos:0, ExpectNoLint:false, ExpectedNoLintLinter:""} with range {6 6} 
INFO Fix issue &result.Issue{FromLinter:"gci", Text:"File is not `gci`-ed with -local myproject", Severity:"", SourceLines:[]string{"", "\t\"github.com/DATA-DOG/go-sqlmock\"", "\t\"github.com/stretchr/testify/require\""}, Replacement:(*result.Replacement)(0xc00974b150), Pkg:(*packages.Package)(0xc00130bb00), LineRange:(*result.Range)(0xc00974b140), Pos:token.Position{Filename:"internal/pkg/callindex/service_test.go", Offset:0, Line:9, Column:0}, HunkPos:0, ExpectNoLint:false, ExpectedNoLintLinter:""} with range {9 11} 
INFO Line 5 has multiple issues but at least one of them isn't inline: []result.Issue{result.Issue{FromLinter:"gci", Text:"File is not `gci`-ed with -local myproject", Severity:"", SourceLines:[]string{""}, Replacement:(*result.Replacement)(0xc0023a7f10), Pkg:(*packages.Package)(0xc0013b3d40), LineRange:(*result.Range)(nil), Pos:token.Position{Filename:"internal/pkg/schedule/validation_test.go", Offset:0, Line:5, Column:0}, HunkPos:0, ExpectNoLint:false, ExpectedNoLintLinter:""}, result.Issue{FromLinter:"gofumpt", Text:"File is not `gofumpt`-ed", Severity:"", SourceLines:[]string{"", "\t\"myproject/internal/graphql/gqlmodels\""}, Replacement:(*result.Replacement)(0xc007d2b910), Pkg:(*packages.Package)(0xc0013b3d40), LineRange:(*result.Range)(0xc007d2b900), Pos:token.Position{Filename:"internal/pkg/schedule/validation_test.go", Offset:0, Line:5, Column:0}, HunkPos:0, ExpectNoLint:false, ExpectedNoLintLinter:""}} 
INFO Fix issue &result.Issue{FromLinter:"gofumpt", Text:"File is not `gofumpt`-ed", Severity:"", SourceLines:[]string{"import ("}, Replacement:(*result.Replacement)(0xc007d2b8d0), Pkg:(*packages.Package)(0xc0013b3d40), LineRange:(*result.Range)(nil), Pos:token.Position{Filename:"internal/pkg/schedule/validation_test.go", Offset:0, Line:3, Column:0}, HunkPos:0, ExpectNoLint:false, ExpectedNoLintLinter:""} with range {3 3} 
INFO Fix issue &result.Issue{FromLinter:"gci", Text:"File is not `gci`-ed with -local myproject", Severity:"", SourceLines:[]string{""}, Replacement:(*result.Replacement)(0xc0023a7f10), Pkg:(*packages.Package)(0xc0013b3d40), LineRange:(*result.Range)(nil), Pos:token.Position{Filename:"internal/pkg/schedule/validation_test.go", Offset:0, Line:5, Column:0}, HunkPos:0, ExpectNoLint:false, ExpectedNoLintLinter:""} with range {5 5} 
INFO Fix issue &result.Issue{FromLinter:"gci", Text:"File is not `gci`-ed with -local myproject", Severity:"", SourceLines:[]string{"", "\t\"github.com/stretchr/testify/require\""}, Replacement:(*result.Replacement)(0xc0023a7f50), Pkg:(*packages.Package)(0xc0013b3d40), LineRange:(*result.Range)(0xc0023a7f40), Pos:token.Position{Filename:"internal/pkg/schedule/validation_test.go", Offset:0, Line:7, Column:0}, HunkPos:0, ExpectNoLint:false, ExpectedNoLintLinter:""} with range {7 8} 
INFO Fix issue &result.Issue{FromLinter:"gofumpt", Text:"File is not `gofumpt`-ed", Severity:"", SourceLines:[]string{"import ("}, Replacement:(*result.Replacement)(0xc00f90fd10), Pkg:(*packages.Package)(0xc00134ea20), LineRange:(*result.Range)(nil), Pos:token.Position{Filename:"internal/pkg/configbackup/service.go", Offset:0, Line:3, Column:0}, HunkPos:0, ExpectNoLint:false, ExpectedNoLintLinter:""} with range {3 3} 
INFO Fix issue &result.Issue{FromLinter:"gofumpt", Text:"File is not `gofumpt`-ed", Severity:"", SourceLines:[]string{"", "\t\"myproject/internal/pkg/entity\"", "\t\"myproject/pkg/session\""}, Replacement:(*result.Replacement)(0xc00f90fd50), Pkg:(*packages.Package)(0xc00134ea20), LineRange:(*result.Range)(0xc00f90fd40), Pos:token.Position{Filename:"internal/pkg/configbackup/service.go", Offset:0, Line:7, Column:0}, HunkPos:0, ExpectNoLint:false, ExpectedNoLintLinter:""} with range {7 9} 
INFO Line 146 has multiple issues but at least one of them isn't inline: []result.Issue{result.Issue{FromLinter:"gofmt", Text:"File is not `gofmt`-ed with `-s`", Severity:"", SourceLines:[]string{"}"}, Replacement:(*result.Replacement)(0xc010030a90), Pkg:(*packages.Package)(0xc0012fb680), LineRange:(*result.Range)(nil), Pos:token.Position{Filename:"internal/pkg/call/service.go", Offset:0, Line:146, Column:0}, HunkPos:0, ExpectNoLint:false, ExpectedNoLintLinter:""}, result.Issue{FromLinter:"gofumpt", Text:"File is not `gofumpt`-ed", Severity:"", SourceLines:[]string{"}"}, Replacement:(*result.Replacement)(0xc0013fa950), Pkg:(*packages.Package)(0xc0012fb680), LineRange:(*result.Range)(nil), Pos:token.Position{Filename:"internal/pkg/call/service.go", Offset:0, Line:146, Column:0}, HunkPos:0, ExpectNoLint:false, ExpectedNoLintLinter:""}, result.Issue{FromLinter:"goimports", Text:"File is not `goimports`-ed with -local myproject", Severity:"", SourceLines:[]string{"}"}, Replacement:(*result.Replacement)(0xc00f977210), Pkg:(*packages.Package)(0xc0012fb680), LineRange:(*result.Range)(nil), Pos:token.Position{Filename:"internal/pkg/call/service.go", Offset:0, Line:146, Column:0}, HunkPos:0, ExpectNoLint:false, ExpectedNoLintLinter:""}} 
INFO Memory: 75 samples, avg is 424.0MB, max is 682.4MB 
INFO Execution took 7.326615184s                  
panic: runtime error: index out of range [146] with length 146

goroutine 1 [running]:
github.com/golangci/golangci-lint/pkg/result/processors.Fixer.mergeLineIssues(0xc0003cee00, 0x107e0e0, 0xc00058c930, 0xc0006559e0, 0xc0022b9ae0, 0x93, 0xc00501cb00, 0x2, 0x2, 0xc009ba8000, ...)
        /home/runner/work/golangci-lint/golangci-lint/pkg/result/processors/fixer.go:121 +0x599
github.com/golangci/golangci-lint/pkg/result/processors.Fixer.fixIssuesInFile(0xc0003cee00, 0x107e0e0, 0xc00058c930, 0xc0006559e0, 0xc0022b9ae0, 0xc009313c5d, 0x1c, 0xc004dd7500, 0x3, 0x10, ...)
        /home/runner/work/golangci-lint/golangci-lint/pkg/result/processors/fixer.go:98 +0x625
github.com/golangci/golangci-lint/pkg/result/processors.Fixer.Process.func1()
        /home/runner/work/golangci-lint/golangci-lint/pkg/result/processors/fixer.go:60 +0xae
github.com/golangci/golangci-lint/pkg/timeutils.(*Stopwatch).TrackStage(0xc0022b9ae0, 0xea3194, 0x3, 0xc0044c76a0)
        /home/runner/work/golangci-lint/golangci-lint/pkg/timeutils/stopwatch.go:111 +0x50
github.com/golangci/golangci-lint/pkg/result/processors.Fixer.Process(0xc0003cee00, 0x107e0e0, 0xc00058c930, 0xc0006559e0, 0xc0022b9ae0, 0xc005a06000, 0x374, 0x374, 0x3, 0x4, ...)
        /home/runner/work/golangci-lint/golangci-lint/pkg/result/processors/fixer.go:59 +0x665
github.com/golangci/golangci-lint/pkg/commands.(*Executor).runAnalysis(0xc00011b000, 0x1074160, 0xc0007d4480, 0xc0007e7ec0, 0x0, 0x2, 0xc0007d4480, 0x1074120, 0xc00018e000, 0x0, ...)
        /home/runner/work/golangci-lint/golangci-lint/pkg/commands/run.go:352 +0x6f7
github.com/golangci/golangci-lint/pkg/commands.(*Executor).runAndPrint(0xc00011b000, 0x1074160, 0xc0007d4480, 0xc0007e7ec0, 0x0, 0x2, 0x0, 0x0)
        /home/runner/work/golangci-lint/golangci-lint/pkg/commands/run.go:387 +0x12f
github.com/golangci/golangci-lint/pkg/commands.(*Executor).executeRun(0xc00011b000, 0xc000142840, 0xc0007e7ec0, 0x0, 0x2)
        /home/runner/work/golangci-lint/golangci-lint/pkg/commands/run.go:452 +0x177
github.com/spf13/cobra.(*Command).execute(0xc000142840, 0xc0007e7ea0, 0x2, 0x2, 0xc000142840, 0xc0007e7ea0)
        /home/runner/go/pkg/mod/github.com/spf13/[email protected]/command.go:854 +0x2c2
github.com/spf13/cobra.(*Command).ExecuteC(0xc000142580, 0x6, 0x103d200, 0x7)
        /home/runner/go/pkg/mod/github.com/spf13/[email protected]/command.go:958 +0x375
github.com/spf13/cobra.(*Command).Execute(...)
        /home/runner/go/pkg/mod/github.com/spf13/[email protected]/command.go:895
github.com/golangci/golangci-lint/pkg/commands.(*Executor).Execute(...)
        /home/runner/work/golangci-lint/golangci-lint/pkg/commands/executor.go:147
main.main()
        /home/runner/work/golangci-lint/golangci-lint/cmd/golangci-lint/main.go:21 +0x7e
@tobias-kuendig tobias-kuendig added the bug Something isn't working label Feb 10, 2021
@boring-cyborg
Copy link

boring-cyborg bot commented Feb 10, 2021

Hey, thank you for opening your first Issue ! 🙂 If you would like to contribute we have a guide for contributors.

@tobias-kuendig
Copy link
Author

tobias-kuendig commented Feb 10, 2021

I have now ignored the particular file using the skip-files option. The process now finishes without a panic, but leaves most files in a messed up state so my code will no longer compile. I wonder what I am doing wrong?

package i18n

import (
	"myproject/pkg/render"
	"myproject/pkg/router"
	"context"
	"encoding/json"
	"fmt"
	"io/ioutil"
	"net/http"
	"reflect"
	"strings"

	"github.com/ghodss/yaml"
	"github.com/oleiade/reflections"

	"myproject/pkg/render" // duplicated!
	"myproject/pkg/router" // duplicated!
)
Output
level=info msg="[config_reader] Config search paths: [./ /home/myuser/code/myproject /home/myuser/code /home/myuser /home /]"
level=info msg="[config_reader] Used config file .golangci.yml"
level=info msg="[lintersdb] Active 46 linters: [asciicheck bodyclose deadcode dogsled errcheck errorlint exportloopref funlen gci gochecknoinits gocognit gocritic gocyclo gofmt gofumpt goheader goimports golint gomodguard goprintffuncname gosec gosimple govet ineffassign interfacer lll makezero maligned misspell nakedret nestif noctx nolintlint predeclared rowserrcheck scopelint staticcheck structcheck stylecheck tparallel typecheck unconvert unparam unused varcheck whitespace]"
level=info msg="[loader] Go packages loading at mode 575 (name|compiled_files|deps|files|types_sizes|exports_file|imports) took 1.798327249s"
level=info msg="[runner/filename_unadjuster] Pre-built 0 adjustments in 40.214248ms"
level=info msg="[linters context/goanalysis] analyzers took 0s with no stages"
level=info msg="[linters context/goanalysis] analyzers took 0s with no stages"
level=info msg="[linters context/goanalysis] analyzers took 0s with no stages"
level=info msg="[runner] Issues before processing: 3626, after processing: 875"
level=info msg="[runner] Processors filtering stat (out/in): cgo: 3626/3626, filename_unadjuster: 3626/3626, path_prettifier: 3626/3626, skip_files: 3615/3626, autogenerated_exclude: 2208/3615, exclude: 2208/2208, exclude-rules: 1327/2208, nolint: 875/1327, max_from_linter: 875/875, source_code: 875/875, identifier_marker: 2208/2208, uniq_by_line: 875/875, diff: 875/875, max_same_issues: 875/875, severity-rules: 875/875, sort_results: 875/875, skip_dirs: 3615/3615, max_per_file_from_linter: 875/875, path_shortener: 875/875, path_prefixer: 875/875"
level=info msg="[runner] processing took 124.973306ms with stages: nolint: 54.200379ms, exclude-rules: 29.343616ms, identifier_marker: 26.240421ms, path_prettifier: 4.953255ms, source_code: 4.046131ms, autogenerated_exclude: 3.51567ms, skip_dirs: 824.895µs, max_same_issues: 647.328µs, skip_files: 334.042µs, max_per_file_from_linter: 293.83µs, cgo: 209.276µs, filename_unadjuster: 149.227µs, max_from_linter: 103.142µs, path_shortener: 77.328µs, uniq_by_line: 33.419µs, exclude: 401ns, diff: 321ns, sort_results: 252ns, severity-rules: 211ns, path_prefixer: 162ns"
level=info msg="[runner] linters took 195.010445ms with stages: goanalysis_metalinter: 67.996545ms, unused: 1.1468ms, makezero: 782.962µs"
level=info msg="Fix issue &result.Issue{FromLinter:\"gofumpt\", Text:\"File is not `gofumpt`-ed\", Severity:\"\", SourceLines:[]string{\"\\t\\\"context\\\"\", \"\"}, Replacement:(*result.Replacement)(0xc002438ae0), Pkg:(*packages.Package)(0xc000f88c60), LineRange:(*result.Range)(0xc0009a7930), Pos:token.Position{Filename:\"internal/pkg/indicator/service.go\", Offset:0, Line:4, Column:0}, HunkPos:0, ExpectNoLint:false, ExpectedNoLintLinter:\"\"} with range {4 5}"
level=info msg="Skip issue &result.Issue{FromLinter:\"gci\", Text:\"File is not `gci`-ed with -local myproject\", Severity:\"\", SourceLines:[]string{\"\"}, Replacement:(*result.Replacement)(0xc002438930), Pkg:(*packages.Package)(0xc000f88c60), LineRange:(*result.Range)(nil), Pos:token.Position{Filename:\"internal/pkg/indicator/service.go\", Offset:0, Line:5, Column:0}, HunkPos:0, ExpectNoLint:false, ExpectedNoLintLinter:\"\"}: intersects with end 5"
level=info msg="Fix issue &result.Issue{FromLinter:\"gofumpt\", Text:\"File is not `gofumpt`-ed\", Severity:\"\", SourceLines:[]string{\"\\t\\\"myproject/pkg/db\\\"\"}, Replacement:(*result.Replacement)(0xc002438b10), Pkg:(*packages.Package)(0xc000f88c60), LineRange:(*result.Range)(nil), Pos:token.Position{Filename:\"internal/pkg/indicator/service.go\", Offset:0, Line:8, Column:0}, HunkPos:0, ExpectNoLint:false, ExpectedNoLintLinter:\"\"} with range {8 8}"
level=info msg="Fix issue &result.Issue{FromLinter:\"gci\", Text:\"File is not `gci`-ed with -local myproject\", Severity:\"\", SourceLines:[]string{\"\", \"\\t\\\"github.com/pkg/errors\\\"\"}, Replacement:(*result.Replacement)(0xc002438990), Pkg:(*packages.Package)(0xc000f88c60), LineRange:(*result.Range)(0xc0009a7880), Pos:token.Position{Filename:\"internal/pkg/indicator/service.go\", Offset:0, Line:9, Column:0}, HunkPos:0, ExpectNoLint:false, ExpectedNoLintLinter:\"\"} with range {9 10}"

// *snip* because the output is too long for GitHub...

level=info msg="Fix issue &result.Issue{FromLinter:\"gci\", Text:\"File is not `gci`-ed with -local myproject\", Severity:\"\", SourceLines:[]string{\"\\t\\\"github.com/stretchr/testify/require\\\"\"}, Replacement:(*result.Replacement)(0xc0002836e0), Pkg:(*packages.Package)(0xc000e910e0), LineRange:(*result.Range)(nil), Pos:token.Position{Filename:\"internal/gets/displaygroup_test.go\", Offset:0, Line:14, Column:0}, HunkPos:0, ExpectNoLint:false, ExpectedNoLintLinter:\"\"} with range {14 14}"
level=info msg="Fix issue &result.Issue{FromLinter:\"gofumpt\", Text:\"File is not `gofumpt`-ed\", Severity:\"\", SourceLines:[]string{\"\\t\\\"context\\\"\", \"\\t\\\"testing\\\"\", \"\\t\\\"time\\\"\", \"\"}, Replacement:(*result.Replacement)(0xc0039ffaa0), Pkg:(*packages.Package)(0xc000f24c60), LineRange:(*result.Range)(0xc00083e5b0), Pos:token.Position{Filename:\"internal/pkg/checkpoint/service_test.go\", Offset:0, Line:4, Column:0}, HunkPos:0, ExpectNoLint:false, ExpectedNoLintLinter:\"\"} with range {4 7}"
level=info msg="Skip issue &result.Issue{FromLinter:\"gci\", Text:\"File is not `gci`-ed with -local myproject\", Severity:\"\", SourceLines:[]string{\"\\t\\\"time\\\"\"}, Replacement:(*result.Replacement)(0xc0039ff8f0), Pkg:(*packages.Package)(0xc000f24c60), LineRange:(*result.Range)(nil), Pos:token.Position{Filename:\"internal/pkg/checkpoint/service_test.go\", Offset:0, Line:6, Column:0}, HunkPos:0, ExpectNoLint:false, ExpectedNoLintLinter:\"\"}: intersects with end 7"
level=info msg="Fix issue &result.Issue{FromLinter:\"gofumpt\", Text:\"File is not `gofumpt`-ed\", Severity:\"\", SourceLines:[]string{\"\\t\\\"myproject/pkg/log\\\"\"}, Replacement:(*result.Replacement)(0xc0039ffad0), Pkg:(*packages.Package)(0xc000f24c60), LineRange:(*result.Range)(nil), Pos:token.Position{Filename:\"internal/pkg/checkpoint/service_test.go\", Offset:0, Line:14, Column:0}, HunkPos:0, ExpectNoLint:false, ExpectedNoLintLinter:\"\"} with range {14 14}"
level=info msg="Fix issue &result.Issue{FromLinter:\"gci\", Text:\"File is not `gci`-ed with -local myproject\", Severity:\"\", SourceLines:[]string{\"\", \"\\t\\\"github.com/DATA-DOG/go-sqlmock\\\"\", \"\\t\\\"github.com/stretchr/testify/require\\\"\"}, Replacement:(*result.Replacement)(0xc0039ff920), Pkg:(*packages.Package)(0xc000f24c60), LineRange:(*result.Range)(0xc00083e4d0), Pos:token.Position{Filename:\"internal/pkg/checkpoint/service_test.go\", Offset:0, Line:15, Column:0}, HunkPos:0, ExpectNoLint:false, ExpectedNoLintLinter:\"\"} with range {15 17}"
level=info msg="fixer took 169.506662ms with stages: all: 169.506662ms"
level=info msg="File cache stats: 227 entries of total size 1000.7KiB"
level=info msg="Memory: 24 samples, avg is 85.6MB, max is 139.1MB"
level=info msg="Execution took 2.208759995s"

@ldez
Copy link
Member

ldez commented Feb 14, 2021

Duplicate of #1490

@ldez ldez closed this as completed Feb 14, 2021
@ldez ldez reopened this Feb 14, 2021
@ldez
Copy link
Member

ldez commented Feb 14, 2021

Your second comment is a duplicate of #1490.
For this issue, you have to disable goimports or gci.

But your initial issue seems different.
Are you able to share your code? or at least provide a minimal reproducible snippet?

@tobias-kuendig
Copy link
Author

Thank you @ldez, disabling gci did solve the issue with duplicated imports.

Regarding the other issue: I don't have the problem anymore today, but reverting the git repo back to a few days ago, the problem is reproducible. The only thing that was changed in the file since then was an added newline at the end (without the newline it panics):

-}
+}
\ No newline at end of file

I can now reproduce the issue with any file, by removing the last newline from it:

// main.go
package main

import "fmt"

func main() {
        fmt.Println("Hello World")
}
$ golangci-lint run --fix
# all good

# remove last byte
$ truncate -s -1 main.go

# obviously still valid code
$ go run main.go         
Hello World

# panics!
$ golangci-lint run --fix
panic: runtime error: index out of range [7] with length 7

goroutine 1 [running]:
github.com/golangci/golangci-lint/pkg/result/processors.Fixer.mergeLineIssues(0xc000686e00, 0x107e0e0, 0xc00069c5a0, 0xc00078b5c0, 0xc00189c7d0, 0x8, 0xc00017adc0, 0x2, 0x2, 0xc0000cda20, ...)
...

@ldez
Copy link
Member

ldez commented Feb 17, 2021

I tried to reproduce with your example, but I cannot:

$ golangci-lint version
golangci-lint has version 1.36.0 built from 6c25d06 on 2021-01-26T13:14:05Z
$ truncate -s -1 main.go
$ golangci-lint run
main.go:7: File is not `gofmt`-ed with `-s` (gofmt)
}
$ go run main.go         
Hello World
$ golangci-lint run --fix
$ golangci-lint run
main.go:7: File is not `gofmt`-ed with `-s` (gofmt)
}

the fix is never applied but I don't get a panic.

@ldez ldez added the feedback required Requires additional feedback label Feb 17, 2021
@tobias-kuendig
Copy link
Author

That's strange! I am still abe to reproduce the issue.

$ golangci-lint version  
golangci-lint has version 1.36.0 built from 6c25d06 on 2021-01-26T13:14:05Z
package main

import (
        "fmt"
)

func main() {
        fmt.Println("Hello World")
}

hexdump -C main.go with \n (0a) at the end, works fine

00000000  70 61 63 6b 61 67 65 20  6d 61 69 6e 0a 0a 69 6d  |package main..im|
00000010  70 6f 72 74 20 28 0a 09  22 66 6d 74 22 0a 29 0a  |port (.."fmt".).|
00000020  0a 66 75 6e 63 20 6d 61  69 6e 28 29 20 7b 0a 09  |.func main() {..|
00000030  66 6d 74 2e 50 72 69 6e  74 6c 6e 28 22 48 65 6c  |fmt.Println("Hel|
00000040  6c 6f 20 57 6f 72 6c 64  22 29 0a 7d 0a           |lo World").}.|
0000004d

hexdump -C main.go after truncate without \n (no 0a)

00000000  70 61 63 6b 61 67 65 20  6d 61 69 6e 0a 0a 69 6d  |package main..im|
00000010  70 6f 72 74 20 28 0a 09  22 66 6d 74 22 0a 29 0a  |port (.."fmt".).|
00000020  0a 66 75 6e 63 20 6d 61  69 6e 28 29 20 7b 0a 09  |.func main() {..|
00000030  66 6d 74 2e 50 72 69 6e  74 6c 6e 28 22 48 65 6c  |fmt.Println("Hel|
00000040  6c 6f 20 57 6f 72 6c 64  22 29 0a 7d              |lo World").}|
0000004c
# .golangci.yml                                    
linters:
  enable-all: true
$ golangci-lint run --fix
panic: runtime error: index out of range [9] with length 9

Here's a download link to the original file I have used:

http://transfer.sh/r7Cqy/main.go

@ldez
Copy link
Member

ldez commented Feb 18, 2021

I tried with your configuration and your file:

$ hexdump -C main.go
00000000  70 61 63 6b 61 67 65 20  6d 61 69 6e 0a 0a 69 6d  |package main..im|
00000010  70 6f 72 74 20 28 0a 09  22 66 6d 74 22 0a 29 0a  |port (.."fmt".).|
00000020  0a 66 75 6e 63 20 6d 61  69 6e 28 29 20 7b 0a 09  |.func main() {..|
00000030  66 6d 74 2e 50 72 69 6e  74 6c 6e 28 22 48 65 6c  |fmt.Println("Hel|
00000040  6c 6f 20 57 6f 72 6c 64  22 29 0a 7d              |lo World").}|

in a clean project and I still not reproduce 🤔

@tobias-kuendig
Copy link
Author

tobias-kuendig commented Feb 18, 2021

Huh! What Go version are you running?

go version go1.15.6 linux/amd64

I am running Ubuntu 20.04, but I cannot imagine that the OS could be the culprit.

Edit: If I find the time I'll try and debug the code locally, as I am able to reproduce this.

@ldez
Copy link
Member

ldez commented Feb 18, 2021

The local version of Go doesn't have any importance, I use the binary from the download page.

@ldez
Copy link
Member

ldez commented Feb 18, 2021

Could you try to clean your cache golangci-lint cache clean

@tobias-kuendig
Copy link
Author

Cleaning the cache does not help. I did look into this and the problem seems to be that the generated patch (like the gofmt patch) returns a fix for lines 9 and 10. These positions are then stored in the Issue struct here:

Pos: token.Position{

But the file itself only has 9 lines because of the missing new line at the end. So there is not 10th line to fix.

This problem is actually detected here (a warning is printed):

p.log.Warnf("Failed to get line %d for file %s: %s",

WARN [runner/source_code] Failed to get line 10 for file main.go: invalid file line index0 (9) >= len(fc) (9) 

But the Issue is still processed, as it is returned from the closure despite the error. Changing this to a return nil removes the panic but the patch is no longer applied correctly (the last line of the file gets removed now, and since we are misssing the new line, the last line might be a closing } or other relevant code):

Once this gets to the mergeLineIssues method, this line triggers the panic:

origLine := origFileLines[lineNum-1] // lineNum is 1-based

I was able to reproduce this on two (Ubuntu) systems with any Go file (using the truncate) command.
I am not sure how to fix this issue as I am currently missing the big picture of how the golangci-lint processing works.

@ldez
Copy link
Member

ldez commented Feb 24, 2021

I tested on 3 computers:

  • Manjaro 20.2.1
  • Ubuntu 20.04.2
  • Ubuntu 20.10

And I still not reproduce 🤔

@tobias-kuendig
Copy link
Author

😁 what a strange problem! What's the length of your origFileLines variable in fixer.go? Does it match the actual line count? Is it even called?

I did reproduce it like this:

In the root of your repo, I created a crash.go file:

package main

import (
        "fmt"
)

func main() {
        fmt.Println("Hello World")
}

This is 10 lines long (including the new line at the end). I truncated the last byte, so it only has 9 lines now:

truncate -s -1 crash.go 

Running everything as is from your repo (no additional config), the panic occurs:

go run cmd/golangci-lint/main.go run --fix

@ldez
Copy link
Member

ldez commented Feb 24, 2021

could you run:

go run ./cmd/golangci-lint/ run --fix -v

FYI origFileLines length is 9

@tobias-kuendig
Copy link
Author

tobias-kuendig commented Feb 24, 2021

File with new line
$ go run cmd/golangci-lint/main.go run --fix -v
INFO [config_reader] Config search paths: [./ /home/offline/Code/golangci-lint /home/offline/Code /home/offline /home /] 
INFO [config_reader] Used config file .golangci.yml 
INFO [lintersdb] Active 38 linters: [bodyclose deadcode depguard dogsled dupl errcheck exhaustive funlen gochecknoinits goconst gocritic gocyclo gofmt goimports golint gomnd goprintffuncname gosec gosimple govet ineffassign interfacer lll misspell nakedret noctx nolintlint rowserrcheck scopelint staticcheck structcheck stylecheck typecheck unconvert unparam unused varcheck whitespace] 
INFO [loader] Go packages loading at mode 575 (types_sizes|files|imports|name|compiled_files|deps|exports_file) took 550.811469ms 
INFO [runner/filename_unadjuster] Pre-built 0 adjustments in 20.025155ms 
INFO [linters context/goanalysis] analyzers took 58.107126918s with top 10 stages: buildir: 31.105111975s, buildssa: 3.747009081s, dupl: 2.398601938s, gocritic: 1.645466988s, exhaustive: 1.609474469s, unconvert: 1.575949741s, goimports: 1.521783495s, inspect: 1.275985839s, interfacer: 877.95695ms, fact_purity: 827.615221ms 
INFO [linters context/goanalysis] analyzers took 2.535382411s with top 10 stages: buildir: 2.026869101s, U1000: 508.51331ms 
INFO [runner/skip dirs] Skipped 5 issues from dir test/testdata_etc/abspath by pattern test/testdata_etc 
INFO [runner/skip dirs] Skipped 15 issues from dir internal/renameio by pattern internal/renameio 
INFO [runner/skip dirs] Skipped 77 issues from dir internal/cache by pattern internal/cache 
INFO [runner/skip dirs] Skipped 3 issues from dir test/testdata_etc/unused_exported by pattern test/testdata_etc 
INFO [runner/skip dirs] Skipped 3 issues from dir test/testdata_etc/unused_exported/lib by pattern test/testdata_etc 
INFO [runner/skip dirs] Skipped 2 issues from dir internal/robustio by pattern internal/robustio 
INFO [runner] Issues before processing: 1048, after processing: 0 
INFO [runner] Processors filtering stat (out/in): identifier_marker: 943/943, exclude: 943/943, exclude-rules: 111/943, filename_unadjuster: 1048/1048, path_prettifier: 1048/1048, autogenerated_exclude: 943/943, cgo: 1048/1048, skip_files: 1048/1048, skip_dirs: 943/1048, nolint: 0/111 
INFO [runner] processing took 75.959915ms with stages: exclude-rules: 24.264635ms, nolint: 23.125218ms, identifier_marker: 21.492663ms, path_prettifier: 3.326031ms, autogenerated_exclude: 2.873107ms, skip_dirs: 706.01µs, cgo: 107.433µs, filename_unadjuster: 58.86µs, max_same_issues: 1.19µs, uniq_by_line: 999ns, source_code: 582ns, skip_files: 458ns, exclude: 449ns, max_from_linter: 440ns, diff: 422ns, max_per_file_from_linter: 408ns, path_shortener: 364ns, severity-rules: 263ns, sort_results: 220ns, path_prefixer: 163ns 
INFO [runner] linters took 15.153146772s with stages: goanalysis_metalinter: 13.550474932s, unused: 1.526604304s 
INFO fixer took 0s with no stages                 
INFO File cache stats: 202 entries of total size 549.0KiB 
INFO Memory: 155 samples, avg is 406.4MB, max is 612.5MB 
INFO Execution took 15.729806276s 
Without new line
$ go run cmd/golangci-lint/main.go run --fix -v
INFO [config_reader] Config search paths: [./ /home/offline/Code/golangci-lint /home/offline/Code /home/offline /home /] 
INFO [config_reader] Used config file .golangci.yml 
INFO [lintersdb] Active 38 linters: [bodyclose deadcode depguard dogsled dupl errcheck exhaustive funlen gochecknoinits goconst gocritic gocyclo gofmt goimports golint gomnd goprintffuncname gosec gosimple govet ineffassign interfacer lll misspell nakedret noctx nolintlint rowserrcheck scopelint staticcheck structcheck stylecheck typecheck unconvert unparam unused varcheck whitespace] 
INFO [loader] Go packages loading at mode 575 (deps|exports_file|files|imports|types_sizes|compiled_files|name) took 655.636955ms 
INFO [runner/filename_unadjuster] Pre-built 0 adjustments in 26.529292ms 
INFO [linters context/goanalysis] analyzers took 23.686826ms with top 10 stages: buildir: 4.813634ms, gofmt: 4.381784ms, buildssa: 4.107576ms, goimports: 2.800601ms, unconvert: 1.831023ms, interfacer: 1.622957ms, gocritic: 460.239µs, unparam: 361.545µs, depguard: 229.913µs, fact_deprecated: 227.905µs 
INFO [linters context/goanalysis] analyzers took 3.111447ms with top 10 stages: buildir: 2.993732ms, U1000: 117.715µs 
WARN [runner/source_code] Failed to get line 10 for file crash.go: invalid file line index0 (9) >= len(fc) (9) 
WARN [runner/source_code] Failed to get line 10 for file crash.go: invalid file line index0 (9) >= len(fc) (9) 
INFO [runner/skip dirs] Skipped 3 issues from dir test/testdata_etc/unused_exported/lib by pattern test/testdata_etc 
INFO [runner/skip dirs] Skipped 5 issues from dir test/testdata_etc/abspath by pattern test/testdata_etc 
INFO [runner/skip dirs] Skipped 3 issues from dir test/testdata_etc/unused_exported by pattern test/testdata_etc 
INFO [runner/skip dirs] Skipped 2 issues from dir internal/robustio by pattern internal/robustio 
INFO [runner/skip dirs] Skipped 15 issues from dir internal/renameio by pattern internal/renameio 
INFO [runner/skip dirs] Skipped 77 issues from dir internal/cache by pattern internal/cache 
INFO [runner] Issues before processing: 1052, after processing: 4 
INFO [runner] Processors filtering stat (out/in): filename_unadjuster: 1052/1052, autogenerated_exclude: 947/947, identifier_marker: 947/947, exclude: 947/947, path_shortener: 4/4, cgo: 1052/1052, uniq_by_line: 4/4, max_per_file_from_linter: 4/4, max_from_linter: 4/4, path_prefixer: 4/4, sort_results: 4/4, path_prettifier: 1052/1052, skip_files: 1052/1052, exclude-rules: 115/947, nolint: 4/115, diff: 4/4, source_code: 4/4, skip_dirs: 947/1052, max_same_issues: 4/4, severity-rules: 4/4 
INFO [runner] processing took 65.042328ms with stages: identifier_marker: 22.211579ms, exclude-rules: 17.646574ms, nolint: 17.316716ms, path_prettifier: 4.137834ms, autogenerated_exclude: 2.87314ms, skip_dirs: 586.408µs, cgo: 106.7µs, source_code: 79.299µs, filename_unadjuster: 72.853µs, path_shortener: 2.716µs, max_same_issues: 2.071µs, uniq_by_line: 1.918µs, max_per_file_from_linter: 1.295µs, max_from_linter: 802ns, diff: 589ns, exclude: 520ns, skip_files: 440ns, sort_results: 307ns, severity-rules: 295ns, path_prefixer: 272ns 
INFO [runner] linters took 411.821626ms with stages: goanalysis_metalinter: 293.45955ms, unused: 53.208256ms 
INFO Line 9 has multiple issues but at least one of them isn't inline: []result.Issue{result.Issue{FromLinter:"gofmt", Text:"File is not `gofmt`-ed with `-s`", Severity:"", SourceLines:[]string{"}"}, Replacement:(*result.Replacement)(0xc000b73090), Pkg:(*packages.Package)(0xc0008eed80), LineRange:(*result.Range)(nil), Pos:token.Position{Filename:"crash.go", Offset:0, Line:9, Column:0}, HunkPos:0, ExpectNoLint:false, ExpectedNoLintLinter:""}, result.Issue{FromLinter:"goimports", Text:"File is not `goimports`-ed with -local github.com/golangci/golangci-lint", Severity:"", SourceLines:[]string{"}"}, Replacement:(*result.Replacement)(0xc000b72f90), Pkg:(*packages.Package)(0xc0008eed80), LineRange:(*result.Range)(nil), Pos:token.Position{Filename:"crash.go", Offset:0, Line:9, Column:0}, HunkPos:0, ExpectNoLint:false, ExpectedNoLintLinter:""}} 
INFO Memory: 13 samples, avg is 97.1MB, max is 138.6MB 
INFO Execution took 1.101194843s                  
panic: runtime error: index out of range [9] with length 9

goroutine 1 [running]:
github.com/golangci/golangci-lint/pkg/result/processors.Fixer.mergeLineIssues(0xc00065c000, 0x14b9b20, 0xc000629320, 0xc000796840, 0xc000fce910, 0xa, 0xc002144580, 0x2, 0x2, 0xc00022a2a0, ...)
        /home/offline/Code/golangci-lint/pkg/result/processors/fixer.go:121 +0x599
github.com/golangci/golangci-lint/pkg/result/processors.Fixer.fixIssuesInFile(0xc00065c000, 0x14b9b20, 0xc000629320, 0xc000796840, 0xc000fce910, 0xc000b90f21, 0x8, 0xc0002a38c0, 0x1, 0x4, ...)
        /home/offline/Code/golangci-lint/pkg/result/processors/fixer.go:98 +0x625
github.com/golangci/golangci-lint/pkg/result/processors.Fixer.Process.func1()
        /home/offline/Code/golangci-lint/pkg/result/processors/fixer.go:60 +0xae
github.com/golangci/golangci-lint/pkg/timeutils.(*Stopwatch).TrackStage(0xc000fce910, 0x12cafcb, 0x3, 0xc0004cb6a0)
        /home/offline/Code/golangci-lint/pkg/timeutils/stopwatch.go:111 +0x50
github.com/golangci/golangci-lint/pkg/result/processors.Fixer.Process(0xc00065c000, 0x14b9b20, 0xc000629320, 0xc000796840, 0xc000fce910, 0xc0002a3340, 0x4, 0x4, 0x2, 0x2, ...)
        /home/offline/Code/golangci-lint/pkg/result/processors/fixer.go:59 +0x665
github.com/golangci/golangci-lint/pkg/commands.(*Executor).runAnalysis(0xc000126800, 0x14af6e0, 0xc0007b2780, 0xc0007fcf00, 0x0, 0x2, 0xc0007b2780, 0x14af6a0, 0xc0001ac010, 0x0, ...)
        /home/offline/Code/golangci-lint/pkg/commands/run.go:352 +0x6f7
github.com/golangci/golangci-lint/pkg/commands.(*Executor).runAndPrint(0xc000126800, 0x14af6e0, 0xc0007b2780, 0xc0007fcf00, 0x0, 0x2, 0x0, 0x0)
        /home/offline/Code/golangci-lint/pkg/commands/run.go:387 +0x12f
github.com/golangci/golangci-lint/pkg/commands.(*Executor).executeRun(0xc000126800, 0xc000216c80, 0xc0007fcf00, 0x0, 0x2)
        /home/offline/Code/golangci-lint/pkg/commands/run.go:452 +0x177
github.com/spf13/cobra.(*Command).execute(0xc000216c80, 0xc0007fcee0, 0x2, 0x2, 0xc000216c80, 0xc0007fcee0)
        /home/offline/Code/go/pkg/mod/github.com/spf13/[email protected]/command.go:856 +0x2c2
github.com/spf13/cobra.(*Command).ExecuteC(0xc000216a00, 0x6, 0x12ca701, 0x1)
        /home/offline/Code/go/pkg/mod/github.com/spf13/[email protected]/command.go:960 +0x375
github.com/spf13/cobra.(*Command).Execute(...)
        /home/offline/Code/go/pkg/mod/github.com/spf13/[email protected]/command.go:897
github.com/golangci/golangci-lint/pkg/commands.(*Executor).Execute(...)
        /home/offline/Code/golangci-lint/pkg/commands/executor.go:147
main.main()
        /home/offline/Code/golangci-lint/cmd/golangci-lint/main.go:21 +0x7e
exit status 2

Here's the context right before the panic:

image

I do get the same issuesToFix for line 9 and 10 (line 10 crashes):

image

Replacement Data:

image

@ldez
Copy link
Member

ldez commented Feb 24, 2021

$ go run ./cmd/golangci-lint/ run --fix -v
INFO [config_reader] Config search paths: [./ /home/ldez/sources/go/src/github.com/golangci/golangci-lint /home/ldez/sources/go/src/github.com/golangci /home/ldez/sources/go/src/github.com /home/ldez/sources/go/src /home/ldez/sources/go /home/ldez/sources /home/ldez /home /] 
INFO [config_reader] Used config file .golangci.yml 
INFO [lintersdb] Active 37 linters: [bodyclose deadcode depguard dogsled dupl errcheck exhaustive funlen gochecknoinits goconst gocritic gocyclo gofmt goimports golint gomnd goprintffuncname gosec gosimple govet ineffassign lll misspell nakedret noctx nolintlint rowserrcheck scopelint staticcheck structcheck stylecheck typecheck unconvert unparam unused varcheck whitespace] 
INFO [loader] Go packages loading at mode 575 (exports_file|files|types_sizes|compiled_files|deps|imports|name) took 685.636431ms 
INFO [runner/filename_unadjuster] Pre-built 0 adjustments in 17.09254ms 
INFO [linters context/goanalysis] analyzers took 52.645459013s with top 10 stages: buildir: 23.928657136s, buildssa: 2.340841823s, exhaustive: 2.099818129s, inspect: 1.561163007s, dupl: 1.384390564s, unconvert: 1.065587477s, gocritic: 962.127068ms, fact_deprecated: 941.086536ms, goimports: 907.903399ms, gosec: 852.809959ms 
INFO [linters context/goanalysis] analyzers took 997.454223ms with top 10 stages: buildir: 787.149629ms, unused: 128.511421ms, directives: 60.356653ms, isgenerated: 21.43652ms 
INFO [runner/skip dirs] Skipped 5 issues from dir test/testdata_etc/abspath by pattern test/testdata_etc 
INFO [runner/skip dirs] Skipped 15 issues from dir internal/renameio by pattern internal/renameio 
INFO [runner/skip dirs] Skipped 77 issues from dir internal/cache by pattern internal/cache 
INFO [runner/skip dirs] Skipped 3 issues from dir test/testdata_etc/unused_exported by pattern test/testdata_etc 
INFO [runner/skip dirs] Skipped 2 issues from dir internal/robustio by pattern internal/robustio 
INFO [runner/skip dirs] Skipped 3 issues from dir test/testdata_etc/unused_exported/lib by pattern test/testdata_etc 
INFO [runner] Issues before processing: 1054, after processing: 2 
INFO [runner] Processors filtering stat (out/in): source_code: 2/2, path_prefixer: 2/2, exclude: 949/949, exclude-rules: 111/949, diff: 2/2, max_per_file_from_linter: 2/2, path_shortener: 2/2, skip_files: 1054/1054, skip_dirs: 949/1054, identifier_marker: 949/949, max_same_issues: 2/2, cgo: 1054/1054, autogenerated_exclude: 949/949, sort_results: 2/2, max_from_linter: 2/2, severity-rules: 2/2, filename_unadjuster: 1054/1054, path_prettifier: 1054/1054, nolint: 2/111, uniq_by_line: 2/2 
INFO [runner] processing took 60.4996ms with stages: identifier_marker: 22.203471ms, exclude-rules: 18.49865ms, nolint: 13.119788ms, path_prettifier: 4.311373ms, autogenerated_exclude: 1.714233ms, skip_dirs: 470.572µs, cgo: 102.96µs, filename_unadjuster: 53.723µs, source_code: 18.086µs, path_shortener: 1.579µs, uniq_by_line: 1.151µs, max_same_issues: 1.068µs, max_per_file_from_linter: 853ns, max_from_linter: 557ns, skip_files: 341ns, exclude: 318ns, diff: 279ns, sort_results: 249ns, severity-rules: 224ns, path_prefixer: 125ns 
INFO [runner] linters took 7.273060461s with stages: goanalysis_metalinter: 6.729794234s, unused: 482.688142ms 
origFileLines 9 lineNum 9
INFO Line 9 has multiple issues but at least one of them isn't inline: []result.Issue{result.Issue{FromLinter:"gofmt", Text:"File is not `gofmt`-ed with `-s`", Severity:"", SourceLines:[]string{"}"}, Replacement:(*result.Replacement)(0xc0099df310), Pkg:(*packages.Package)(0xc000aaab40), LineRange:(*result.Range)(nil), Pos:token.Position{Filename:"crash.go", Offset:0, Line:9, Column:0}, HunkPos:0, ExpectNoLint:false, ExpectedNoLintLinter:""}, result.Issue{FromLinter:"goimports", Text:"File is not `goimports`-ed with -local github.com/golangci/golangci-lint", Severity:"", SourceLines:[]string{"}"}, Replacement:(*result.Replacement)(0xc003eee150), Pkg:(*packages.Package)(0xc000aaab40), LineRange:(*result.Range)(nil), Pos:token.Position{Filename:"crash.go", Offset:0, Line:9, Column:0}, HunkPos:0, ExpectNoLint:false, ExpectedNoLintLinter:""}} 
INFO Fix issue &result.Issue{FromLinter:"gofmt", Text:"File is not `gofmt`-ed with `-s`", Severity:"", SourceLines:[]string{"}"}, Replacement:(*result.Replacement)(0xc0099df310), Pkg:(*packages.Package)(0xc000aaab40), LineRange:(*result.Range)(nil), Pos:token.Position{Filename:"crash.go", Offset:0, Line:9, Column:0}, HunkPos:0, ExpectNoLint:false, ExpectedNoLintLinter:""} with range {9 9} 
INFO fixer took 214.138µs with stages: all: 214.138µs 
INFO File cache stats: 204 entries of total size 549.6KiB 
INFO Memory: 81 samples, avg is 444.1MB, max is 680.0MB 
INFO Execution took 7.982446388s                  

@ldez
Copy link
Member

ldez commented Feb 24, 2021

Could you update your local binary of goimports?

@ldez
Copy link
Member

ldez commented Mar 22, 2021

@tobias-kuendig any news?

@tobias-kuendig
Copy link
Author

Sorry, I was a few days away from work.

While writing you a lengthy response with all kind of debug information, I think I found the culprit:
https://github.com/sourcegraph/go-diff/blob/master/diff/parse.go#L595

I have german diff outputs (Kein Zeilenumbruch am Dateiende.) instead of the hard coded No newline at end of file in the go-diff package.

As a quick check, I have replaced their diff testdata with german versions and most of their tests are failing now.

It seems the package is not language aware.

@ldez ldez removed the feedback required Requires additional feedback label Oct 31, 2021
@pierrre
Copy link
Contributor

pierrre commented Dec 8, 2021

Hello, I have the same issue.
Is there a workaround ?
Do I need to change my locale ?

@tobias-kuendig
Copy link
Author

It usually is because a file does not have a empty line at the end of the file. Just add the empty line and run the linter again.

@pierrre
Copy link
Contributor

pierrre commented Dec 8, 2021

It usually is because a file does not have a empty line at the end of the file. Just add the empty line and run the linter again.

OK, I finally understood that after several attempts.
The easiest fix for me was to run gofmt -w . on my projects.

Thank you !

@ldez ldez added the feedback required Requires additional feedback label Mar 27, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area: auto-fix bug Something isn't working feedback required Requires additional feedback
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants