jonahoffline/csv2api

View on GitHub

Showing 403 of 403 total issues

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

  if (this.instance.wtScrollbars.vertical.scrollHandler === window) {
    var box = this.instance.wtTable.hider.getBoundingClientRect();
    overlayContainer.style.top = Math.ceil(box.top, 10) + 'px';
    overlayContainer.style.height = Handsontable.Dom.outerHeight(this.clone.wtTable.TABLE) + 'px';
  }
Severity: Major
Found in lib/csv2api/public/js/jquery.handsontable.full.js and 1 other location - About 3 hrs to fix
lib/csv2api/public/js/jquery.handsontable.full.js on lines 14054..14058

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

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

function WalkontableBorder(instance, settings) {
  var style;

  if(!settings){
    return;
Severity: Major
Found in lib/csv2api/public/js/jquery.handsontable.full.js - About 3 hrs to fix

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

      isEmptyRow: function (r) {
        var val;
        for (var c = 0, clen = this.countCols(); c < clen; c++) {
          val = this.getDataAtCell(r, c);
          if (val !== '' && val !== null && typeof val !== 'undefined') {
    Severity: Major
    Found in lib/csv2api/public/js/jquery.handsontable.full.js and 1 other location - About 3 hrs to fix
    lib/csv2api/public/js/jquery.handsontable.full.js on lines 2187..2196

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

    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

      isEmptyCol: function (c) {
        var val;
        for (var r = 0, rlen = this.countRows(); r < rlen; r++) {
          val = this.getDataAtCell(r, c);
          if (val !== '' && val !== null && typeof val !== 'undefined') {
    Severity: Major
    Found in lib/csv2api/public/js/jquery.handsontable.full.js and 1 other location - About 3 hrs to fix
    lib/csv2api/public/js/jquery.handsontable.full.js on lines 2177..2186

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

    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

    CopyPasteClass.prototype._unbindEvent = (function () {
      if (window.jQuery) { //if jQuery exists, use jQuery event (for compatibility with $.trigger and $.triggerHandler, which can only trigger jQuery events - and we use that in tests)
        return function (elem, type, cb) {
          $(elem).off(type + '.copypaste', cb);
        };
    Severity: Major
    Found in lib/csv2api/public/js/jquery.handsontable.full.js and 1 other location - About 3 hrs to fix
    lib/csv2api/public/js/jquery.handsontable.full.js on lines 6823..6834

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

    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

    CopyPasteClass.prototype._bindEvent = (function () {
      if (window.jQuery) { //if jQuery exists, use jQuery event (for compatibility with $.trigger and $.triggerHandler, which can only trigger jQuery events - and we use that in tests)
        return function (elem, type, cb) {
          $(elem).on(type + '.copypaste', cb);
        };
    Severity: Major
    Found in lib/csv2api/public/js/jquery.handsontable.full.js and 1 other location - About 3 hrs to fix
    lib/csv2api/public/js/jquery.handsontable.full.js on lines 6836..6847

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

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

        populateFromArray: function (start, input, end, source, method) {
          var r, rlen, c, clen, setData = [], current = {};
          rlen = input.length;
          if (rlen === 0) {
            return false;
    Severity: Major
    Found in lib/csv2api/public/js/jquery.handsontable.full.js - About 3 hrs to fix

      Function onBeforeKeyDown has 75 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

        ContextMenu.prototype.onBeforeKeyDown = function (event) {
          var contextMenu = this;
          var instance = $(contextMenu.menu).handsontable('getInstance');
          var selection = instance.getSelected();
      
      
      Severity: Major
      Found in lib/csv2api/public/js/jquery.handsontable.full.js - About 3 hrs to fix

        Function CheckboxRenderer has 74 lines of code (exceeds 25 allowed). Consider refactoring.
        Open

          var CheckboxRenderer = function (instance, TD, row, col, prop, value, cellProperties) {
        
            if (typeof cellProperties.checkedTemplate === "undefined") {
              cellProperties.checkedTemplate = true;
            }
        Severity: Major
        Found in lib/csv2api/public/js/jquery.handsontable.full.js - About 2 hrs to fix

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

                if (this.instance.selection.isMultiple()) {
                  select = this.instance.view.wt.selections.area.getCorners();
                }
                else {
                  select = this.instance.view.wt.selections.current.getCorners();
          Severity: Major
          Found in lib/csv2api/public/js/jquery.handsontable.full.js and 1 other location - About 2 hrs to fix
          lib/csv2api/public/js/jquery.handsontable.full.js on lines 12231..12236

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

          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 _observe(observer, obj) {
                  if (Object.observe) {
                      Object.observe(obj, observer);
                      for (var key in obj) {
                          if (obj.hasOwnProperty(key)) {
          Severity: Major
          Found in lib/csv2api/public/js/jquery.handsontable.full.js and 1 other location - About 2 hrs to fix
          lib/csv2api/public/js/jquery.handsontable.full.js on lines 7153..7166

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

          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 _unobserve(observer, obj) {
                  if (Object.observe) {
                      Object.unobserve(obj, observer);
                      for (var key in obj) {
                          if (obj.hasOwnProperty(key)) {
          Severity: Major
          Found in lib/csv2api/public/js/jquery.handsontable.full.js and 1 other location - About 2 hrs to fix
          lib/csv2api/public/js/jquery.handsontable.full.js on lines 7138..7151

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

          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 (this.instance.selection.isMultiple()) {
                  select = this.instance.view.wt.selections.area.getCorners();
                }
                else {
                  select = this.instance.view.wt.selections.current.getCorners();
          Severity: Major
          Found in lib/csv2api/public/js/jquery.handsontable.full.js and 1 other location - About 2 hrs to fix
          lib/csv2api/public/js/jquery.handsontable.full.js on lines 12190..12195

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

          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 refreshLinePosition() {
              var instance = this;
              startWidth = parseInt(Handsontable.Dom.outerWidth(currentTH), 10);
              Handsontable.Dom.addClass(resizer, 'active');
              lineStyle.height = Handsontable.Dom.outerHeight(instance.$table[0]) + 'px';
          Severity: Major
          Found in lib/csv2api/public/js/jquery.handsontable.full.js and 1 other location - About 2 hrs to fix
          lib/csv2api/public/js/jquery.handsontable.full.js on lines 9768..9774

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

          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

              var refreshLinePosition = function() {
                var instance = this;
                startHeight = parseInt(Handsontable.Dom.outerHeight(currentTH), 10);
                Handsontable.Dom.addClass(resizer, 'active');
                lineStyle.width = Handsontable.Dom.outerWidth(instance.$table[0]) + 'px';
          Severity: Major
          Found in lib/csv2api/public/js/jquery.handsontable.full.js and 1 other location - About 2 hrs to fix
          lib/csv2api/public/js/jquery.handsontable.full.js on lines 9564..9570

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

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

            function CopyPastePlugin(instance) {
              this.copyPasteInstance = CopyPaste.getInstance();
          
              this.copyPasteInstance.onCut(onCut);
              this.copyPasteInstance.onPaste(onPaste);
          Severity: Major
          Found in lib/csv2api/public/js/jquery.handsontable.full.js - About 2 hrs to fix

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

            Handsontable.TableView.prototype.maximumVisibleElementHeight = function (topOffset) {
              this.wt.wtScrollbars.vertical.readWindowSize();
              var workspaceHeight = this.wt.wtViewport.getWorkspaceHeight();
              var maxHeight = workspaceHeight - topOffset;
              return maxHeight > 0 ? maxHeight : 0;
            Severity: Major
            Found in lib/csv2api/public/js/jquery.handsontable.full.js and 1 other location - About 2 hrs to fix
            lib/csv2api/public/js/jquery.handsontable.full.js on lines 3236..3241

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

            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.TableView.prototype.maximumVisibleElementWidth = function (leftOffset) {
              this.wt.wtScrollbars.horizontal.readWindowSize();
              var workspaceWidth = this.wt.wtViewport.getWorkspaceWidth();
              var maxWidth = workspaceWidth - leftOffset;
              return maxWidth > 0 ? maxWidth : 0;
            Severity: Major
            Found in lib/csv2api/public/js/jquery.handsontable.full.js and 1 other location - About 2 hrs to fix
            lib/csv2api/public/js/jquery.handsontable.full.js on lines 3248..3253

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

            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 Handsontable.helper.keyCode.ARROW_DOWN:
            
                    var nextOption = editor.select.find('option:selected').next();
            
                    if (nextOption.length == 1){
            Severity: Major
            Found in lib/csv2api/public/js/jquery.handsontable.full.js and 1 other location - About 2 hrs to fix
            lib/csv2api/public/js/jquery.handsontable.full.js on lines 6063..6073

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

            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 Handsontable.helper.keyCode.ARROW_UP:
            
                    var previousOption = editor.select.find('option:selected').prev();
            
                    if (previousOption.length == 1){
            Severity: Major
            Found in lib/csv2api/public/js/jquery.handsontable.full.js and 1 other location - About 2 hrs to fix
            lib/csv2api/public/js/jquery.handsontable.full.js on lines 6075..6085

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

            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