jonahoffline/csv2api

View on GitHub

Showing 403 of 403 total issues

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

      else if (Object.prototype.toString.call(priv.settings.colHeaders) === '[object Array]' && priv.settings.colHeaders[col] !== void 0) {
        return priv.settings.colHeaders[col];
      }
      else if (typeof priv.settings.colHeaders === 'function') {
        return priv.settings.colHeaders(col);
Severity: Minor
Found in lib/csv2api/public/js/jquery.handsontable.full.js and 1 other location - About 50 mins to fix
lib/csv2api/public/js/jquery.handsontable.full.js on lines 1716..1727

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

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

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

    if (!priv.cellSettings[row][col]) {
      priv.cellSettings[row][col] = new priv.columnSettings[col]();
    }
Severity: Minor
Found in lib/csv2api/public/js/jquery.handsontable.full.js and 1 other location - About 50 mins to fix
lib/csv2api/public/js/jquery.handsontable.full.js on lines 1620..1622

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

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

    if (!priv.cellSettings[row][col]) {
      priv.cellSettings[row][col] = new priv.columnSettings[col]();
    }
Severity: Minor
Found in lib/csv2api/public/js/jquery.handsontable.full.js and 1 other location - About 50 mins to fix
lib/csv2api/public/js/jquery.handsontable.full.js on lines 1592..1594

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

                billionRegExp = new RegExp('[^a-zA-Z]' + languages[currentLanguage].abbreviations.billion + '(?:\\)|(\\' + languages[currentLanguage].currency.symbol + ')?(?:\\))?)?$');
Severity: Minor
Found in lib/csv2api/public/js/jquery.handsontable.full.js and 1 other location - About 50 mins to fix
lib/csv2api/public/js/jquery.handsontable.full.js on lines 15591..15591

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

                millionRegExp = new RegExp('[^a-zA-Z]' + languages[currentLanguage].abbreviations.million + '(?:\\)|(\\' + languages[currentLanguage].currency.symbol + ')?(?:\\))?)?$');
Severity: Minor
Found in lib/csv2api/public/js/jquery.handsontable.full.js and 1 other location - About 50 mins to fix
lib/csv2api/public/js/jquery.handsontable.full.js on lines 15592..15592

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

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

  BaseEditor.prototype.prepare = function(row, col, prop, td, originalValue, cellProperties){
Severity: Minor
Found in lib/csv2api/public/js/jquery.handsontable.full.js - About 45 mins to fix

    Avoid deeply nested control flow statements.
    Open

              if (topLeft[dim] == currentSelectedRange.highlight[dim]) {
                examinedCol = bottomRight[dim] + delta[dim];
                expanding = true;
              }
              else {
    Severity: Major
    Found in lib/csv2api/public/js/jquery.handsontable.full.js - About 45 mins to fix

      Avoid deeply nested control flow statements.
      Open

              else if (source_r >= corners[0] && source_r <= corners[2]) {
                //selection is in this row
                instance.wtTable.currentCellCache.add(r, c, this.settings.highlightRowClassName);
      
                // selected row headers
      Severity: Major
      Found in lib/csv2api/public/js/jquery.handsontable.full.js - About 45 mins to fix

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

          HandsontableEditor.prototype.prepare = function (td, row, col, prop, value, cellProperties) {
        Severity: Minor
        Found in lib/csv2api/public/js/jquery.handsontable.full.js - About 45 mins to fix

          Avoid deeply nested control flow statements.
          Open

                              if (activeEditor.state !== Handsontable.EditorState.WAITING){
                                that.closeEditorAndSaveChanges(ctrlDown);
                              }
          Severity: Major
          Found in lib/csv2api/public/js/jquery.handsontable.full.js - About 45 mins to fix

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

            var afterRenderer = function (TD, row, col, prop, value, cellProperties) {
            Severity: Minor
            Found in lib/csv2api/public/js/jquery.handsontable.full.js - About 45 mins to fix

              Avoid deeply nested control flow statements.
              Open

                          if(typeof cellProperties.language == 'undefined') {
                            numeral.language('en');
                          } else {
                            numeral.language(cellProperties.language);
                          }
              Severity: Major
              Found in lib/csv2api/public/js/jquery.handsontable.full.js - About 45 mins to fix

                Avoid deeply nested control flow statements.
                Open

                            for (var i = topLeft[altDim]; i <= bottomRight[altDim]; i++) {
                              var mergeParent = this.mergedCellInfoCollection.getInfo(i, bottomRight[dim]);
                              if (mergeParent) {
                                if (mergeParent[dim] <= currentSelectedRange.highlight[dim]) {
                                  examinedCol = topLeft[dim] + delta[dim];
                Severity: Major
                Found in lib/csv2api/public/js/jquery.handsontable.full.js - About 45 mins to fix

                  Avoid deeply nested control flow statements.
                  Open

                              if (expanding) {
                                if (delta[dim] > 0) { //moving East wall further East
                                  changeCoords(currentSelectedRange.from, Math.min(topLeft[altDim], mergeParent[altDim]), Math.min(topLeft[dim], mergeParent[dim]));
                                  if (examinedCol > mergeParent[dim]) {
                                    changeCoords(currentSelectedRange.to, Math.max(bottomRight[altDim], mergeParent[altDim] + mergeParent[altDim + "span"] - 1), Math.max(bottomRight[dim], mergeParent[dim] + mergeParent[dim + "span"]));
                  Severity: Major
                  Found in lib/csv2api/public/js/jquery.handsontable.full.js - About 45 mins to fix

                    Avoid deeply nested control flow statements.
                    Open

                              if (this.settings.className) {
                                instance.wtTable.currentCellCache.add(r, c, this.settings.className);
                              }
                    Severity: Major
                    Found in lib/csv2api/public/js/jquery.handsontable.full.js - About 45 mins to fix

                      Avoid deeply nested control flow statements.
                      Open

                                if (typeof cell == 'object' ) Handsontable.Dom.addClass(cell,classNames[s]);
                      Severity: Major
                      Found in lib/csv2api/public/js/jquery.handsontable.full.js - About 45 mins to fix

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

                        WalkontableScroll.prototype.scrollLogicVertical = function (delta, offset, total, fixedCount, maxSize, cellSizeFn) {
                        Severity: Minor
                        Found in lib/csv2api/public/js/jquery.handsontable.full.js - About 45 mins to fix

                          Avoid deeply nested control flow statements.
                          Open

                                              if (instance.getSettings().enterBeginsEditing){
                                                that.openEditor();
                                              } else {
                                                moveSelectionAfterEnter(event.shiftKey);
                                              }
                          Severity: Major
                          Found in lib/csv2api/public/js/jquery.handsontable.full.js - About 45 mins to fix

                            Avoid deeply nested control flow statements.
                            Open

                                          if(checkbox.length > 0 && !cellProperties.readOnly){
                            
                                            if(!event.isImmediatePropagationStopped()){
                                              event.stopImmediatePropagation();
                                              event.preventDefault();
                            Severity: Major
                            Found in lib/csv2api/public/js/jquery.handsontable.full.js - About 45 mins to fix

                              Avoid deeply nested control flow statements.
                              Open

                                      else if (selectionsOnly && this.oldCellCache.test(vr, vc, classNames[s])) {
                                        cell = this.getCell(new WalkontableCellCoords(r, c));
                                        if (typeof cell == 'object' ) Handsontable.Dom.removeClass(cell, classNames[s]);
                              
                                      }
                              Severity: Major
                              Found in lib/csv2api/public/js/jquery.handsontable.full.js - About 45 mins to fix
                                Severity
                                Category
                                Status
                                Source
                                Language