Showing 850 of 1,424 total issues
Function ontouchmove
has 115 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
self.ontouchmove = function (e, byiframe) {
if (!self.rail.drag) return true;
if (e.targetTouches && opt.preventmultitouchscrolling) {
Function factory
has a Cognitive Complexity of 31 (exceeds 5 allowed). Consider refactoring. Open
Open
})( window, function factory() {
'use strict';
// -------------------------- helpers -------------------------- //
- 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 factory
has 114 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
})( window, function factory() {
'use strict';
// -------------------------- helpers -------------------------- //
File board.js
has 356 lines of code (exceeds 250 allowed). Consider refactoring. Open
Open
var _ = require('lodash');
var Board = require('../proxy').Board;
var BoardCollect = require('../proxy').BoardCollect;
var Topic = require('../proxy').Topic;
var User = require('../proxy').User;
Function baseIsEqual
has 113 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
function baseIsEqual(a, b, callback, isWhere, stackA, stackB) {
// used to indicate that when comparing objects, `a` has at least the properties of `b`
if (callback) {
var result = callback(a, b);
if (typeof result != 'undefined') {
Function factory
has 112 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
}( window, function factory( Outlayer, getSize ) {
// -------------------------- masonryDefinition -------------------------- //
File prettify.js
has 353 lines of code (exceeds 250 allowed). Consider refactoring. Open
Open
var q = null;
window.PR_SHOULD_USE_CONTINUATION = !0;
(function () {
function L(a) {
function m(a) {
Function index
has 109 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
exports.index = function (req, res, next) {
var page = parseInt(req.query.page, 10) || 1;
page = page > 0 ? page : 1;
var tab = req.query.tab;
var forum = req.query.forum;
Function 29
has 104 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
},{}],29:[function(require,module,exports){
'use strict';
var parseLinkDestination = require('../helpers/parse_link_destination');
Function 45
has 103 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
},{"../common/html_re":3}],45:[function(require,module,exports){
// Process ![image](<src> "title")
'use strict';
File image.js
has 338 lines of code (exceeds 250 allowed). Consider refactoring. Open
Open
var _ = require('lodash');
var TopicProxy = require('../../proxy').Topic;
var TopicLike = require('../../proxy').TopicLike;
var TopicBoard = require('../../proxy').TopicBoard;
var BoardProxy = require('../../proxy').Board;
Function 11
has 101 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
},{"../common/utils":5}],11:[function(require,module,exports){
// Main perser class
'use strict';
Function 31
has 101 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
},{}],31:[function(require,module,exports){
// GFM table, non-standard
'use strict';
Function 30
has 100 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
},{"../helpers/normalize_reference":7,"../helpers/parse_link_destination":8,"../helpers/parse_link_title":10}],30:[function(require,module,exports){
// Parser state class
'use strict';
Function reference
has 99 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
module.exports = function reference(state, startLine, _endLine, silent) {
var ch,
destEndPos,
destEndLineNo,
endLine,
File ext.js
has 331 lines of code (exceeds 250 allowed). Consider refactoring. Open
Open
(function(Editor, markdownit, WebUploader){
function _replaceSelection(cm, active, start, end) {
var text;
var startPoint = cm.getCursor('start');
Function index
has 98 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
var index = function (req, res, next) {
var type = req.query.type || 'text';
var page = parseInt(req.query.page, 10) || 1;
page = page > 0 ? page : 1;
var forum = req.query.forum;
Function factory
has a Cognitive Complexity of 27 (exceeds 5 allowed). Consider refactoring. Open
Open
}( window, function factory( window, matchesSelector ) {
var utils = {};
- 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 defaultPrefilter
has 97 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
function defaultPrefilter(elem, props, opts) {
/* jshint validthis: true */
var prop, value, toggle, tween, hooks, oldfire, display,
anim = this,
orig = {},
Function image
has 97 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
module.exports = function image(state, silent) {
var code,
href,
label,
labelEnd,