Skip to content

Commit

Permalink
lint: Fix 'superfluous-else' warning from revive
Browse files Browse the repository at this point in the history
This fixes:
```
pkg/crc/preflight/preflight.go:55:9: superfluous-else: if block ends with call to panic function, so drop this else and outdent its block (revive)
	} else {
		logging.Infof("%s", check.checkDescription)
	}
```

Signed-off-by: Christophe Fergeau <cfergeau@redhat.com>
  • Loading branch information
cfergeau committed Feb 26, 2024
1 parent b1208a6 commit cfd7b3c
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions pkg/crc/preflight/preflight.go
Original file line number Diff line number Diff line change
Expand Up @@ -52,9 +52,9 @@ func (check *Check) shouldSkip(config crcConfig.Storage) bool {
func (check *Check) doCheck(config crcConfig.Storage) error {
if check.checkDescription == "" {
panic(fmt.Sprintf("Should not happen, empty description for check '%s'", check.configKeySuffix))
} else {
logging.Infof("%s", check.checkDescription)
}

logging.Infof("%s", check.checkDescription)
if check.shouldSkip(config) {
logging.Warn("Skipping above check...")
return nil
Expand Down

0 comments on commit cfd7b3c

Please sign in to comment.