Showing 282 of 282 total issues

Avoid deeply nested control flow statements.
Open

              if (stringBlocks[j].indexOf('{{#') >= 0) {
                depth += 1;
              }
Severity: Major
Found in src/_helpers/template7.js - About 45 mins to fix

    Avoid deeply nested control flow statements.
    Open

                  if (shiftIndex) { i = shiftIndex; }
    Severity: Major
    Found in src/_helpers/template7.js - About 45 mins to fix

      Avoid deeply nested control flow statements.
      Open

                    if (helperName === 'raw') {
                      blocks.push({
                        type: 'plain',
                        content: helperContent,
                      });
      Severity: Major
      Found in src/_helpers/template7.js - About 45 mins to fix

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

                add: function(x, y, blockType, blockVariation, blockIndex, blockOrientation) {
        Severity: Minor
        Found in src/assets/js/games/blockrain/blockrain.jquery.js - About 45 mins to fix

          Avoid deeply nested control flow statements.
          Open

                        if (helperParts[j].indexOf(openingQuote) >= 0) {
                          shiftIndex = j;
                          slices.push(part);
                          break;
                        }
          Severity: Major
          Found in src/_helpers/template7.js - About 45 mins to fix

            Avoid deeply nested control flow statements.
            Open

                            if( game._checkCollisions(x, y + 1, blocks, true) ) {
                              // collision
                              score = scoreBlocks(possibles, blocks, x, y, filled, width, height);
                              if (score > best_score_for_shape) {
                                best_score_for_shape = score;
            Severity: Major
            Found in src/assets/js/games/blockrain/blockrain.jquery.js - About 45 mins to fix

              Avoid deeply nested control flow statements.
              Open

                                                          if (n.dataFilter == v) return t;
              Severity: Major
              Found in src/assets/js/games/tower/main.js - About 45 mins to fix

                Avoid deeply nested control flow statements.
                Open

                                  if (y + blocks[i] < 0) {
                                    gameOver = true;
                                  }
                Severity: Major
                Found in src/assets/js/games/blockrain/blockrain.jquery.js - About 45 mins to fix

                  Avoid deeply nested control flow statements.
                  Open

                                if (stringBlocks[j].indexOf('{{/') >= 0) {
                                  depth -= 1;
                                }
                  Severity: Major
                  Found in src/_helpers/template7.js - About 45 mins to fix

                    Avoid deeply nested control flow statements.
                    Open

                                if (shiftIndex) { i = shiftIndex; }
                    Severity: Major
                    Found in src/_helpers/template7.js - About 45 mins to fix

                      Avoid deeply nested control flow statements.
                      Open

                                                          if (n) return p(n, "parsererror", k, y, b)
                      Severity: Major
                      Found in src/assets/js/games/tower/main.js - About 45 mins to fix

                        Avoid deeply nested control flow statements.
                        Open

                                      if (stringBlocks[j].indexOf(("{{#" + helperName)) >= 0) {
                                        helperContent += stringBlocks[j];
                                        if (foundElse) { elseContent += stringBlocks[j]; }
                                        toSkip += 1;
                                      } else if (stringBlocks[j].indexOf(("{{/" + helperName)) >= 0) {
                        Severity: Major
                        Found in src/_helpers/template7.js - About 45 mins to fix

                          Avoid deeply nested control flow statements.
                          Open

                                      if (isPartial) {
                                        helperName = '_partial';
                                        if (helperContext[0]) {
                                          if (helperContext[0].indexOf('[') === 0) { helperContext[0] = helperContext[0].replace(/[[\]]/g, ''); }
                                          else { helperContext[0] = "\"" + (helperContext[0].replace(/"|'/g, '')) + "\""; }
                          Severity: Major
                          Found in src/_helpers/template7.js - About 45 mins to fix

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

                                  var func = function(filled, checkCollisions, width, height, mode, _one_shape) {
                            Severity: Minor
                            Found in src/assets/js/games/blockrain/blockrain.jquery.js - About 45 mins to fix

                              Avoid deeply nested control flow statements.
                              Open

                                          for (j = i + 1; j < helperParts.length; j += 1) {
                                            hashContent += " " + (helperParts[j]);
                                            if (helperParts[j].indexOf(openingQuote) >= 0) {
                                              shiftIndex = j;
                                              break;
                              Severity: Major
                              Found in src/_helpers/template7.js - About 45 mins to fix

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

                                    function getCompileInverse(block, newDepth) {
                                      if (block.inverseContent) { return t.compile(block.inverseContent, newDepth); }
                                      return function empty() { return ''; };
                                    }
                                Severity: Minor
                                Found in src/_helpers/template7.js and 1 other location - About 45 mins to fix
                                src/_helpers/template7.js on lines 524..527

                                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 50.

                                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

                                    public getItemsByCategory(catid: number) {
                                        return this.http.get(this.api.get('items', `?catid=${catid}`));
                                    }
                                Severity: Minor
                                Found in src/modules/faq/faq.service.ts and 1 other location - About 45 mins to fix
                                src/modules/faq/faq.service.ts on lines 17..19

                                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 50.

                                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

                                    public getItemsByParentCategory(pcatid: number) {
                                        return this.http.get(this.api.get('items', `?pcatid=${pcatid}`));
                                    }
                                Severity: Minor
                                Found in src/modules/faq/faq.service.ts and 1 other location - About 45 mins to fix
                                src/modules/faq/faq.service.ts on lines 13..15

                                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 50.

                                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

                                    function getCompileFn(block, newDepth) {
                                      if (block.content) { return t.compile(block.content, newDepth); }
                                      return function empty() { return ''; };
                                    }
                                Severity: Minor
                                Found in src/_helpers/template7.js and 1 other location - About 45 mins to fix
                                src/_helpers/template7.js on lines 528..531

                                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 50.

                                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

                                    renderDetails(data, callback?): void {
                                        this.template.render(detailsTemplate, data, $('#weather-details'), 'html', function () {
                                            if (typeof callback === 'function')
                                                callback(data);
                                        });
                                Severity: Minor
                                Found in src/modules/weather/weather.module.ts and 1 other location - About 40 mins to fix
                                src/modules/quran/quran.module.ts on lines 108..113

                                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 49.

                                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

                                Severity
                                Category
                                Status
                                Source
                                Language