Skip to content

Commit

Permalink
Enable and fix gosimple issues
Browse files Browse the repository at this point in the history
  • Loading branch information
jshufro committed Apr 17, 2024
1 parent 8b7c4cd commit a49f6ff
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 10 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ jobs:
# args: --issues-exit-code=0

# For now, Smart Node will only enforce goimports linting
args: --disable-all --enable goimports --enable staticcheck --enable ineffassign
args: --disable-all --enable goimports --enable staticcheck --enable ineffassign --enable gosimple

# Optional: show only new issues if it's a pull request. The default value is `false`.
# only-new-issues: true
Expand Down
2 changes: 1 addition & 1 deletion rocketpool-cli/client/service.go
Original file line number Diff line number Diff line change
Expand Up @@ -132,7 +132,7 @@ func (c *Client) InstallService(verbose bool, noDeps bool, version string, path
func (c *Client) InstallUpdateTracker(verbose bool, version string, useLocalInstaller bool) error {
// Get installation script flags
flags := []string{
"-v", fmt.Sprintf("%s", shellescape.Quote(version)),
"-v", shellescape.Quote(version),
}

var script []byte
Expand Down
2 changes: 1 addition & 1 deletion rocketpool-cli/commands/wallet/bip39/mnemonic-validator.go
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ func (mv *MnemonicValidator) Filled() bool {

func (mv *MnemonicValidator) Finalize() (string, error) {

if mv.Filled() == false {
if !mv.Filled() {
return "", errors.New("Not enough words were entered.")
}

Expand Down
14 changes: 7 additions & 7 deletions rocketpool-daemon/common/alerting/alerting.go
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ func AlertFeeRecipientChanged(cfg *config.SmartNodeConfig, newFeeRecipient commo
return nil
}

if cfg.Alertmanager.AlertEnabled_FeeRecipientChanged.Value != true {
if !cfg.Alertmanager.AlertEnabled_FeeRecipientChanged.Value {
logMessage("alert for FeeRecipientChanged is disabled, not sending.")
return nil
}
Expand All @@ -71,7 +71,7 @@ func AlertMinipoolBondReduced(cfg *config.SmartNodeConfig, minipoolAddress commo
return nil
}

if cfg.Alertmanager.AlertEnabled_MinipoolBondReduced.Value != true {
if !cfg.Alertmanager.AlertEnabled_MinipoolBondReduced.Value {
logMessage("alert for MinipoolBondReduced is disabled, not sending.")
return nil
}
Expand Down Expand Up @@ -100,7 +100,7 @@ func AlertMinipoolBalanceDistributed(cfg *config.SmartNodeConfig, minipoolAddres
return nil
}

if cfg.Alertmanager.AlertEnabled_MinipoolBalanceDistributed.Value != true {
if !cfg.Alertmanager.AlertEnabled_MinipoolBalanceDistributed.Value {
logMessage("alert for MinipoolBalanceDistributed is disabled, not sending.")
return nil
}
Expand Down Expand Up @@ -128,7 +128,7 @@ func AlertMinipoolPromoted(cfg *config.SmartNodeConfig, minipoolAddress common.A
return nil
}

if cfg.Alertmanager.AlertEnabled_MinipoolPromoted.Value != true {
if !cfg.Alertmanager.AlertEnabled_MinipoolPromoted.Value {
logMessage("alert for MinipoolPromoted is disabled, not sending.")
return nil
}
Expand Down Expand Up @@ -156,7 +156,7 @@ func AlertMinipoolStaked(cfg *config.SmartNodeConfig, minipoolAddress common.Add
return nil
}

if cfg.Alertmanager.AlertEnabled_MinipoolStaked.Value != true {
if !cfg.Alertmanager.AlertEnabled_MinipoolStaked.Value {
logMessage("alert for MinipoolStaked is disabled, not sending.")
return nil
}
Expand Down Expand Up @@ -193,15 +193,15 @@ func getAlertSettingsForEvent(succeeded bool) (strfmt.DateTime, Severity, string
}

func AlertExecutionClientSyncComplete(cfg *config.SmartNodeConfig) error {
if cfg.Alertmanager.AlertEnabled_ExecutionClientSyncComplete.Value != true {
if !cfg.Alertmanager.AlertEnabled_ExecutionClientSyncComplete.Value {
logMessage("alert for ExecutionClientSyncComplete is disabled, not sending.")
return nil
}
return alertClientSyncComplete(cfg, ClientKindExecution)
}

func AlertBeaconClientSyncComplete(cfg *config.SmartNodeConfig) error {
if cfg.Alertmanager.AlertEnabled_BeaconClientSyncComplete.Value != true {
if !cfg.Alertmanager.AlertEnabled_BeaconClientSyncComplete.Value {
logMessage("alert for BeaconClientSyncComplete is disabled, not sending.")
return nil
}
Expand Down

0 comments on commit a49f6ff

Please sign in to comment.