Showing 850 of 1,424 total issues
Function _doSend
has 81 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
_doSend: function (block) {
var me = this,
owner = me.owner,
opts = me.options,
file = block.file,
Function verifyTwoFactor
has 81 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
exports.verifyTwoFactor = function (req, res, next) {
req.checkBody({
'name': {
notEmpty: {
options: [true],
Function create
has 80 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
exports.create = function (req, res, next) {
req.checkBody({
'title': {
notEmpty: {
options: [true],
Function index
has 80 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
exports.index = function (req, res, next) {
var user_name = req.params.name;
var currentUser = req.session.user;
User.getUserByLoginName(user_name, function (err, user) {
if (err) {
Function linkify
has 78 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
module.exports = function linkify(state) {
var i, j, l, tokens, token, text, nodes, ln, pos, level, htmlLinkLevel,
blockTokens = state.tokens,
linkifier = null, links, autolinker;
Function Sizzle
has 76 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
function Sizzle(selector, context, results, seed) {
var match, elem, m, nodeType,
// QSA vars
i, groups, old, nid, newContext, newSelector;
Function bind
has 75 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
Search.prototype.bind = function (decorated, container, $container) {
var self = this;
decorated.call(this, container, $container);
Function bind
has 75 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
Search.prototype.bind = function (decorated, container, $container) {
var self = this;
decorated.call(this, container, $container);
Function draw
has 75 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
pJS.fn.particle.prototype.draw = function() {
var p = this;
if(p.radius_bubble != undefined){
Function onkeypress
has 74 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
self.onkeypress = function (e) {
if (self.railslocked && self.page.maxh === 0) return true;
e = e || _win.event;
var tg = self.getTarget(e);
Function 49
has 74 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
},{}],49:[function(require,module,exports){
'use strict';
// parse sequence of markers,
Function index
has 73 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
exports.index = function (req, res, next) {
function isUped(user, reply) {
if (!reply.ups) {
return false;
}
Function factory
has a Cognitive Complexity of 21 (exceeds 5 allowed). Consider refactoring. Open
Open
}( window, function factory( window, jQuery ) {
'use strict';
// ----- 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 smartquotes
has 71 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
module.exports = function smartquotes(state) {
/*eslint max-depth:0*/
var i, token, text, t, pos, max, thisLevel, lastSpace, nextSpace, item,
canOpen, canClose, j, isSingle, blkIdx, tokens,
stack;
Function create
has 71 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
exports.create = function (req, res, next) {
var profile = req.session.profile;
var isnew = req.body.isnew;
var loginname = validator.trim(req.body.name || '').toLowerCase();
Function signup
has 70 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
exports.signup = function (req, res, next) {
var loginname = validator.trim(req.body.loginname).toLowerCase();
var email = validator.trim(req.body.email).toLowerCase();
var pass = validator.trim(req.body.pass);
var rePass = validator.trim(req.body.re_pass);
Function like
has 70 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
exports.like = function (req, res, next) {
if (!req.body.id) {
return res.status(500).send({success: false, error_msg: "必要参数id未传."});
}
Function updateDisplayInner
has 69 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
function updateDisplayInner(cm, changes, visible, forced) {
var display = cm.display, doc = cm.doc;
if (!display.wrapper.clientWidth) {
display.showingFrom = display.showingTo = doc.first;
display.viewOffset = 0;
Function handler
has 69 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
function handler(event) {
var orgEvent = event || window.event,
args = slice.call(arguments, 1),
delta = 0,
deltaX = 0,
Function emphasis
has 69 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
module.exports = function emphasis(state, silent) {
var startCount,
count,
found,
oldCount,