melphi/algobox

View on GitHub
java/algobox/algobox-microservice/src/main/resources/static/swagger/lib/handlebars-4.0.5.js

Summary

Maintainability
F
3 wks
Test Coverage

File handlebars-4.0.5.js has 3341 lines of code (exceeds 250 allowed). Consider refactoring.
Open

/*!

 handlebars v4.0.5

Copyright (C) 2011-2015 by Yehuda Katz

    Function handlebars has 698 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

        var handlebars = (function () {
            var parser = { trace: function trace() {},
                yy: {},
                symbols_: { "error": 2, "root": 3, "program": 4, "EOF": 5, "program_repetition0": 6, "statement": 7, "mustache": 8, "block": 9, "rawBlock": 10, "partial": 11, "partialBlock": 12, "content": 13, "COMMENT": 14, "CONTENT": 15, "openRawBlock": 16, "rawBlock_repetition_plus0": 17, "END_RAW_BLOCK": 18, "OPEN_RAW_BLOCK": 19, "helperName": 20, "openRawBlock_repetition0": 21, "openRawBlock_option0": 22, "CLOSE_RAW_BLOCK": 23, "openBlock": 24, "block_option0": 25, "closeBlock": 26, "openInverse": 27, "block_option1": 28, "OPEN_BLOCK": 29, "openBlock_repetition0": 30, "openBlock_option0": 31, "openBlock_option1": 32, "CLOSE": 33, "OPEN_INVERSE": 34, "openInverse_repetition0": 35, "openInverse_option0": 36, "openInverse_option1": 37, "openInverseChain": 38, "OPEN_INVERSE_CHAIN": 39, "openInverseChain_repetition0": 40, "openInverseChain_option0": 41, "openInverseChain_option1": 42, "inverseAndProgram": 43, "INVERSE": 44, "inverseChain": 45, "inverseChain_option0": 46, "OPEN_ENDBLOCK": 47, "OPEN": 48, "mustache_repetition0": 49, "mustache_option0": 50, "OPEN_UNESCAPED": 51, "mustache_repetition1": 52, "mustache_option1": 53, "CLOSE_UNESCAPED": 54, "OPEN_PARTIAL": 55, "partialName": 56, "partial_repetition0": 57, "partial_option0": 58, "openPartialBlock": 59, "OPEN_PARTIAL_BLOCK": 60, "openPartialBlock_repetition0": 61, "openPartialBlock_option0": 62, "param": 63, "sexpr": 64, "OPEN_SEXPR": 65, "sexpr_repetition0": 66, "sexpr_option0": 67, "CLOSE_SEXPR": 68, "hash": 69, "hash_repetition_plus0": 70, "hashSegment": 71, "ID": 72, "EQUALS": 73, "blockParams": 74, "OPEN_BLOCK_PARAMS": 75, "blockParams_repetition_plus0": 76, "CLOSE_BLOCK_PARAMS": 77, "path": 78, "dataName": 79, "STRING": 80, "NUMBER": 81, "BOOLEAN": 82, "UNDEFINED": 83, "NULL": 84, "DATA": 85, "pathSegments": 86, "SEP": 87, "$accept": 0, "$end": 1 },
                terminals_: { 2: "error", 5: "EOF", 14: "COMMENT", 15: "CONTENT", 18: "END_RAW_BLOCK", 19: "OPEN_RAW_BLOCK", 23: "CLOSE_RAW_BLOCK", 29: "OPEN_BLOCK", 33: "CLOSE", 34: "OPEN_INVERSE", 39: "OPEN_INVERSE_CHAIN", 44: "INVERSE", 47: "OPEN_ENDBLOCK", 48: "OPEN", 51: "OPEN_UNESCAPED", 54: "CLOSE_UNESCAPED", 55: "OPEN_PARTIAL", 60: "OPEN_PARTIAL_BLOCK", 65: "OPEN_SEXPR", 68: "CLOSE_SEXPR", 72: "ID", 73: "EQUALS", 75: "OPEN_BLOCK_PARAMS", 77: "CLOSE_BLOCK_PARAMS", 80: "STRING", 81: "NUMBER", 82: "BOOLEAN", 83: "UNDEFINED", 84: "NULL", 85: "DATA", 87: "SEP" },

      Function lexer has 316 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

              var lexer = (function () {
                  var lexer = { EOF: 1,
                      parseError: function parseError(str, hash) {
                          if (this.yy.parser) {
                              this.yy.parser.parseError(str, hash);

        Function anonymous has 243 lines of code (exceeds 25 allowed). Consider refactoring.
        Open

                    performAction: function anonymous(yytext, yyleng, yylineno, yy, yystate, $$, _$
                    /**/) {
        
                        var $0 = $$.length - 1;
                        switch (yystate) {

          Function anonymous has 162 lines of code (exceeds 25 allowed). Consider refactoring.
          Open

                      lexer.performAction = function anonymous(yy, yy_, $avoiding_name_collisions, YY_START
                      /**/) {
          
                          function strip(start, end) {
                              return yy_.yytext = yy_.yytext.substr(start, yy_.yyleng - end);

            Function template has 136 lines of code (exceeds 25 allowed). Consider refactoring.
            Open

                function template(templateSpec, env) {
                  /* istanbul ignore next */
                  if (!env) {
                    throw new _exception2['default']('No environment passed to template');
                  }

              Function parse has 117 lines of code (exceeds 25 allowed). Consider refactoring.
              Open

                          parse: function parse(input) {
                              var self = this,
                                  stack = [0],
                                  vstack = [null],
                                  lstack = [],

                Function compile has 108 lines of code (exceeds 25 allowed). Consider refactoring.
                Open

                      compile: function compile(environment, options, context, asObject) {
                        this.environment = environment;
                        this.options = options;
                        this.stringParams = this.options.stringParams;
                        this.trackIds = this.options.trackIds;

                  Function setupParams has 53 lines of code (exceeds 25 allowed). Consider refactoring.
                  Open

                        setupParams: function setupParams(helper, paramSize, params) {
                          var options = {},
                              contexts = [],
                              types = [],
                              ids = [],

                    Function mergeSource has 50 lines of code (exceeds 25 allowed). Consider refactoring.
                    Open

                          mergeSource: function mergeSource(varDeclarations) {
                            var isSimple = this.environment.isSimple,
                                appendOnly = !this.forceBuffer,
                                appendFirst = undefined,
                                sourceSeen = undefined,

                      Function next has 43 lines of code (exceeds 25 allowed). Consider refactoring.
                      Open

                                      next: function next() {
                                          if (this.done) {
                                              return this.EOF;
                                          }
                                          if (!this._input) this.done = true;

                        Function PartialBlockStatement has 40 lines of code (exceeds 25 allowed). Consider refactoring.
                        Open

                            WhitespaceControl.prototype.BlockStatement = WhitespaceControl.prototype.DecoratorBlock = WhitespaceControl.prototype.PartialBlockStatement = function (block) {
                              this.accept(block.program);
                              this.accept(block.inverse);
                        
                              // Find the inverse program that is involed with whitespace stripping.

                          Function Program has 39 lines of code (exceeds 25 allowed). Consider refactoring.
                          Open

                              WhitespaceControl.prototype.Program = function (program) {
                                var doStandalone = !this.options.ignoreStandalone;
                          
                                var isRoot = !this.isRootSeen;
                                this.isRootSeen = true;

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

                                function compile(input, options, env) {
                                  if (options === undefined) options = {};
                            
                                  if (input == null || typeof input !== 'string' && input.type !== 'Program') {
                                    throw new _exception2['default']('You must pass a string or Handlebars AST to Handlebars.compile. You passed ' + input);

                              Function prepareBlock has 33 lines of code (exceeds 25 allowed). Consider refactoring.
                              Open

                                  function prepareBlock(openBlock, program, inverseAndProgram, close, inverted, locInfo) {
                                    if (close && close.path) {
                                      validateClose(openBlock, close);
                                    }
                              
                              

                                Function pushParam has 31 lines of code (exceeds 25 allowed). Consider refactoring.
                                Open

                                      pushParam: function pushParam(val) {
                                        var value = val.value != null ? val.value : val.original || '';
                                
                                        if (this.stringParams) {
                                          if (value.replace) {

                                  Function preparePath has 28 lines of code (exceeds 25 allowed). Consider refactoring.
                                  Open

                                      function preparePath(data, parts, loc) {
                                        loc = this.locInfo(loc);
                                  
                                        var original = data ? '@' : '',
                                            dig = [],

                                    Function PartialStatement has 28 lines of code (exceeds 25 allowed). Consider refactoring.
                                    Open

                                          PartialStatement: function PartialStatement(partial) {
                                            this.usePartial = true;
                                    
                                            var program = partial.program;
                                            if (program) {

                                      Function createFunctionContext has 27 lines of code (exceeds 25 allowed). Consider refactoring.
                                      Open

                                            createFunctionContext: function createFunctionContext(asObject) {
                                              var varDeclarations = '';
                                      
                                              var locals = this.stackVars.concat(this.registers.list);
                                              if (locals.length > 0) {

                                        Function invokePartialWrapper has 27 lines of code (exceeds 25 allowed). Consider refactoring.
                                        Open

                                              function invokePartialWrapper(partial, context, options) {
                                                if (options.hash) {
                                                  context = Utils.extend({}, context, options.hash);
                                                  if (options.ids) {
                                                    options.ids[0] = true;

                                          Function compile has 26 lines of code (exceeds 25 allowed). Consider refactoring.
                                          Open

                                                compile: function compile(program, options) {
                                                  this.sourceNode = [];
                                                  this.opcodes = [];
                                                  this.children = [];
                                                  this.options = options;

                                            Function replaceStack has 26 lines of code (exceeds 25 allowed). Consider refactoring.
                                            Open

                                                  replaceStack: function replaceStack(callback) {
                                                    var prefix = ['('],
                                                        stack = undefined,
                                                        createdStack = undefined,
                                                        usedLiteral = undefined;

                                              Function wrapProgram has 7 arguments (exceeds 4 allowed). Consider refactoring.
                                              Open

                                                  function wrapProgram(container, i, fn, data, declaredBlockParams, blockParams, depths) {

                                                Function performAction has 7 arguments (exceeds 4 allowed). Consider refactoring.
                                                Open

                                                            performAction: function anonymous(yytext, yyleng, yylineno, yy, yystate, $$, _$

                                                  Function executeDecorators has 6 arguments (exceeds 4 allowed). Consider refactoring.
                                                  Open

                                                      function executeDecorators(fn, prog, container, depths, data, blockParams) {

                                                    Function prepareBlock has 6 arguments (exceeds 4 allowed). Consider refactoring.
                                                    Open

                                                        function prepareBlock(openBlock, program, inverseAndProgram, close, inverted, locInfo) {

                                                      Avoid deeply nested control flow statements.
                                                      Open

                                                                      if (priorKey !== undefined) {
                                                                        execIteration(priorKey, i - 1);
                                                                      }

                                                        Avoid deeply nested control flow statements.
                                                        Open

                                                                                    for (p in table[state]) if (this.terminals_[p] && p > 2) {
                                                                                        expected.push("'" + this.terminals_[p] + "'");
                                                                                    }

                                                          Function prepareMustache has 6 arguments (exceeds 4 allowed). Consider refactoring.
                                                          Open

                                                              function prepareMustache(path, params, hash, open, strip, locInfo) {

                                                            Function program has 5 arguments (exceeds 4 allowed). Consider refactoring.
                                                            Open

                                                                    program: function program(i, data, declaredBlockParams, blockParams, depths) {

                                                              Function resolvePath has 5 arguments (exceeds 4 allowed). Consider refactoring.
                                                              Open

                                                                    resolvePath: function resolvePath(type, parts, i, falsy, strict) {

                                                                Avoid too many return statements within this function.
                                                                Open

                                                                                            return 'END_RAW_BLOCK';

                                                                  Avoid too many return statements within this function.
                                                                  Open

                                                                                          yy_.yytext = strip(1, 2).replace(/\\'/g, "'");return 80;

                                                                    Avoid too many return statements within this function.
                                                                    Open

                                                                                            yy_.yytext = yy_.yytext.replace(/\\([\\\]])/g, '$1');return 72;

                                                                      Avoid too many return statements within this function.
                                                                      Open

                                                                                              return 14;

                                                                        Avoid too many return statements within this function.
                                                                        Open

                                                                                  return fn(context, options);

                                                                          Avoid too many return statements within this function.
                                                                          Open

                                                                                                  this.popState();return 33;

                                                                            Avoid too many return statements within this function.
                                                                            Open

                                                                                  return string.replace(badChars, escapeChar);

                                                                              Avoid too many return statements within this function.
                                                                              Open

                                                                                                      this.popState();return 44;

                                                                                Avoid too many return statements within this function.
                                                                                Open

                                                                                                        this.popState();return 54;

                                                                                  Avoid too many return statements within this function.
                                                                                  Open

                                                                                                          yy_.yytext = strip(1, 2).replace(/\\"/g, '"');return 80;

                                                                                    Avoid too many return statements within this function.
                                                                                    Open

                                                                                                            return this.parseError('Lexical error on line ' + (this.yylineno + 1) + '. Unrecognized text.\n' + this.showPosition(), { text: "", token: null, line: this.yylineno });

                                                                                      Avoid too many return statements within this function.
                                                                                      Open

                                                                                                              this.popState();return 44;

                                                                                        Avoid too many return statements within this function.
                                                                                        Open

                                                                                                                return 14;

                                                                                          Avoid too many return statements within this function.
                                                                                          Open

                                                                                                                  return 23;

                                                                                            There are no issues that match your filters.

                                                                                            Category
                                                                                            Status