jonahoffline/csv2api

View on GitHub

Showing 403 of 403 total issues

Function setupListening has 47 lines of code (exceeds 25 allowed). Consider refactoring.
Open

  var setupListening = function (instance) {
    instance.dragToScrollListening = false;
    var scrollHandler = instance.view.wt.wtScrollbars.vertical.scrollHandler; //native scroll
    dragToScroll = new DragToScroll();
    if (scrollHandler === window) {
Severity: Minor
Found in lib/csv2api/public/js/jquery.handsontable.full.js - About 1 hr to fix

    Function UndoRedo has 46 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

      Handsontable.UndoRedo = function (instance) {
        var plugin = this;
        this.instance = instance;
        this.doneActions = [];
        this.undoneActions = [];
    Severity: Minor
    Found in lib/csv2api/public/js/jquery.handsontable.full.js - About 1 hr to fix

      Function Hooks has 45 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

        var Hooks = function () {
          return {
            // Hooks
            beforeInitWalkontable: [],
      
      
      Severity: Minor
      Found in lib/csv2api/public/js/jquery.handsontable.full.js - About 1 hr to fix

        Function loadData has 45 lines of code (exceeds 25 allowed). Consider refactoring.
        Open

          this.loadData = function (data) {
            if (typeof data === 'object' && data !== null) {
              if (!(data.push && data.splice)) { //check if data is array. Must use duck-type check so Backbone Collections also pass it
                //when data is not an array, attempt to make a single-row array of it
                data = [data];
        Severity: Minor
        Found in lib/csv2api/public/js/jquery.handsontable.full.js - About 1 hr to fix

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

          Handsontable.helper.isDescendant = function (parent, child) {
            var node = child.parentNode;
            while (node != null) {
              if (node == parent) {
                return true;
          Severity: Major
          Found in lib/csv2api/public/js/jquery.handsontable.full.js and 1 other location - About 1 hr to fix
          lib/csv2api/public/js/jquery.handsontable.full.js on lines 2341..2350

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

          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

          Handsontable.Dom.isChildOf = function (child, parent) {
            var node = child.parentNode;
            while (node != null) {
              if (node == parent) {
                return true;
          Severity: Major
          Found in lib/csv2api/public/js/jquery.handsontable.full.js and 1 other location - About 1 hr to fix
          lib/csv2api/public/js/jquery.handsontable.full.js on lines 3841..3850

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

          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 draw has 44 lines of code (exceeds 25 allowed). Consider refactoring.
          Open

          WalkontableTable.prototype.draw = function (selectionsOnly) {
            if (!selectionsOnly) {
              if (this.isWorkingOnClone()) {
                this.tableOffset = this.instance.cloneSource.wtTable.tableOffset;
              }
          Severity: Minor
          Found in lib/csv2api/public/js/jquery.handsontable.full.js - About 1 hr to fix

            Function transformStart has 44 lines of code (exceeds 25 allowed). Consider refactoring.
            Open

                transformStart: function (rowDelta, colDelta, force) {
                  var delta = new WalkontableCellCoords(rowDelta, colDelta);
                  instance.runHooks('modifyTransformStart', delta);
            
                  if (priv.selRange.highlight.row + rowDelta > instance.countRows() - 1) {
            Severity: Minor
            Found in lib/csv2api/public/js/jquery.handsontable.full.js - About 1 hr to fix

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

                      add: function (patches, path) {
                          var patch = {
                              op: "add",
                              path: path + escapePathComponent(this.name),
                              value: this.object[this.name]
              Severity: Major
              Found in lib/csv2api/public/js/jquery.handsontable.full.js and 1 other location - About 1 hr to fix
              lib/csv2api/public/js/jquery.handsontable.full.js on lines 6928..6935

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

              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

              WalkontableTable.prototype.isLastColumnFullyVisible = function () {
                return (this.getLastVisibleColumn() === this.instance.getSetting('totalColumns') - 1 && !this.getColumnStrategy().isLastIncomplete());
              };
              Severity: Major
              Found in lib/csv2api/public/js/jquery.handsontable.full.js and 1 other location - About 1 hr to fix
              lib/csv2api/public/js/jquery.handsontable.full.js on lines 14902..14904

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

              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

                    if (!priv.settings.columns && instance.dataType === 'array' && emptyCols < priv.settings.minSpareCols) {
                      for (; emptyCols < priv.settings.minSpareCols && instance.countCols() < priv.settings.maxCols; emptyCols++) {
                        datamap.createCol(instance.countCols(), 1, true);
                      }
                    }
              Severity: Major
              Found in lib/csv2api/public/js/jquery.handsontable.full.js and 1 other location - About 1 hr to fix
              lib/csv2api/public/js/jquery.handsontable.full.js on lines 341..345

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

              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

              WalkontableTable.prototype.isLastRowFullyVisible = function () {
                return (this.getLastVisibleRow() === this.instance.getSetting('totalRows') - 1 && !this.getRowStrategy().isLastIncomplete());
              };
              Severity: Major
              Found in lib/csv2api/public/js/jquery.handsontable.full.js and 1 other location - About 1 hr to fix
              lib/csv2api/public/js/jquery.handsontable.full.js on lines 14906..14908

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

              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

                    if (emptyRows < priv.settings.minSpareRows) {
                      for (; emptyRows < priv.settings.minSpareRows && instance.countRows() < priv.settings.maxRows; emptyRows++) {
                        datamap.createRow(instance.countRows(), 1, true);
                      }
                    }
              Severity: Major
              Found in lib/csv2api/public/js/jquery.handsontable.full.js and 1 other location - About 1 hr to fix
              lib/csv2api/public/js/jquery.handsontable.full.js on lines 358..362

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

              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

                      update: function (patches, path) {
                          var patch = {
                              op: "replace",
                              path: path + escapePathComponent(this.name),
                              value: this.object[this.name]
              Severity: Major
              Found in lib/csv2api/public/js/jquery.handsontable.full.js and 1 other location - About 1 hr to fix
              lib/csv2api/public/js/jquery.handsontable.full.js on lines 6913..6920

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

              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

                  if (height !== void 0 && height !== null) {
                    switch (typeof height) {
                      case 'object': //array
                        height = height[row];
                        break;
              Severity: Major
              Found in lib/csv2api/public/js/jquery.handsontable.full.js and 1 other location - About 1 hr to fix
              lib/csv2api/public/js/jquery.handsontable.full.js on lines 1800..1813

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

              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

                  style.height = (this.settings[position] && this.settings[position].width) ? this.settings[position].width + 'px' : settings.border.width + 'px';
              Severity: Major
              Found in lib/csv2api/public/js/jquery.handsontable.full.js and 1 other location - About 1 hr to fix
              lib/csv2api/public/js/jquery.handsontable.full.js on lines 12519..12519

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

              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 4 locations. Consider refactoring.
              Open

                    if (coords.row < 0) {
                      coords.row = 0;
                    }
                    else if (coords.row > 0 && coords.row >= totalRows) {
                      coords.row = totalRows - 1;
              Severity: Major
              Found in lib/csv2api/public/js/jquery.handsontable.full.js and 3 other locations - About 1 hr to fix
              lib/csv2api/public/js/jquery.handsontable.full.js on lines 667..672
              lib/csv2api/public/js/jquery.handsontable.full.js on lines 688..693
              lib/csv2api/public/js/jquery.handsontable.full.js on lines 695..700

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

              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 4 locations. Consider refactoring.
              Open

                      if (coords.row < 0) {
                        coords.row = 0;
                      }
                      else if (coords.row > 0 && coords.row >= totalRows) {
                        coords.row = totalRows - 1;
              Severity: Major
              Found in lib/csv2api/public/js/jquery.handsontable.full.js and 3 other locations - About 1 hr to fix
              lib/csv2api/public/js/jquery.handsontable.full.js on lines 660..665
              lib/csv2api/public/js/jquery.handsontable.full.js on lines 667..672
              lib/csv2api/public/js/jquery.handsontable.full.js on lines 695..700

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

              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

                  if (col === void 0) {
                    var out = [];
                    for (var i = 0, ilen = instance.countCols(); i < ilen; i++) {
                      out.push(instance.getColHeader(i));
                    }
              Severity: Major
              Found in lib/csv2api/public/js/jquery.handsontable.full.js and 1 other location - About 1 hr to fix
              lib/csv2api/public/js/jquery.handsontable.full.js on lines 1709..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 69.

              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

                  style.width = (this.settings[position] && this.settings[position].width) ? this.settings[position].width + 'px' : settings.border.width + 'px';
              Severity: Major
              Found in lib/csv2api/public/js/jquery.handsontable.full.js and 1 other location - About 1 hr to fix
              lib/csv2api/public/js/jquery.handsontable.full.js on lines 12518..12518

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

              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