Ygilany/paw-apidoc-generator

View on GitHub

Showing 48 of 67 total issues

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

/*!

 handlebars v4.0.5

Copyright (C) 2011-2015 by Yehuda Katz
Severity: Major
Found in external_libs/handlebars.js - About 1 wk to fix

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" },
Severity: Major
Found in external_libs/handlebars.js - About 3 days to fix

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);
Severity: Major
Found in external_libs/handlebars.js - About 1 day to fix

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) {
Severity: Major
Found in external_libs/handlebars.js - About 1 day to fix

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);
Severity: Major
Found in external_libs/handlebars.js - About 6 hrs to fix

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');
      }
Severity: Major
Found in external_libs/handlebars.js - About 5 hrs to fix

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 = [],
Severity: Major
Found in external_libs/handlebars.js - About 4 hrs to fix

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;
Severity: Major
Found in external_libs/handlebars.js - About 4 hrs to fix

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

      setupParams: function setupParams(helper, paramSize, params) {
        var options = {},
            contexts = [],
            types = [],
            ids = [],
Severity: Major
Found in external_libs/handlebars.js - About 2 hrs to fix

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,
Severity: Minor
Found in external_libs/handlebars.js - About 2 hrs to fix

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;
Severity: Minor
Found in external_libs/handlebars.js - About 1 hr to fix

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.
Severity: Minor
Found in external_libs/handlebars.js - About 1 hr to fix

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;
Severity: Minor
Found in external_libs/handlebars.js - About 1 hr to fix

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);
Severity: Minor
Found in external_libs/handlebars.js - About 1 hr to fix

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);
      }

Severity: Minor
Found in external_libs/handlebars.js - About 1 hr to fix

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) {
Severity: Minor
Found in external_libs/handlebars.js - About 1 hr to fix

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

const APIDocGenerator = function () {
    this.generate = function (context, requests, options) {

        const request = context.getCurrentRequest();

Severity: Minor
Found in ApiDocGenerator.js - About 1 hr to fix

Function generate has 29 lines of code (exceeds 25 allowed). Consider refactoring.
Open

    this.generate = function (context, requests, options) {

        const request = context.getCurrentRequest();

        const headers = [];
Severity: Minor
Found in ApiDocGenerator.js - About 1 hr to fix

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 = [],
Severity: Minor
Found in external_libs/handlebars.js - About 1 hr to fix

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) {
Severity: Minor
Found in external_libs/handlebars.js - About 1 hr to fix
Severity
Category
Status
Source
Language