mirror of
https://github.com/scratchfoundation/golangci-lint.git
synced 2025-08-01 17:09:18 -04:00
bump github.com/daixiang0/gci from 0.2.9 to 0.3.0 (#2532)
Co-authored-by: Fernandez Ludovic <ldez@users.noreply.github.com>
This commit is contained in:
parent
39a76b8624
commit
f7d2406dc6
13 changed files with 89 additions and 110 deletions
test
|
@ -92,11 +92,11 @@ func TestGciLocal(t *testing.T) {
|
|||
rc := extractRunContextFromComments(t, sourcePath)
|
||||
args = append(args, rc.args...)
|
||||
|
||||
cfg, err := yaml.Marshal(rc.config)
|
||||
cfg, err := os.ReadFile(rc.configPath)
|
||||
require.NoError(t, err)
|
||||
|
||||
testshared.NewLintRunner(t).RunWithYamlConfig(string(cfg), args...).
|
||||
ExpectHasIssue("testdata/gci/gci.go:7: File is not `gci`-ed")
|
||||
ExpectHasIssue("testdata/gci/gci.go:9:1: Expected '\\n', Found '\\t'")
|
||||
}
|
||||
|
||||
func TestMultipleOutputs(t *testing.T) {
|
||||
|
@ -108,11 +108,11 @@ func TestMultipleOutputs(t *testing.T) {
|
|||
rc := extractRunContextFromComments(t, sourcePath)
|
||||
args = append(args, rc.args...)
|
||||
|
||||
cfg, err := yaml.Marshal(rc.config)
|
||||
cfg, err := os.ReadFile(rc.configPath)
|
||||
require.NoError(t, err)
|
||||
|
||||
testshared.NewLintRunner(t).RunWithYamlConfig(string(cfg), args...).
|
||||
ExpectHasIssue("testdata/gci/gci.go:7: File is not `gci`-ed").
|
||||
ExpectHasIssue("testdata/gci/gci.go:9:1: Expected '\\n', Found '\\t'").
|
||||
ExpectOutputContains(`"Issues":[`)
|
||||
}
|
||||
|
||||
|
@ -125,11 +125,11 @@ func TestStderrOutput(t *testing.T) {
|
|||
rc := extractRunContextFromComments(t, sourcePath)
|
||||
args = append(args, rc.args...)
|
||||
|
||||
cfg, err := yaml.Marshal(rc.config)
|
||||
cfg, err := os.ReadFile(rc.configPath)
|
||||
require.NoError(t, err)
|
||||
|
||||
testshared.NewLintRunner(t).RunWithYamlConfig(string(cfg), args...).
|
||||
ExpectHasIssue("testdata/gci/gci.go:7: File is not `gci`-ed").
|
||||
ExpectHasIssue("testdata/gci/gci.go:9:1: Expected '\\n', Found '\\t'").
|
||||
ExpectOutputContains(`"Issues":[`)
|
||||
}
|
||||
|
||||
|
@ -145,11 +145,11 @@ func TestFileOutput(t *testing.T) {
|
|||
rc := extractRunContextFromComments(t, sourcePath)
|
||||
args = append(args, rc.args...)
|
||||
|
||||
cfg, err := yaml.Marshal(rc.config)
|
||||
cfg, err := os.ReadFile(rc.configPath)
|
||||
require.NoError(t, err)
|
||||
|
||||
testshared.NewLintRunner(t).RunWithYamlConfig(string(cfg), args...).
|
||||
ExpectHasIssue("testdata/gci/gci.go:7: File is not `gci`-ed").
|
||||
ExpectHasIssue("testdata/gci/gci.go:9:1: Expected '\\n', Found '\\t'").
|
||||
ExpectOutputNotContains(`"Issues":[`)
|
||||
|
||||
b, err := os.ReadFile(resultPath)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue