efritz/go-mockgen

View on GitHub

Showing 3 of 20 total issues

File main.go has 614 lines of code (exceeds 500 allowed). Consider refactoring.
Open

package main

import (
    "fmt"
    "log"
Severity: Minor
Found in main.go - About 4 hrs to fix

    Method generator.generateMockStructFromConstructor has 51 lines of code (exceeds 50 allowed). Consider refactoring.
    Open

    func (g *generator) generateMockStructFromConstructor(iface *wrappedInterface) jen.Code {
        ifaceName := jen.Qual(generation.SanitizeImportPath(iface.ImportPath, g.outputImportPath), iface.Name)
    
        var surrogate *jen.Statement
        if !unicode.IsUpper([]rune(iface.Name)[0]) {
    Severity: Minor
    Found in main.go - About 1 hr to fix

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

      func getCallHistory(v interface{}) ([]callInstance, bool) {
          value := reflect.ValueOf(v)
          if !value.IsValid() {
              return nil, false
          }
      Severity: Major
      Found in matchers/type_support.go - About 35 mins to fix
        Severity
        Category
        Status
        Source
        Language