htdocs/assets/js/queryparser.js

Summary

Maintainability
B
6 hrs
Test Coverage

Function _parse has 96 lines of code (exceeds 25 allowed). Consider refactoring.
Open

    QueryParser.prototype._parse = function(tokens) {
        var ret = {};
        var stk = 0;
        var node = ret;
        var node = {};
Severity: Major
Found in htdocs/assets/js/queryparser.js - About 3 hrs to fix

    Function tokenize has 36 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

        QueryParser.prototype.tokenize = function(str) {
            if(!str) {
                return [];
            }
            if(str.length > 1024) {
    Severity: Minor
    Found in htdocs/assets/js/queryparser.js - About 1 hr to fix

      Avoid deeply nested control flow statements.
      Open

                                  if(vtok.length === 0) {
                                      throw new ParseException('Empty group: "' + ktok + '"');
                                  }
      Severity: Major
      Found in htdocs/assets/js/queryparser.js - About 45 mins to fix

        Avoid deeply nested control flow statements.
        Open

                                if(!(k in final_ret)) {
                                    final_ret[k] = [];
                                }
        Severity: Major
        Found in htdocs/assets/js/queryparser.js - About 45 mins to fix

          There are no issues that match your filters.

          Category
          Status