d4l3k/WebSync

View on GitHub

Showing 366 of 366 total issues

Avoid deeply nested control flow statements.
Open

          if (parent.css('text-indent') === '0px') {
            if (parent.attr('contenteditable') === 'true') {
              node.wrap("<div style='text-indent: 40px'></div>");
            } else {
              parent.css({
Severity: Major
Found in assets/digest/edit.js - About 45 mins to fix

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

      _.join = function(methodName) {
        return this.fold('', function(fold, child) {
          return fold + child[methodName]();
        });
      };
    Severity: Minor
    Found in assets/lib/mathquill.js and 1 other location - About 45 mins to fix
    assets/lib/mathquill.js on lines 2606..2610

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

    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

      _.join = function(methodName) {
        return this.foldChildren('', function(fold, child) {
          return fold + child[methodName]();
        });
      };
    Severity: Minor
    Found in assets/lib/mathquill.js and 1 other location - About 45 mins to fix
    assets/lib/mathquill.js on lines 840..844

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

    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(previous &&
             previous.nodeType == node.TEXT_NODE &&
             !non_whitespace.test(previous.data))
            previous = previous.previousSibling;
    Severity: Minor
    Found in assets/lib/display-latex.user.js and 1 other location - About 40 mins to fix
    assets/lib/display-latex.user.js on lines 1762..1765

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

    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(previous &&
           previous.nodeType == node.TEXT_NODE &&
           !non_whitespace.test(previous.data))
          previous = previous.previousSibling;
    Severity: Minor
    Found in assets/lib/display-latex.user.js and 1 other location - About 40 mins to fix
    assets/lib/display-latex.user.js on lines 1773..1776

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

    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 (nextCell.length) {
            var nextCellBlock = Node.byId[nextCell.attr(mqBlockId)];
            cellBlock[R] = nextCellBlock;
            nextCellBlock[L] = cellBlock;
          }
    Severity: Minor
    Found in assets/lib/mathquill.js and 1 other location - About 40 mins to fix
    assets/lib/mathquill.js on lines 4164..4168

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

    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 (downCell.length) {
            var downCellBlock = Node.byId[downCell.attr(mqBlockId)];
            cellBlock.downOutOf = downCellBlock;
            downCellBlock.upOutOf = cellBlock;
          }
    Severity: Minor
    Found in assets/lib/mathquill.js and 1 other location - About 40 mins to fix
    assets/lib/mathquill.js on lines 4151..4155

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

    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

    Consider simplifying this complex logical expression.
    Open

      else if(node.nodeType == node.ELEMENT_NODE) {    if(node.tagName == 'TEXTAREA' || node.tagName == 'textarea' ||
           node.tagName == 'INPUT' || node.tagName == 'input' ||
           node.tagName == 'SCRIPT' || node.tagName == 'script')
          return;
    Severity: Major
    Found in assets/lib/display-latex.user.js - About 40 mins to fix

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

            if (block.ends[R][R].siblingCreated) block.ends[R][R].siblingCreated(cursor.options, L);
      Severity: Major
      Found in assets/lib/mathquill.js and 3 other locations - About 40 mins to fix
      assets/lib/mathquill.js on lines 2132..2132
      assets/lib/mathquill.js on lines 5018..5018
      assets/lib/mathquill.js on lines 5019..5019

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

      We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

      The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

      If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

      See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

      Refactorings

      Further Reading

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

          if (block.ends[L][L].siblingCreated) block.ends[L][L].siblingCreated(cursor.options, R);
      Severity: Major
      Found in assets/lib/mathquill.js and 3 other locations - About 40 mins to fix
      assets/lib/mathquill.js on lines 2131..2131
      assets/lib/mathquill.js on lines 2132..2132
      assets/lib/mathquill.js on lines 5018..5018

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

      We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

      The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

      If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

      See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

      Refactorings

      Further Reading

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

            if (block.ends[L][L].siblingCreated) block.ends[L][L].siblingCreated(cursor.options, R);
      Severity: Major
      Found in assets/lib/mathquill.js and 3 other locations - About 40 mins to fix
      assets/lib/mathquill.js on lines 2131..2131
      assets/lib/mathquill.js on lines 5018..5018
      assets/lib/mathquill.js on lines 5019..5019

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

      We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

      The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

      If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

      See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

      Refactorings

      Further Reading

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

          if (block.ends[R][R].siblingCreated) block.ends[R][R].siblingCreated(cursor.options, L);
      Severity: Major
      Found in assets/lib/mathquill.js and 3 other locations - About 40 mins to fix
      assets/lib/mathquill.js on lines 2131..2131
      assets/lib/mathquill.js on lines 2132..2132
      assets/lib/mathquill.js on lines 5019..5019

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

      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 5 arguments (exceeds 4 allowed). Consider refactoring.
      Open

        _.init = function(side, open, close, ctrlSeq, end) {
      Severity: Minor
      Found in assets/lib/mathquill.js - About 35 mins to fix

        Function calculateScaleRange has 5 arguments (exceeds 4 allowed). Consider refactoring.
        Open

                calculateScaleRange = helpers.calculateScaleRange = function(valuesArray, drawingSize, textSize, startFromZero, integersOnly){
        Severity: Minor
        Found in assets/lib/Chart.js - About 35 mins to fix

          Function CatmullRom has 5 arguments (exceeds 4 allowed). Consider refactoring.
          Open

                  CatmullRom: function(a, c, b, d, e) {
          Severity: Minor
          Found in assets/lib/tween.min.js - About 35 mins to fix

            Function load has 5 arguments (exceeds 4 allowed). Consider refactoring.
            Open

                load: function(url, mtlurl, onLoad, onProgress, onError) {
            Severity: Minor
            Found in assets/lib/MTL.js - About 35 mins to fix

              Method initialize has 5 arguments (exceeds 4 allowed). Consider refactoring.
              Open

                  def initialize(public_path, path, request, response, options)
              Severity: Minor
              Found in lib/webdav.rb - About 35 mins to fix

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

                                else if (i < this.valuesCount/2) {
                                    // Less than half the values means we'll left align the text
                                    if (pointPosition.x + textWidth > furthestRight) {
                                        furthestRight = pointPosition.x + textWidth;
                                        furthestRightIndex = i;
                Severity: Minor
                Found in assets/lib/Chart.js and 1 other location - About 35 mins to fix
                assets/lib/Chart.js on lines 1752..1758

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

                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 ((result = normal_pattern.exec(line)) !== null) {
                
                                // ["vn 1.0 2.0 3.0", "1.0", "2.0", "3.0"]
                
                                normals.push(vector(
                Severity: Minor
                Found in assets/lib/MTL.js and 1 other location - About 35 mins to fix
                assets/lib/MTL.js on lines 672..779

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

                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 'Shift-Up':
                      if (cursor[L]) {
                        while (cursor[L]) ctrlr.selectLeft();
                      } else {
                        ctrlr.selectLeft();
                Severity: Minor
                Found in assets/lib/mathquill.js and 1 other location - About 35 mins to fix
                assets/lib/mathquill.js on lines 1763..1769

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

                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