sjansen/messageformat

View on GitHub

Showing 4 of 4 total issues

Function parseArgument has 8 return statements (exceeds 4 allowed).
Open

func parseArgument(dec *decoder.Decoder, depth int) (ast.Part, error) {
    if err := requireRune(dec, '{'); err != nil {
        return nil, err
    }

Severity: Major
Found in internal/parser/parser.go - About 50 mins to fix

    Function compile has 6 return statements (exceeds 4 allowed).
    Open

    func compile(lang language.Tag, msg *ast.Message, n *numberSign) (*Message, error) {
        parts := make([]part, 0, len(msg.Parts))
        for _, part := range msg.Parts {
            switch x := part.(type) {
            case *ast.NumberSign:
    Severity: Major
    Found in internal/compiler/compiler.go - About 40 mins to fix

      Method pluralArg.format has 5 return statements (exceeds 4 allowed).
      Open

      func (p *pluralArg) format(b *strings.Builder, lang language.Tag, arguments map[string]interface{}) error {
          value, ok := arguments[p.ArgID]
          if !ok {
              return fmt.Errorf("missing arg: %q", p.ArgID)
          }
      Severity: Major
      Found in internal/compiler/plural.go - About 35 mins to fix

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

        func parseMessage(dec *decoder.Decoder, depth int, inPlural bool) ([]ast.Part, error) {
            parts := []ast.Part{}
            if depth > 0 {
                if err := requireRune(dec, '{'); err != nil {
                    return nil, err
        Severity: Major
        Found in internal/parser/parser.go - About 35 mins to fix
          Severity
          Category
          Status
          Source
          Language