ReanGD/go-web-search

View on GitHub
import_dict.go

Summary

Maintainability
A
2 hrs
Test Coverage

Method dictParser.nextWords has 8 return statements (exceeds 4 allowed).
Open

func (p *dictParser) nextWords() ([]string, error) {
    if p.finish {
        return nil, nil
    }
    t, err := p.nextToken()
Severity: Major
Found in import_dict.go - About 50 mins to fix

    Avoid deeply nested control flow statements.
    Open

            } else if t.ttype == tokenEmpty {
                break
            } else {
                return nil, errors.New("unknown token")
            }
    Severity: Major
    Found in import_dict.go - About 45 mins to fix

      Method dictParser.nextToken has 6 return statements (exceeds 4 allowed).
      Open

      func (p *dictParser) nextToken() (token, error) {
          done, data, err := p.nextLine()
      
          if err != nil {
              return token{}, err
      Severity: Major
      Found in import_dict.go - About 40 mins to fix

        There are no issues that match your filters.

        Category
        Status