pgollangi/netselect

View on GitHub
commands/root.go

Summary

Maintainability
A
1 hr
Test Coverage

Function runCommand has 55 lines of code (exceeds 50 allowed). Consider refactoring.
Open

func runCommand(cmd *cobra.Command, args []string) error {
    if ok, _ := cmd.Flags().GetBool("version"); ok {
        executeVersionCmd()
        return nil
    } else if len(args) == 0 {
Severity: Minor
Found in commands/root.go - About 1 hr to fix

    Function runCommand has 5 return statements (exceeds 4 allowed).
    Wontfix

    func runCommand(cmd *cobra.Command, args []string) error {
        if ok, _ := cmd.Flags().GetBool("version"); ok {
            executeVersionCmd()
            return nil
        } else if len(args) == 0 {
    Severity: Major
    Found in commands/root.go - About 35 mins to fix

      There are no issues that match your filters.

      Category
      Status