sunboyy/repogen

View on GitHub
internal/spec/parser.go

Summary

Maintainability
A
3 hrs
Test Coverage

Method interfaceMethodParser.parseFindOperation has 7 return statements (exceeds 4 allowed).
Open

func (p interfaceMethodParser) parseFindOperation(tokens []string) (Operation, error) {
    mode, err := p.extractModelOrSliceReturns(p.Signature.Results())
    if err != nil {
        return nil, err
    }
Severity: Major
Found in internal/spec/parser.go - About 45 mins to fix

    Method interfaceMethodParser.extractIntOrBoolReturns has 5 return statements (exceeds 4 allowed).
    Open

    func (p interfaceMethodParser) extractIntOrBoolReturns(returns *types.Tuple) (QueryMode, error) {
        if returns.Len() != 2 {
            return "", NewOperationReturnCountUnmatchedError(2)
        }
    
    
    Severity: Major
    Found in internal/spec/parser.go - About 35 mins to fix

      Method interfaceMethodParser.extractInsertReturns has 5 return statements (exceeds 4 allowed).
      Open

      func (p interfaceMethodParser) extractInsertReturns(returns *types.Tuple) (QueryMode, error) {
          if returns.Len() != 2 {
              return "", NewOperationReturnCountUnmatchedError(2)
          }
      
      
      Severity: Major
      Found in internal/spec/parser.go - About 35 mins to fix

        Method interfaceMethodParser.parseFindTop has 5 return statements (exceeds 4 allowed).
        Open

        func (p interfaceMethodParser) parseFindTop(tokens []string) (int, []string,
            error) {
        
            if len(tokens) >= 1 && tokens[0] == "Top" {
                if len(tokens) < 2 {
        Severity: Major
        Found in internal/spec/parser.go - About 35 mins to fix

          Method interfaceMethodParser.parseInsertOperation has 5 return statements (exceeds 4 allowed).
          Open

          func (p interfaceMethodParser) parseInsertOperation(tokens []string) (Operation, error) {
              mode, err := p.extractInsertReturns(p.Signature.Results())
              if err != nil {
                  return nil, err
              }
          Severity: Major
          Found in internal/spec/parser.go - About 35 mins to fix

            Method interfaceMethodParser.extractModelOrSliceReturns has 5 return statements (exceeds 4 allowed).
            Open

            func (p interfaceMethodParser) extractModelOrSliceReturns(returns *types.Tuple) (QueryMode, error) {
                if returns.Len() != 2 {
                    return "", NewOperationReturnCountUnmatchedError(2)
                }
            
            
            Severity: Major
            Found in internal/spec/parser.go - About 35 mins to fix

              There are no issues that match your filters.

              Category
              Status