Showing 63 of 93 total issues
Function collectionPost
has 27 lines of code (exceeds 25 allowed). Consider refactoring. Open
collection.routes.collectionPost = collection.collectionPost('', function (self) {
var Model = collection.thing.model;
var filter = function (data) {
/**
Function registerModules
has 27 lines of code (exceeds 25 allowed). Consider refactoring. Open
return function registerModules(path, modules) {
if (typeof path !== 'string') {
modules = path;
path = '';
Function resolveElementClasses
has 26 lines of code (exceeds 25 allowed). Consider refactoring. Open
function resolveElementClasses(element, cache, runningAnimations) {
runningAnimations = runningAnimations || {};
var lookup = {};
forEach(runningAnimations, function(data, selector) {
Function closeAnimation
has 26 lines of code (exceeds 25 allowed). Consider refactoring. Open
function closeAnimation() {
if (!closeAnimation.hasBeenRun) {
if (runner) { //the runner doesn't exist if it fails to instantiate
runner.applyStyles();
}
Function error
has 26 lines of code (exceeds 25 allowed). Consider refactoring. Open
log.error = function () {
var args = Array.prototype.slice.apply(arguments).map(function (x) {
return x && x.$repr ? x.$repr : x.toString();
});
args.unshift(' AMNA ' + (new Date()).toString() + '\n==>');
Function performAnimation
has 8 arguments (exceeds 4 allowed). Consider refactoring. Open
function performAnimation(animationEvent, className, element, parentElement, afterElement, domOperation, options, doneCallback) {
Function error
has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring. Open
log.error = function () {
var args = Array.prototype.slice.apply(arguments).map(function (x) {
return x && x.$repr ? x.$repr : x.toString();
});
args.unshift(' AMNA ' + (new Date()).toString() + '\n==>');
- 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 animate
has 6 arguments (exceeds 4 allowed). Consider refactoring. Open
animate: function(element, className, from, to, animationCompleted, options) {
Function animateAfter
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
function animateAfter(animationEvent, element, className, afterAnimationComplete, styles) {
Function animate
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
function animate(animationEvent, element, className, animationComplete, options) {
Function animateRun
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
function animateRun(animationEvent, element, className, activeAnimationComplete, styles) {
Function beforeSetClass
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
beforeSetClass: function(element, add, remove, animationCompleted, options) {
Function animate
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
animate: function(element, from, to, className, options) {
Function setClass
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
setClass: function(element, add, remove, animationCompleted, options) {
Function exports
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
module.exports = function (amna, passport) {
if (typeof amna.authentication.facebook !== 'function') {
throw new Error('amna.authentication.facebook must be: function (profile, tokens, done)');
}
- 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 log
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
var log = function () {
var args = Array.prototype.slice.apply(arguments).map(function (x) {
return x && x.$repr ? x.$repr : x;
});
if (logCapture.length) {
- 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 exports
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
module.exports = function (amna, passport) {
if (typeof amna.authentication.google !== 'function') {
throw new Error('amna.authentication.google must be: function (profile, tokens, done)');
}
- 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
Avoid too many return
statements within this function. Open
return schema.map(MongooseThing.encodeJsonSchema);
Avoid too many return
statements within this function. Open
return json;
Avoid too many return
statements within this function. Open
return {type: 'date'};