bump github.com/daixiang0/gci from 0.2.9 to 0.3.0 ()

Co-authored-by: Fernandez Ludovic <ldez@users.noreply.github.com>
This commit is contained in:
ngehrsitz 2022-02-14 09:51:24 +01:00 committed by GitHub
parent 39a76b8624
commit f7d2406dc6
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
13 changed files with 89 additions and 110 deletions

View file

@ -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)