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 {
6060 l .cfg .Linters .Exclusions .Generated = GeneratedModeStrict
6161 }
6262
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
6566 }
6667
6768 if ! l .cfg .InternalCmdTest {
@@ -131,6 +132,14 @@ func (l *Loader) appendStringSlice(name string, current *[]string) {
131132 }
132133}
133134
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+
134143func (l * Loader ) handleGoVersion () {
135144 if l .cfg .Run .Go == "" {
136145 l .cfg .Run .Go = detectGoVersion (context .Background ())
You can’t perform that action at this time.
0 commit comments