reconmap/cli

View on GitHub
internal/commands/auth.go

Summary

Maintainability
A
3 hrs
Test Coverage

Function Login has 77 lines of code (exceeds 50 allowed). Consider refactoring.
Open

func Login() error {
    config, err := configuration.ReadConfig()
    if err != nil {
        return err
    }
Severity: Major
Found in internal/commands/auth.go - About 2 hrs to fix

    Function Login has 8 return statements (exceeds 4 allowed).
    Open

    func Login() error {
        config, err := configuration.ReadConfig()
        if err != nil {
            return err
        }
    Severity: Major
    Found in internal/commands/auth.go - About 50 mins to fix

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

      func Logout() error {
          if _, err := api.ReadSessionToken(); err != nil {
              return errors.New("There is no active user session")
          }
      
      
      Severity: Major
      Found in internal/commands/auth.go - About 45 mins to fix

        There are no issues that match your filters.

        Category
        Status