iotaledger / wasp

Node for IOTA Smart Contracts
Apache License 2.0
296 stars 147 forks source link

Addressing Linter Suggestions from 'make lint' Command Execution #3409

Open Ginowine opened 5 months ago

Ginowine commented 5 months ago

After following the steps outlined in the CONTRIBUTING.md file and executing the 'make lint' command, the following linter suggestions are generated:

cli/wallet/wallet.go:48:9: do not define dynamic errors, use wrapped static errors instead: "errors.New(\"invalid wallet provider provided\")" (err113)
        return errors.New("invalid wallet provider provided")
               ^
cli/keychain/keychain_file.go:57:11: G306: Expect WriteFile permissions to be 0600 or less (gosec)
                neErr = os.WriteFile(k.FilePath(), result, os.ModePerm)
                        ^
cli/keychain/keychain_file.go:132:8: G306: Expect WriteFile permissions to be 0600 or less (gosec)
        err = os.WriteFile(k.FilePath(), payload, os.ModePerm)
              ^
cli/config/config.go:209:9: do not define dynamic errors, use wrapped static errors instead: "fmt.Errorf(\"target network of the L1 node does not match the wasp-cli config\")" (err113)
                err = fmt.Errorf("target network of the L1 node does not match the wasp-cli config")