Ygilany/paw-apidoc-generator

View on GitHub

Showing 67 of 67 total issues

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

Similar blocks of code found in 2 locations. Consider refactoring.
Open

                    case 14:
                        this.$ = yy.prepareBlock($$[$0 - 3], $$[$0 - 2], $$[$0 - 1], $$[$0], true, this._$);
                        break;
Severity: Major
Found in external_libs/handlebars.js and 1 other location - About 1 hr to fix
external_libs/handlebars.js on lines 1456..1458

Duplicated Code

Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

Tuning

This issue has a mass of 61.

We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

Refactorings

Further Reading

Similar blocks of code found in 2 locations. Consider refactoring.
Open

                    case 13:
                        this.$ = yy.prepareBlock($$[$0 - 3], $$[$0 - 2], $$[$0 - 1], $$[$0], false, this._$);
                        break;
Severity: Major
Found in external_libs/handlebars.js and 1 other location - About 1 hr to fix
external_libs/handlebars.js on lines 1459..1461

Duplicated Code

Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

Tuning

This issue has a mass of 61.

We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

Refactorings

Further Reading

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

Similar blocks of code found in 2 locations. Consider refactoring.
Open

                    case 10:
                        this.$ = {
                            type: 'ContentStatement',
                            original: $$[$0],
                            value: $$[$0],
Severity: Major
Found in external_libs/handlebars.js and 1 other location - About 1 hr to fix
external_libs/handlebars.js on lines 1543..1545

Duplicated Code

Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

Tuning

This issue has a mass of 57.

We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

Refactorings

Further Reading

Similar blocks of code found in 2 locations. Consider refactoring.
Open

                    case 35:
                        this.$ = { type: 'StringLiteral', value: $$[$0], original: $$[$0], loc: yy.locInfo(this._$) };
                        break;
Severity: Major
Found in external_libs/handlebars.js and 1 other location - About 1 hr to fix
external_libs/handlebars.js on lines 1441..1449

Duplicated Code

Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

Tuning

This issue has a mass of 57.

We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

Refactorings

Further Reading

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

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

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

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

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

            performAction: function anonymous(yytext, yyleng, yylineno, yy, yystate, $$, _$
Severity: Major
Found in external_libs/handlebars.js - About 50 mins to fix

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

    function wrapProgram(container, i, fn, data, declaredBlockParams, blockParams, depths) {
Severity: Major
Found in external_libs/handlebars.js - About 50 mins to fix

Similar blocks of code found in 2 locations. Consider refactoring.
Open

                    case 25:
                        this.$ = yy.preparePartialBlock($$[$0 - 2], $$[$0 - 1], $$[$0], this._$);
                        break;
Severity: Minor
Found in external_libs/handlebars.js and 1 other location - About 50 mins to fix
external_libs/handlebars.js on lines 1450..1452

Duplicated Code

Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

Tuning

This issue has a mass of 51.

We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

Refactorings

Further Reading

Similar blocks of code found in 2 locations. Consider refactoring.
Open

                    case 11:
                        this.$ = yy.prepareRawBlock($$[$0 - 2], $$[$0 - 1], $$[$0], this._$);
                        break;
Severity: Minor
Found in external_libs/handlebars.js and 1 other location - About 50 mins to fix
external_libs/handlebars.js on lines 1506..1508

Duplicated Code

Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

Tuning

This issue has a mass of 51.

We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

Refactorings

Further Reading

Avoid deeply nested control flow statements.
Open

                if (priorKey !== undefined) {
                  execIteration(priorKey, i - 1);
                }
Severity: Major
Found in external_libs/handlebars.js - About 45 mins to fix
Severity
Category
Status
Source
Language