jonahoffline/csv2api

View on GitHub

Showing 403 of 403 total issues

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

  this.countVisibleRows = function () {
    return instance.view.wt.drawn ? instance.view.wt.wtTable.rowStrategy.countVisible() : -1;
  };
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 1936..1938

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

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 "right":
          for(var rowRight = range.from.row; rowRight <=range.to.row; rowRight++){
            setBorder.call(this,rowRight, range.to.col, place);
          }
          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 11796..11800

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

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 "bottom":
          for(var bottomCol = range.from.col; bottomCol <= range.to.col; bottomCol++){
            setBorder.call(this, range.to.row, bottomCol, place);
          }
          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 11781..11785

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

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 "left":
          for(var rowLeft = range.from.row; rowLeft <=range.to.row; rowLeft++){
            setBorder.call(this,rowLeft, range.from.col, place);
          }
          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 11786..11790

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

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

WalkontableTableRenderer.prototype.renderRows = function (totalRows, cloneLimit, displayTds) {
  var lastTD, TR, res;
  var offsetRow = this.instance.getSetting('offsetRow');
  var visibleRowIndex = 0;
  var sourceRowIndex = this.rowFilter.visibleToSource(visibleRowIndex);
Severity: Minor
Found in lib/csv2api/public/js/jquery.handsontable.full.js - About 1 hr to fix

    Function MultiMap has 38 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

      function MultiMap() {
        var map = {
          arrayMap: [],
          weakMap: new WeakMap()
        };
    Severity: Minor
    Found in lib/csv2api/public/js/jquery.handsontable.full.js - About 1 hr to fix

      Function registerListeners has 38 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

      WalkontableScrollbars.prototype.registerListeners = function () {
        var that = this;
      
        var oldVerticalScrollPosition
          , oldHorizontalScrollPosition
      Severity: Minor
      Found in lib/csv2api/public/js/jquery.handsontable.full.js - About 1 hr to fix

        Function createCol has 38 lines of code (exceeds 25 allowed). Consider refactoring.
        Open

          Handsontable.DataMap.prototype.createCol = function (index, amount, createdAutomatically) {
            if (this.instance.dataType === 'object' || this.instance.getSettings().columns) {
              throw new Error("Cannot create new column. When data source in an object, " +
                "you can only have as much columns as defined in first data row, data schema or in the 'columns' setting." +
                "If you want to be able to add new columns, you have to use array datasource.");
        Severity: Minor
        Found in lib/csv2api/public/js/jquery.handsontable.full.js - About 1 hr to fix

          Function formatCurrency has 38 lines of code (exceeds 25 allowed). Consider refactoring.
          Open

              function formatCurrency (n, format, roundingFunction) {
                  var symbolIndex = format.indexOf('$'),
                      openParenIndex = format.indexOf('('),
                      minusSignIndex = format.indexOf('-'),
                      space = '',
          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

                    'undo': {
                      name: 'Undo',
                      callback: function(){
                        this.undo();
                      },
            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 8364..8372

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

            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.onDraw = function(force){
              if (force) { //force = did Walkontable decide to do full render
                Handsontable.hooks.run(this.instance, 'afterRender', this.instance.forceFullRender); //this.instance.forceFullRender = did Handsontable request full render?
              }
            };
            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 3145..3149

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

            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.beforeRender = function (force) {
              if (force) { //force = did Walkontable decide to do full render
                Handsontable.hooks.run(this.instance, 'beforeRender', this.instance.forceFullRender); //this.instance.forceFullRender = did Handsontable request full render?
              }
            };
            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 3151..3155

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

            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

                    'redo': {
                      name: 'Redo',
                      callback: function(){
                        this.redo();
                      },
            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 8355..8363

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

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

              Handsontable.DataMap.prototype.createRow = function (index, amount, createdAutomatically) {
                var row
                  , colCount = this.instance.countCols()
                  , numberOfCreatedRows = 0
                  , currentIndex;
            Severity: Minor
            Found in lib/csv2api/public/js/jquery.handsontable.full.js - About 1 hr to fix

              Function prepareBorder has 37 lines of code (exceeds 25 allowed). Consider refactoring.
              Open

                var prepareBorder = function (range, place) {
                  if (range.from.row == range.to.row && range.from.col == range.to.col){
                    if(place == "noBorders"){
                      removeBorder.call(this, range.from.row, range.from.col);
                    } else {
              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

                          callback: function(key, selection){
                            var amount = selection.end.col - selection.start.col + 1;
                            this.alter("remove_col", selection.start.col, amount);
                          },
                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 8330..8333

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

                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.isColumnBeforeViewport = function (c) {
                  return (this.columnFilter.sourceToVisible(c) < this.columnFilter.fixedCount && c >= this.columnFilter.fixedCount);
                };
                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 14878..14880

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

                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.getWindowScrollLeft = function () {
                  var res = window.scrollX;
                  if (res == void 0) { //IE8-11
                    res = document.documentElement.scrollLeft;
                  }
                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 2657..2663

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

                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.getWindowScrollTop = function () {
                  var res = window.scrollY;
                  if (res == void 0) { //IE8-11
                    res = document.documentElement.scrollTop;
                  }
                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 2665..2671

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

                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

                          callback: function(key, selection){
                            var amount = selection.end.row - selection.start.row + 1;
                            this.alter("remove_row", selection.start.row, amount);
                          },
                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 8343..8346

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

                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