Showing 192 of 366 total issues
Function CSS3DRenderer
has 120 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
THREE.CSS3DRenderer = function() {
console.log('THREE.CSS3DRenderer', THREE.REVISION);
var _width, _height;
File crypto.js
has 359 lines of code (exceeds 250 allowed). Consider refactoring. Open
Open
/*jslint browser: true*/
/*global define, $, _, openpgp, JST, WebSyncAuth, WebSyncData, WS, moment*/
//= require templates/crypto
Function updateNav
has 113 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
updateNav: function() {
var activeSection = $('.note-section:visible')[0];
var activePage = $('.note-page:visible')[0];
var sections = _.map($('.note-section'), function(section) {
Function showTooltip
has 112 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
showTooltip : function(ChartElements, forceRedraw){
// Only redraw the chart if we've actually changed what we're hovering on.
if (typeof this.activeElements === 'undefined') this.activeElements = [];
var isChanged = (function(Elements){
Function SupSub
has 111 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
var SupSub = P(MathCommand, function(_, super_) {
_.ctrlSeq = '_{...}^{...}';
_.createLeftOf = function(cursor) {
if (!cursor[L] && cursor.options.supSubsRequireOperand) return;
return super_.createLeftOf.apply(this, arguments);
Function Tween
has 111 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
TWEEN.Tween = function(a) {
var c = {}, b = {}, d = {}, e = 1E3,
g = 0,
h = !1,
j = !1,
Function exports
has 111 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
module.exports = function(ws, data) {
ws.clientId = data.id;
redis.get('websocket:key:' + data.id, function(err, reply) {
//console.log(["Keys!", reply,data.key]);
if (reply === data.key + ':' + ws.docId) {
Function saneKeyboardEvents
has 110 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
var saneKeyboardEvents = (function() {
// The following [key values][1] map was compiled from the
// [DOM3 Events appendix section on key codes][2] and
// [a widely cited report on cross-browser tests of key codes][3],
// except for 10: 'Enter', which I've empirically observed in Safari on iOS
File awesome.js
has 347 lines of code (exceeds 250 allowed). Consider refactoring. Open
Open
/*global define, $, _, document, WebSyncAuth, WebSyncData, window, THREE, TWEEN,
NProgress, JST, requestAnimationFrame*/
//= require templates/awesome
Function applyPatch
has 107 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
applyPatch: function(patch, root, rootDom) {
var dom = rootDom.childNodes;
var exemptions = {};
_.each(patch, function(change) {
if (change.path.indexOf(root) === 0) {
File webdav.rb
has 337 lines of code (exceeds 250 allowed). Consider refactoring. Open
Open
module WebSync
# WebDAV accessor methods for a WSFile.
class FileResource < DAV4Rack::Resource
include DAV4Rack::Utils
attr_accessor :file, :ws_user
Function tokenize_latex_math
has a Cognitive Complexity of 28 (exceeds 5 allowed). Consider refactoring. Open
Open
function tokenize_latex_math(input)
{
var result = new Array();
var in_text_mode = 0;
var brace_level = [];
- 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 convert
has a Cognitive Complexity of 27 (exceeds 5 allowed). Consider refactoring. Open
Open
convert: function(materialsInfo) {
if (!this.options) return materialsInfo;
var converted = {};
- 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
File tween.min.js
has 326 lines of code (exceeds 250 allowed). Consider refactoring. Open
Open
// tween.js - http://github.com/sole/tween.js
'use strict';
void 0 === Date.now && (Date.now = function() {
return (new Date).valueOf()
});
Function keystroke
has 95 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
_.keystroke = function(key, e, ctrlr) {
var cursor = ctrlr.cursor;
switch (key) {
case 'Ctrl-Shift-Backspace':
Function makeChart
has 91 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
makeChart: function(container, options, size) {
var chart = $('<div class="Chart resizable" contenteditable="false">' +
(options.chartTitle ? '<h2>' + _.escape(options.chartTitle) + '</h2>' : '') +
'<h3 class="y">' + _.escape(options.chartYTitle) + '</h3>' +
'<canvas class="noresize"></canvas>' +
Function Node
has 90 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
var Node = P(function(_) {
_[L] = 0;
_[R] = 0
_.parent = 0;
Function draw
has 89 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
draw: function(){
if (this.display){
var ctx = this.ctx;
each(this.yLabels, function(label, index){
// Don't draw a centre value
Class FileResource
has 29 methods (exceeds 20 allowed). Consider refactoring. Open
Open
class FileResource < DAV4Rack::Resource
include DAV4Rack::Utils
attr_accessor :file, :ws_user
# Represents the root directory. It might be a good idea to change this to be
Function Fragment
has 86 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
var Fragment = P(function(_) {
_.init = function(withDir, oppDir, dir) {
if (dir === undefined) dir = L;
prayDirection(dir);