htdocs/assets/js/views/searches/syntax/ecl.js

Summary

Maintainability
B
4 hrs
Test Coverage

Function tokenBase has 37 lines of code (exceeds 25 allowed). Consider refactoring.
Open

        function tokenBase(stream, state) {
            if (stream.eatSpace()) return null;

            var sol = stream.sol();
            var ch = stream.next();
Severity: Minor
Found in htdocs/assets/js/views/searches/syntax/ecl.js - About 1 hr to fix

    Avoid too many return statements within this function.
    Open

                    return 'attribute';
    Severity: Major
    Found in htdocs/assets/js/views/searches/syntax/ecl.js - About 30 mins to fix

      Avoid too many return statements within this function.
      Open

                  return words.hasOwnProperty(cur) ? words[cur] : null;
      Severity: Major
      Found in htdocs/assets/js/views/searches/syntax/ecl.js - About 30 mins to fix

        Avoid too many return statements within this function.
        Open

                            return 'number';
        Severity: Major
        Found in htdocs/assets/js/views/searches/syntax/ecl.js - About 30 mins to fix

          Avoid too many return statements within this function.
          Open

                      if (stream.peek() === '=' && /\w+/.test(cur)) return 'def';
          Severity: Major
          Found in htdocs/assets/js/views/searches/syntax/ecl.js - About 30 mins to fix

            Avoid too many return statements within this function.
            Open

                            return 'operator';
            Severity: Major
            Found in htdocs/assets/js/views/searches/syntax/ecl.js - About 30 mins to fix

              Avoid too many return statements within this function.
              Open

                              return tokenize(stream, state);
              Severity: Major
              Found in htdocs/assets/js/views/searches/syntax/ecl.js - About 30 mins to fix

                There are no issues that match your filters.

                Category
                Status