File tree Expand file tree Collapse file tree 1 file changed +11
-2
lines changed Expand file tree Collapse file tree 1 file changed +11
-2
lines changed Original file line number Diff line number Diff line change @@ -60,8 +60,9 @@ func (l *Loader) Load(opts LoadOptions) error {
60
60
l .cfg .Linters .Exclusions .Generated = GeneratedModeStrict
61
61
}
62
62
63
- if l .cfg .GetConfigDir () != "" && l .cfg .Version != "2" {
64
- return fmt .Errorf ("unsupported version of the configuration: %q (require configuration v2)" , l .cfg .Version )
63
+ err = l .checkConfigurationVersion ()
64
+ if err != nil {
65
+ return err
65
66
}
66
67
67
68
if ! l .cfg .InternalCmdTest {
@@ -131,6 +132,14 @@ func (l *Loader) appendStringSlice(name string, current *[]string) {
131
132
}
132
133
}
133
134
135
+ func (l * Loader ) checkConfigurationVersion () error {
136
+ if l .cfg .GetConfigDir () != "" && l .cfg .Version != "2" {
137
+ return fmt .Errorf ("unsupported version of the configuration: %q (require configuration v2)" , l .cfg .Version )
138
+ }
139
+
140
+ return nil
141
+ }
142
+
134
143
func (l * Loader ) handleGoVersion () {
135
144
if l .cfg .Run .Go == "" {
136
145
l .cfg .Run .Go = detectGoVersion (context .Background ())
You can’t perform that action at this time.
0 commit comments