mirror of
https://github.com/scratchfoundation/golangci-lint.git
synced 2025-08-21 18:58:43 -04:00
dev: replace golangcitest:config by golangcitest:config_path (#3099)
This commit is contained in:
parent
9da04f5070
commit
f7fba37cc9
59 changed files with 126 additions and 118 deletions
test
|
@ -7,7 +7,6 @@ import (
|
|||
"testing"
|
||||
|
||||
"github.com/stretchr/testify/require"
|
||||
"gopkg.in/yaml.v3"
|
||||
|
||||
"github.com/golangci/golangci-lint/pkg/exitcodes"
|
||||
"github.com/golangci/golangci-lint/test/testshared"
|
||||
|
@ -56,15 +55,12 @@ func TestFix(t *testing.T) {
|
|||
|
||||
args = append(args, rc.args...)
|
||||
|
||||
cfg, err := yaml.Marshal(rc.config)
|
||||
require.NoError(t, err)
|
||||
|
||||
var runResult *testshared.RunResult
|
||||
if rc.configPath != "" {
|
||||
args = append(args, "-c", rc.configPath)
|
||||
runResult = testshared.NewLintRunner(t).RunCommand("run", args...)
|
||||
} else {
|
||||
runResult = testshared.NewLintRunner(t).RunWithYamlConfig(string(cfg), args...)
|
||||
runResult = testshared.NewLintRunner(t).RunWithYamlConfig("", args...)
|
||||
}
|
||||
|
||||
// nolintlint test uses non existing linters (bob, alice)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue