File tree Expand file tree Collapse file tree 1 file changed +4
-4
lines changed
Expand file tree Collapse file tree 1 file changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -137,6 +137,10 @@ func (c *migrateCommand) preRunE(cmd *cobra.Command, _ []string) error {
137137 return fmt .Errorf ("unsupported format: %s" , c .opts .format )
138138 }
139139
140+ if c .cfg .Version != "" {
141+ return fmt .Errorf ("configuration version is already set: %s" , c .cfg .Version )
142+ }
143+
140144 if c .opts .skipValidation {
141145 return nil
142146 }
@@ -147,10 +151,6 @@ func (c *migrateCommand) preRunE(cmd *cobra.Command, _ []string) error {
147151 os .Exit (exitcodes .NoConfigFileDetected )
148152 }
149153
150- if c .cfg .Version != "" {
151- return fmt .Errorf ("configuration version is already set: %s" , c .cfg .Version )
152- }
153-
154154 c .log .Infof ("Validating v1 configuration file: %s" , usedConfigFile )
155155
156156 err := validateConfiguration ("https://golangci-lint.run/jsonschema/golangci.v1.jsonschema.json" , usedConfigFile )
You can’t perform that action at this time.
0 commit comments