d4l3k/WebSync

View on GitHub

Showing 192 of 366 total issues

File mathquill.js has 3762 lines of code (exceeds 250 allowed). Consider refactoring.
Open

/**
 * MathQuill: http://mathquill.com
 * by Jay and Han (laughinghan@gmail.com)
 *
 * This Source Code Form is subject to the terms of the
Severity: Major
Found in assets/lib/mathquill.js - About 1 wk to fix

    File Chart.js has 2512 lines of code (exceeds 250 allowed). Consider refactoring.
    Open

    /*!
     * Chart.js
     * http://chartjs.org/
     * Version: 1.0.1-beta.4
     *
    Severity: Major
    Found in assets/lib/Chart.js - About 1 wk to fix

      File display-latex.user.js has 1766 lines of code (exceeds 250 allowed). Consider refactoring.
      Open

      // This script was automatically generated from a literate source.
      // Do not edit this file; look at the literate source instead!
      //
      // Greasemonkey user script to
      // Display LaTeX in Web pages by transforming to MathML
      Severity: Major
      Found in assets/lib/display-latex.user.js - About 4 days to fix

        File core.js has 1335 lines of code (exceeds 250 allowed). Consider refactoring.
        Open

        /*jslint browser: true*/
        /*global $, define, rangy, _, Detector, WebSyncData, ace, WebSyncAuth, WebSocket, jsonpatch, openpgp, NProgress, fullScreenApi, requirejs, WS*/
        
        /*
          WebSync: Core.js
        Severity: Major
        Found in assets/digest/core.js - About 3 days to fix

          File tables.js has 848 lines of code (exceeds 250 allowed). Consider refactoring.
          Open

          
          /*global $, define, rangy, _, JST*/
          
          //= require templates/tables-ribbon
          //= require templates/tables-selection
          Severity: Major
          Found in assets/src/tables.js - About 2 days to fix

            Function v_subexpr_to_mathml has a Cognitive Complexity of 100 (exceeds 5 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: Minor
            Found in assets/lib/display-latex.user.js - About 2 days to fix

            Cognitive Complexity

            Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.

            A method's cognitive complexity is based on a few simple rules:

            • Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
            • Code is considered more complex for each "break in the linear flow of the code"
            • Code is considered more complex when "flow breaking structures are nested"

            Further reading

            Function matrix has 292 lines of code (exceeds 25 allowed). Consider refactoring.
            Open

            LatexCmds.matrix = P(MathCommand, function(_, super_) {
            
              var MatrixCell = P(MathBlock, function(_, super_) {
                _.init = function (column, row) {
                  this.column = column;
            Severity: Major
            Found in assets/lib/mathquill.js - About 1 day to fix

              Function onmessage has 229 lines of code (exceeds 25 allowed). Consider refactoring.
              Open

                    onmessage: function(e) {
                      var data = JSON.parse(e.data);
                      console.log('MESSAGE', data);
                      var events = WS.registeredMessageEvents[data.type];
                      if (!_.isEmpty(events)) {
              Severity: Major
              Found in assets/digest/core.js - About 1 day to fix

                Function Cursor has 182 lines of code (exceeds 25 allowed). Consider refactoring.
                Open

                var Cursor = P(Point, function(_) {
                  _.init = function(initParent, options) {
                    this.parent = initParent;
                    this.options = options;
                
                
                Severity: Major
                Found in assets/lib/mathquill.js - About 7 hrs to fix

                  Function Tween has a Cognitive Complexity of 46 (exceeds 5 allowed). Consider refactoring.
                  Open

                  TWEEN.Tween = function(a) {
                      var c = {}, b = {}, d = {}, e = 1E3,
                          g = 0,
                          h = !1,
                          j = !1,
                  Severity: Minor
                  Found in assets/lib/tween.min.js - About 7 hrs to fix

                  Cognitive Complexity

                  Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.

                  A method's cognitive complexity is based on a few simple rules:

                  • Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
                  • Code is considered more complex for each "break in the linear flow of the code"
                  • Code is considered more complex when "flow breaking structures are nested"

                  Further reading

                  Function parse has a Cognitive Complexity of 43 (exceeds 5 allowed). Consider refactoring.
                  Open

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

                  Cognitive Complexity

                  Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.

                  A method's cognitive complexity is based on a few simple rules:

                  • Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
                  • Code is considered more complex for each "break in the linear flow of the code"
                  • Code is considered more complex when "flow breaking structures are nested"

                  Further reading

                  g_tex_commands has 47 functions (exceeds 20 allowed). Consider refactoring.
                  Open

                  = { "\\frac" : v_fraction_to_mathml ,
                  "\\dfrac" : v_fraction_to_mathml ,
                  "\\tfrac" : v_fraction_to_mathml ,
                  "\\binom" : v_binom_to_mathml ,
                  "\\sqrt" : v_sqrt_to_mathml ,
                  Severity: Minor
                  Found in assets/lib/display-latex.user.js - About 6 hrs to fix

                    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

                          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

                            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

                              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
                                    Severity
                                    Category
                                    Status
                                    Source
                                    Language