jonahoffline/csv2api

View on GitHub

Showing 403 of 403 total issues

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

WalkontableTable.prototype.isRowBeforeViewport = function (r) {
  return (this.rowFilter.sourceToVisible(r) < this.rowFilter.fixedCount && r >= this.rowFilter.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 14886..14888

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

Function handsontable has 36 lines of code (exceeds 25 allowed). Consider refactoring.
Open

$.fn.handsontable = function (action) {
  var i
    , ilen
    , args
    , output
Severity: Minor
Found in lib/csv2api/public/js/jquery.handsontable.full.js - About 1 hr to fix

    Function Storage has 35 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

    function Storage(prefix) {
    
      var savedKeys;
    
      var saveSavedKeys = function () {
    Severity: Minor
    Found in lib/csv2api/public/js/jquery.handsontable.full.js - About 1 hr to fix

      Function parse has 35 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

          parse: function (str) {
            var r, rlen, rows, arr = [], a = 0, c, clen, multiline, last;
            rows = str.split('\n');
            if (rows.length > 1 && rows[rows.length - 1] === '') {
              rows.pop();
      Severity: Minor
      Found in lib/csv2api/public/js/jquery.handsontable.full.js - About 1 hr to fix

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

          Handsontable.UndoRedo.RemoveColumnAction.prototype.redo = function (instance, redoneCallback) {
            instance.addHookOnce('afterRemoveCol', redoneCallback);
            instance.alter('remove_col', this.index, this.amount);
          };
        Severity: Major
        Found in lib/csv2api/public/js/jquery.handsontable.full.js and 2 other locations - About 1 hr to fix
        lib/csv2api/public/js/jquery.handsontable.full.js on lines 10424..10427
        lib/csv2api/public/js/jquery.handsontable.full.js on lines 10457..10460

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

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

          Handsontable.UndoRedo.CreateRowAction.prototype.undo = function (instance, undoneCallback) {
            instance.addHookOnce('afterRemoveRow', undoneCallback);
            instance.alter('remove_row', this.index, this.amount);
          };
        Severity: Major
        Found in lib/csv2api/public/js/jquery.handsontable.full.js and 2 other locations - About 1 hr to fix
        lib/csv2api/public/js/jquery.handsontable.full.js on lines 10457..10460
        lib/csv2api/public/js/jquery.handsontable.full.js on lines 10494..10497

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

        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

                  delta.row = priv.selRange.highlight.row + delta.row == instance.countRows() - 1 ? 1 - instance.countRows() : 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 634..634

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

        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

                  delta.col = priv.selRange.highlight.col + delta.col == instance.countCols() - 1 ? 1 - instance.countCols() : 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 647..647

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

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

          Handsontable.UndoRedo.CreateColumnAction.prototype.undo = function (instance, undoneCallback) {
            instance.addHookOnce('afterRemoveCol', undoneCallback);
            instance.alter('remove_col', this.index, this.amount);
          };
        Severity: Major
        Found in lib/csv2api/public/js/jquery.handsontable.full.js and 2 other locations - About 1 hr to fix
        lib/csv2api/public/js/jquery.handsontable.full.js on lines 10424..10427
        lib/csv2api/public/js/jquery.handsontable.full.js on lines 10494..10497

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

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

          this.init = function (source) {
            var instance = this;
            var sortingSettings = instance.getSettings().columnSorting;
            var sortingColumn, sortingOrder;
        
        
        Severity: Minor
        Found in lib/csv2api/public/js/jquery.handsontable.full.js - About 1 hr to fix

          Function prepareBorderFromCustomAddedRange has 34 lines of code (exceeds 25 allowed). Consider refactoring.
          Open

            var prepareBorderFromCustomAddedRange = function (rowObj) {
              var range = rowObj.range;
          
              for (var row = range.from.row; row <= range.to.row; row ++) {
                for (var col = range.from.col; col<= range.to.col; col++){
          Severity: Minor
          Found in lib/csv2api/public/js/jquery.handsontable.full.js - About 1 hr to fix

            Function Walkontable has 34 lines of code (exceeds 25 allowed). Consider refactoring.
            Open

            function Walkontable(settings) {
              var originalHeaders = [];
            
              this.guid = 'wt_' + walkontableRandomString(); //this is the namespace for global events
            
            
            Severity: Minor
            Found in lib/csv2api/public/js/jquery.handsontable.full.js - About 1 hr to fix

              Function _generate has 34 lines of code (exceeds 25 allowed). Consider refactoring.
              Open

                  function _generate(mirror, obj, patches, path) {
                      var newKeys = _objectKeys(obj);
                      var oldKeys = _objectKeys(mirror);
                      var changed = false;
                      var deleted = false;
              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

                          else { //shrinking East wall towards West
                            changeCoords(currentSelectedRange.from, topLeft[altDim], topLeft[dim]);
                            changeCoords(currentSelectedRange.to, bottomRight[altDim], Math.min(bottomRight[dim], examinedCol));
                            updateCornerInfo();
                          }
                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 11240..11244

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

                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 (delta[dim] > 0) { //moving East wall further East
                            changeCoords(currentSelectedRange.from, topLeft[altDim], topLeft[dim]);
                            changeCoords(currentSelectedRange.to, bottomRight[altDim], Math.max(bottomRight[dim], examinedCol));
                            updateCornerInfo();
                          }
                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 11258..11262

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

                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

                      else if (cell.TD === dblClickOrigin[0]) {
                        dblClickOrigin[1] = cell.TD;
                        clearTimeout(dblClickTimeout[1]);
                        dblClickTimeout[1] = setTimeout(function () {
                          dblClickOrigin[1] = null;
                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 13350..13356

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

                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

                          else { //moving West wall further West
                            changeCoords(currentSelectedRange.from, topLeft[altDim], Math.min(topLeft[dim], examinedCol));
                            changeCoords(currentSelectedRange.to, bottomRight[altDim], bottomRight[dim]);
                            updateCornerInfo();
                          }
                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 11253..11257

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

                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 (delta[dim] > 0) { //shrinking West wall towards East
                            changeCoords(currentSelectedRange.from, topLeft[altDim], Math.max(topLeft[dim], examinedCol));
                            changeCoords(currentSelectedRange.to, bottomRight[altDim], bottomRight[dim]);
                            updateCornerInfo();
                          }
                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 11245..11249

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

                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 (cell.TD) {
                        dblClickOrigin[0] = cell.TD;
                        clearTimeout(dblClickTimeout[0]);
                        dblClickTimeout[0] = setTimeout(function () {
                          dblClickOrigin[0] = null;
                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 13401..13407

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

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

                  Array.prototype.filter = function (fun, thisp) {
                    "use strict";
                
                    if (typeof this === "undefined" || this === null) {
                      throw new TypeError();
                Severity: Minor
                Found in lib/csv2api/public/js/jquery.handsontable.full.js - About 1 hr to fix
                  Severity
                  Category
                  Status
                  Source
                  Language