jonahoffline/csv2api

View on GitHub

Showing 403 of 403 total issues

Function WalkontableSettings has 60 lines of code (exceeds 25 allowed). Consider refactoring.
Open

function WalkontableSettings(instance, settings) {
  var that = this;
  this.instance = instance;

  //default settings. void 0 means it is required, null means it can be empty
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

      for (i = ilen - 1; i >= 0; i--) {
        s = instance.wtTable.rowFilter.visibleToSource(i);
        if (s >= corners[0] && s <= corners[2]) {
          toRow = s;
          break;
    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 12655..12661

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

    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

      for (i = ilen - 1; i >= 0; i--) {
        s = instance.wtTable.columnFilter.visibleToSource(i);
        if (s >= corners[1] && s <= corners[3]) {
          toColumn = s;
          break;
    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 12632..12638

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

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

      function prepareBorder (range,place, type) {
        type = "Solid";
    
        // WHEN WE WANT TO CHANGE/ADD VIA CSS TOP BORDER THE WHOLE ROW MOVES 1PX VERTICAL
        // WHEN WE WANT TO CHANGE/ADD VIA CSS RIGHT BORDER THE WHOLE COLUMN MOVES 1PX HORIZONTAL
    Severity: Major
    Found in lib/csv2api/public/js/jquery.handsontable.full.js - About 2 hrs to fix

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

                      case keyCodes.ARROW_UP:
      
                        if (that.isEditorOpened() && !activeEditor.isWaiting()){
                          that.closeEditorAndSaveChanges(ctrlDown);
                        }
      Severity: Major
      Found in lib/csv2api/public/js/jquery.handsontable.full.js and 3 other locations - About 2 hrs to fix
      lib/csv2api/public/js/jquery.handsontable.full.js on lines 3394..3403
      lib/csv2api/public/js/jquery.handsontable.full.js on lines 3405..3414
      lib/csv2api/public/js/jquery.handsontable.full.js on lines 3416..3425

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

      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

                      case keyCodes.ARROW_RIGHT:
                        if(that.isEditorOpened()  && !activeEditor.isWaiting()){
                          that.closeEditorAndSaveChanges(ctrlDown);
                        }
      
      
      Severity: Major
      Found in lib/csv2api/public/js/jquery.handsontable.full.js and 3 other locations - About 2 hrs to fix
      lib/csv2api/public/js/jquery.handsontable.full.js on lines 3382..3392
      lib/csv2api/public/js/jquery.handsontable.full.js on lines 3394..3403
      lib/csv2api/public/js/jquery.handsontable.full.js on lines 3416..3425

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

      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

                      case keyCodes.ARROW_LEFT:
                        if(that.isEditorOpened() && !activeEditor.isWaiting()){
                          that.closeEditorAndSaveChanges(ctrlDown);
                        }
      
      
      Severity: Major
      Found in lib/csv2api/public/js/jquery.handsontable.full.js and 3 other locations - About 2 hrs to fix
      lib/csv2api/public/js/jquery.handsontable.full.js on lines 3382..3392
      lib/csv2api/public/js/jquery.handsontable.full.js on lines 3394..3403
      lib/csv2api/public/js/jquery.handsontable.full.js on lines 3405..3414

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

      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

                      case keyCodes.ARROW_DOWN:
                        if (that.isEditorOpened() && !activeEditor.isWaiting()){
                          that.closeEditorAndSaveChanges(ctrlDown);
                        }
      
      
      Severity: Major
      Found in lib/csv2api/public/js/jquery.handsontable.full.js and 3 other locations - About 2 hrs to fix
      lib/csv2api/public/js/jquery.handsontable.full.js on lines 3382..3392
      lib/csv2api/public/js/jquery.handsontable.full.js on lines 3405..3414
      lib/csv2api/public/js/jquery.handsontable.full.js on lines 3416..3425

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

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

      WalkontableTable.prototype.refreshSelections = function (selectionsOnly) {
        var vr
          , r
          , vc
          , c
      Severity: Major
      Found in lib/csv2api/public/js/jquery.handsontable.full.js - About 2 hrs to fix

        Function validateChanges has 58 lines of code (exceeds 25 allowed). Consider refactoring.
        Open

          function validateChanges(changes, source, callback) {
            var waitingForValidator = new ValidatorsQueue();
            waitingForValidator.onQueueEmpty = resolve;
        
            for (var i = changes.length - 1; i >= 0; i--) {
        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

                      if ((end && current.row > end.row) || (!priv.settings.minSpareRows && current.row > instance.countRows() - 1) || (current.row >= priv.settings.maxRows)) {
                        break;
                      }
          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 498..500

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

          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 ((end && current.col > end.col) || (!priv.settings.minSpareCols && current.col > instance.countCols() - 1) || (current.col >= priv.settings.maxCols)) {
                          break;
                        }
          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 492..494

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

          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 (x < this.boundaries.left) {
              //x is less than left
              diffX = x - this.boundaries.left;
            }
            else if (x > this.boundaries.right) {
          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 10618..10625

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

          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 (y < this.boundaries.top) {
              //y is less than top
              diffY = y - this.boundaries.top;
            }
            else if (y > this.boundaries.bottom) {
          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 10627..10634

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

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

            function runHookForOperation(rawPatches){
              var instance = this;
              var patches = cleanPatches(rawPatches);
          
              for(var i = 0, len = patches.length; i < len; i++){
          Severity: Major
          Found in lib/csv2api/public/js/jquery.handsontable.full.js - About 2 hrs to fix

            Function render has 57 lines of code (exceeds 25 allowed). Consider refactoring.
            Open

              WalkontableTableRenderer.prototype.render = function () {
                if (!this.wtTable.isWorkingOnClone()) {
                  this.instance.getSetting('beforeDraw', true);
                }
            
            
            Severity: Major
            Found in lib/csv2api/public/js/jquery.handsontable.full.js - About 2 hrs to fix

              Function HandsontablePersistentState has 57 lines of code (exceeds 25 allowed). Consider refactoring.
              Open

                function HandsontablePersistentState() {
                  var plugin = this;
              
              
                  this.init = function () {
              Severity: Major
              Found in lib/csv2api/public/js/jquery.handsontable.full.js - About 2 hrs to fix

                Function prepare has 55 lines of code (exceeds 25 allowed). Consider refactoring.
                Open

                  HandsontableEditor.prototype.prepare = function (td, row, col, prop, value, cellProperties) {
                
                    Handsontable.editors.TextEditor.prototype.prepare.apply(this, arguments);
                
                    var parent = this;
                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

                                  changeCoords(currentSelectedRange.to, Math.max(bottomRight[altDim], mergeParent[altDim] + mergeParent[altDim + "span"] - 1), Math.max(bottomRight[dim], mergeParent[dim] + mergeParent[dim + "span"] - 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 11275..11275

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

                  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

                    for (i = 0; i < ilen; i++) {
                      s = instance.wtTable.columnFilter.visibleToSource(i);
                      if (s >= corners[1] && s <= corners[3]) {
                        fromColumn = s;
                        break;
                  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 12624..12630

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

                  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