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
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
*
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
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
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
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 ]
- Read upRead up
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;
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)) {
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;
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,
- Read upRead up
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);
- Read upRead up
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 ,
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);
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);
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
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
File MTL.js
has 397 lines of code (exceeds 250 allowed). Consider refactoring. Open
/**
* Loads a Wavefront .mtl file specifying materials
*
* @author angelxuanchang
*/
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 ]
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)
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 = {};