Skip to content

Commit 3bd1d3f

Browse files
committed
review
1 parent 441adb7 commit 3bd1d3f

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

pkg/commands/migrate.go

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff 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)

0 commit comments

Comments
 (0)