aergoio/aergo

View on GitHub
cmd/aergocli/cmd/accounts.go

Summary

Maintainability
A
2 hrs
Test Coverage
F
43%

Function importKeystore has 7 return statements (exceeds 4 allowed).
Open

func importKeystore(cmd *cobra.Command) ([]byte, error) {
    var err error
    var address []byte
    absPath, err := filepath.Abs(importFilePath)
    if err != nil {
Severity: Major
Found in cmd/aergocli/cmd/accounts.go - About 45 mins to fix

    Function getPasswd has 6 return statements (exceeds 4 allowed).
    Open

    func getPasswd(cmd *cobra.Command, isNew bool) (string, error) {
        screen, fd := getTerminalReaderWriter()
        oldState, err := terminal.MakeRaw(fd)
        if err != nil {
            return "", err
    Severity: Major
    Found in cmd/aergocli/cmd/accounts.go - About 40 mins to fix

      Function importWif has 5 return statements (exceeds 4 allowed).
      Open

      func importWif(cmd *cobra.Command) ([]byte, error) {
          var err error
          var address []byte
          importBuf, err := types.DecodePrivKey(importFormat)
          if err != nil {
      Severity: Major
      Found in cmd/aergocli/cmd/accounts.go - About 35 mins to fix

        Function exportKeystore has 5 return statements (exceeds 4 allowed).
        Open

        func exportKeystore(cmd *cobra.Command, param *types.Personal) ([]byte, error) {
            if rootConfig.KeyStorePath == "" {
                msg, err := client.ExportAccountKeystore(context.Background(), param)
                if err != nil {
                    return nil, fmt.Errorf("node request returned error: %s", err.Error())
        Severity: Major
        Found in cmd/aergocli/cmd/accounts.go - About 35 mins to fix

          There are no issues that match your filters.

          Category
          Status