cmd/ugo/main.go

Summary

Maintainability
A
0 mins
Test Coverage

File main.go has 610 lines of code (exceeds 500 allowed). Consider refactoring.
Wontfix

// Copyright (c) 2020-2023 Ozan Hacıbekiroğlu.
// Use of this source code is governed by a MIT License
// that can be found in the LICENSE file.

//go:build !js
Severity: Minor
Found in cmd/ugo/main.go - About 4 hrs to fix

    repl has 24 methods (exceeds 20 allowed). Consider refactoring.
    Wontfix

    type repl struct {
        ctx          context.Context
        eval         *ugo.Eval
        out          io.Writer
        commands     map[string]func(string) error
    Severity: Minor
    Found in cmd/ugo/main.go - About 2 hrs to fix

      Function main has 60 lines of code (exceeds 50 allowed). Consider refactoring.
      Wontfix

      func main() {
          filePath, timeout, err := parseFlags(flag.CommandLine, os.Args[1:])
          checkErr(err, nil)
      
          ctx, cancel := context.WithCancel(context.Background())
      Severity: Minor
      Found in cmd/ugo/main.go - About 1 hr to fix

        Function executeScript has 5 arguments (exceeds 4 allowed). Consider refactoring.
        Wontfix

            ctx context.Context,
            modulePath string,
            workdir string,
            script []byte,
            traceOut io.Writer,
        Severity: Minor
        Found in cmd/ugo/main.go - About 35 mins to fix

          There are no issues that match your filters.

          Category
          Status