d4l3k/WebSync

View on GitHub

Showing 366 of 366 total issues

Function MathCommand has 160 lines of code (exceeds 25 allowed). Consider refactoring.
Open

var MathCommand = P(MathElement, function(_, super_) {
  _.init = function(ctrlSeq, htmlTemplate, textTemplate) {
    var cmd = this;
    super_.init.call(cmd);

Severity: Major
Found in assets/lib/mathquill.js - About 6 hrs to fix

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

        parse: function(data, mtllibCallback) {
    
            function vector(x, y, z) {
    
                return new THREE.Vector3(x, y, z);
    Severity: Major
    Found in assets/lib/MTL.js - About 6 hrs to fix

      File edit.js has 430 lines of code (exceeds 250 allowed). Consider refactoring.
      Open

      /*jslint browser: true*/
      /*global $, define, rangy, _, prompt, alert, Detector, WebSyncData, ace, JST*/
      
      //= require templates/edit-ribbon
      //= require templates/edit-body
      Severity: Minor
      Found in assets/digest/edit.js - About 6 hrs to fix

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

          $('.content').delegate('.Table.axis#x th.resize', 'mousedown.Tables', function(e) {
            exports.drag = true;
            if (Math.abs(e.pageX - $(this).offset().left) < 5) {
              exports.active = $(this).prev()[0];
            } else {
        Severity: Major
        Found in assets/src/tables.js and 1 other location - About 6 hrs to fix
        assets/src/tables.js on lines 917..926

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

        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

          $('.content').delegate('.Table.axis#y th.resize', 'mousedown.Tables', function(e) {
            exports.drag = true;
            if (Math.abs(e.pageY - $(this).offset().top) < 5) {
              exports.active = $(this).prev()[0];
            } else {
        Severity: Major
        Found in assets/src/tables.js and 1 other location - About 6 hrs to fix
        assets/src/tables.js on lines 907..916

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

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

        var Parser = P(function(_, super_, Parser) {
          // The Parser object is a wrapper for a parser function.
          // Externally, you use one to parse a string by calling
          //   var result = SomeParser.parse('Me Me Me! Parse Me!');
          // You should never call the constructor, rather you should
        Severity: Major
        Found in assets/lib/mathquill.js - About 5 hrs to fix

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

                      if (this.options.showTooltips){
                          helpers.bindEvents(this, this.options.tooltipEvents, function(evt){
                              var activeSegments = (evt.type !== 'mouseout') ? this.getSegmentsAtEvent(evt) : [];
          
                              helpers.each(this.segments,function(segment){
          Severity: Major
          Found in assets/lib/Chart.js and 1 other location - About 5 hrs to fix
          assets/lib/Chart.js on lines 2893..2904

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

          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 (this.options.showTooltips){
                          helpers.bindEvents(this, this.options.tooltipEvents, function(evt){
                              var activeSegments = (evt.type !== 'mouseout') ? this.getSegmentsAtEvent(evt) : [];
                              helpers.each(this.segments,function(segment){
                                  segment.restore(["fillColor"]);
          Severity: Major
          Found in assets/lib/Chart.js and 1 other location - About 5 hrs to fix
          assets/lib/Chart.js on lines 2298..2310

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

          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

          LatexCmds.iota =
          LatexCmds.kappa =
          LatexCmds.mu =
          LatexCmds.nu =
          LatexCmds.xi =
          Severity: Major
          Found in assets/lib/mathquill.js and 1 other location - About 5 hrs to fix
          assets/lib/mathquill.js on lines 4992..5006

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

          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

          LatexCmds.Gamma =
          LatexCmds.Delta =
          LatexCmds.Theta =
          LatexCmds.Lambda =
          LatexCmds.Xi =
          Severity: Major
          Found in assets/lib/mathquill.js and 1 other location - About 5 hrs to fix
          assets/lib/mathquill.js on lines 4916..4930

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

          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

          File MTL.js has 397 lines of code (exceeds 250 allowed). Consider refactoring.
          Open

          /**
           * Loads a Wavefront .mtl file specifying materials
           *
           * @author angelxuanchang
           */
          Severity: Minor
          Found in assets/lib/MTL.js - About 5 hrs to fix

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

              $('.content').delegate('.Table.axis#y th', 'mousemove.Tables', function(e) {
                var position = $(this).offset();
                $('.Table.axis th.resize').removeClass('resize');
                if (Math.abs(e.pageY - position.top) < 5 || Math.abs(e.pageY - (position.top + $(this).height())) < 5) {
                  $(this).addClass('resize');
            Severity: Major
            Found in assets/src/tables.js and 1 other location - About 5 hrs to fix
            assets/src/tables.js on lines 854..860

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

            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

              $('.content').delegate('.Table.axis#x th', 'mousemove.Tables', function(e) {
                var position = $(this).offset();
                $('.Table.axis th.resize').removeClass('resize');
                if (Math.abs(e.pageX - position.left) < 5 || Math.abs(e.pageX - (position.left + $(this).width())) < 5) {
                  $(this).addClass('resize');
            Severity: Major
            Found in assets/src/tables.js and 1 other location - About 5 hrs to fix
            assets/src/tables.js on lines 861..867

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

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

            function v_subexpr_to_mathml (tokens ) {
             var v_result = null ;
             var v_mmultiscripts = null ;
             var v_mprescripts = null ;
             if( ( ( tokens.list[tokens.length<=tokens.index+ 0 ? tokens.length-1 : tokens.index+ 0 ]
            Severity: Major
            Found in assets/lib/display-latex.user.js - About 5 hrs to fix

              Function TextBlock has 130 lines of code (exceeds 25 allowed). Consider refactoring.
              Open

              var TextBlock = P(Node, function(_, super_) {
                _.ctrlSeq = '\\text';
              
                _.replaces = function(replacedText) {
                  if (replacedText instanceof Fragment)
              Severity: Major
              Found in assets/lib/mathquill.js - About 5 hrs to fix

                Function Bracket has 127 lines of code (exceeds 25 allowed). Consider refactoring.
                Open

                var Bracket = P(P(MathCommand, DelimsMixin), function(_, super_) {
                  _.init = function(side, open, close, ctrlSeq, end) {
                    super_.init.call(this, '\\left'+ctrlSeq, undefined, [open, close]);
                    this.side = side;
                    this.sides = {};
                Severity: Major
                Found in assets/lib/mathquill.js - About 5 hrs to fix

                  Function CSS3DRenderer has 120 lines of code (exceeds 25 allowed). Consider refactoring.
                  Open

                  THREE.CSS3DRenderer = function() {
                  
                      console.log('THREE.CSS3DRenderer', THREE.REVISION);
                  
                      var _width, _height;
                  Severity: Major
                  Found in assets/lib/CSS3DRenderer.js - About 4 hrs to fix

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

                                    helpers.each(dataset.data,function(dataPoint,index){
                                        //Add a new point for each piece of data, passing any required data to draw.
                                        datasetObject.bars.push(new this.BarClass({
                                            value : dataPoint,
                                            label : data.labels[index],
                    Severity: Major
                    Found in assets/lib/Chart.js and 1 other location - About 4 hrs to fix
                    assets/lib/Chart.js on lines 2522..2533

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

                    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

                                    helpers.each(dataset.data,function(dataPoint,index){
                                        //Add a new point for each piece of data, passing any required data to draw.
                                        datasetObject.points.push(new this.PointClass({
                                            value : dataPoint,
                                            label : data.labels[index],
                    Severity: Major
                    Found in assets/lib/Chart.js and 1 other location - About 4 hrs to fix
                    assets/lib/Chart.js on lines 2050..2061

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

                    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

                    File crypto.js has 359 lines of code (exceeds 250 allowed). Consider refactoring.
                    Open

                    /*jslint browser: true*/
                    /*global define, $, _, openpgp, JST, WebSyncAuth, WebSyncData, WS, moment*/
                    
                    //= require templates/crypto
                    
                    
                    Severity: Minor
                    Found in assets/digest/crypto.js - About 4 hrs to fix
                      Severity
                      Category
                      Status
                      Source
                      Language