Skip to content

Commit

Permalink
fix linter
Browse files Browse the repository at this point in the history
  • Loading branch information
BenAlvo1 committed Nov 21, 2024
1 parent 4248dcc commit 0287f4d
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions internal/wrappers/configuration/configuration.go
Original file line number Diff line number Diff line change
Expand Up @@ -134,23 +134,23 @@ func WriteSingleConfigKey(key string, value int) {
// Get the configuration file path
fullPath, err := getConfigFilePath()
if err != nil {
logger.PrintfIfVerbose("failed to get config file path: %w", err)
logger.PrintfIfVerbose("failed to get config file path: %w", err.Error())

Check failure on line 137 in internal/wrappers/configuration/configuration.go

View workflow job for this annotation

GitHub Actions / lint

printf: github.com/checkmarx/ast-cli/internal/logger.PrintfIfVerbose format %w has arg err.Error() of wrong type string (govet)
return
}

// Load existing configuration or initialize a new one
config, err := loadConfig(fullPath)
if err != nil {
logger.PrintfIfVerbose("failed to load config: %w", err)
logger.PrintfIfVerbose("failed to load config: %w", err.Error())

Check failure on line 144 in internal/wrappers/configuration/configuration.go

View workflow job for this annotation

GitHub Actions / lint

printf: github.com/checkmarx/ast-cli/internal/logger.PrintfIfVerbose format %w has arg err.Error() of wrong type string (govet)
return
}

// Update the configuration key
config[key] = value

// Save the updated configuration back to the file
if err := saveConfig(fullPath, config); err != nil {
logger.PrintfIfVerbose("failed to save config: %w", err)
if err = saveConfig(fullPath, config); err != nil {
logger.PrintfIfVerbose("failed to save config: %w", err.Error())

Check failure on line 153 in internal/wrappers/configuration/configuration.go

View workflow job for this annotation

GitHub Actions / lint

printf: github.com/checkmarx/ast-cli/internal/logger.PrintfIfVerbose format %w has arg err.Error() of wrong type string (govet)
return
}
}
Expand Down

0 comments on commit 0287f4d

Please sign in to comment.