Showing 850 of 1,424 total issues
Function ToolImage
has 163 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
var ToolImage = function(){
var self = this;
this.$win = $([
'<div class="modal fade" tabindex="-1" role="dialog" aria-labelledby="editorToolImageTitle" aria-hidden="true">',
'<div class="modal-dialog" role="document">',
Function 5
has 156 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
},{}],5:[function(require,module,exports){
// Utilities
//
'use strict';
Function createFromChrome
has 154 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
exports.createFromChrome = function (req, res, next) {
req.checkBody({
'media': {
notEmpty: {
options: [true],
File qrcode.js
has 414 lines of code (exceeds 250 allowed). Consider refactoring. Open
Open
/**
* @fileoverview
* - Using the 'QRCode for Javascript library'
* - Fixed dataset of 'QRCode for Javascript library' for support full-spec.
* - this library has no dependencies.
File topic.js
has 407 lines of code (exceeds 250 allowed). Consider refactoring. Open
Open
/*!
* nodeclub - controllers/topic.js
*/
/**
Function 18
has 144 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
},{}],18:[function(require,module,exports){
/**
* class Renderer
*
* Generates HTML from parsed token stream. Each instance has independent
Function ScrollMomentumClass2D
has 140 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
var ScrollMomentumClass2D = function (nc) {
var self = this;
this.nc = nc;
this.lastx = 0;
Function inlineNormal
has 131 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
function inlineNormal(stream, state) {
var style = state.text(stream, state);
if (typeof style !== 'undefined')
return style;
Function factory
has 131 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
}( window, function factory( window, matchesSelector ) {
var utils = {};
Function Callbacks
has 128 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
jQuery.Callbacks = function (options) {
// Convert options from String-formatted to Object-formatted if needed
// (we check in cache first)
options = typeof options === "string" ?
Function factory
has a Cognitive Complexity of 34 (exceeds 5 allowed). Consider refactoring. Open
Open
}( window, function factory( Outlayer, getSize ) {
// -------------------------- masonryDefinition -------------------------- //
- 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
Consider simplifying this complex logical expression. Open
Open
if (event.pageX == null && original.clientX != null) {
eventDoc = event.target.ownerDocument || document;
doc = eventDoc.documentElement;
body = eventDoc.body;
Function upload
has 125 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
function upload (req, res, next) {
var isFileLimit = false;
var uploadResult;
var topicImage = {profile_source: 'upload'};
req.busboy.on('field', function(fieldname, value, fieldnameTruncated, valTruncated, encoding, mimetype) {
Function particle
has 124 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
pJS.fn.particle = function(color, opacity, position){
/* size */
this.radius = (pJS.particles.size.random ? Math.random() : 1) * pJS.particles.size.value;
if(pJS.particles.size.anim.enable){
Function list
has 122 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
module.exports = function list(state, startLine, endLine, silent) {
var nextLine,
indent,
oldTShift,
oldIndent,
File jquery.tmpl.js
has 365 lines of code (exceeds 250 allowed). Consider refactoring. Open
Open
/*!
* jQuery Templates Plugin
* http://github.com/jquery/jquery-tmpl
*
* Copyright Software Freedom Conservancy, Inc.
Function 34
has 119 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
},{}],34:[function(require,module,exports){
// Replace link-like texts with link nodes.
//
// Currently restricted by `inline.validateLink()` to http/https/ftp
//
Function 41
has 118 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
},{}],41:[function(require,module,exports){
// Process *this* and _that_
'use strict';
Function 19
has 117 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
},{"./common/utils":5}],19:[function(require,module,exports){
/**
* class Ruler
*
* Helper class, used by [[MarkdownIt#core]], [[MarkdownIt#block]] and
Function onMouseDown
has 115 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
function onMouseDown(e) {
if (signalDOMEvent(this, e)) return;
var cm = this, display = cm.display, doc = cm.doc, sel = doc.sel;
sel.shift = e.shiftKey;