Showing 63 of 93 total issues
File angular-animate.js
has 1106 lines of code (exceeds 250 allowed). Consider refactoring. Open
/**
* @license AngularJS v1.3.15
* (c) 2010-2014 Google, Inc. http://angularjs.org
* License: MIT
*/
Function exports
has 258 lines of code (exceeds 25 allowed). Consider refactoring. Open
module.exports = function (amna) {
amna.mongoId = function (param) {
return ':' + param + '([0-9a-f]{24})';
};
Function exports
has a Cognitive Complexity of 61 (exceeds 5 allowed). Consider refactoring. Open
module.exports = function (amna) {
amna.mongoId = function (param) {
return ':' + param + '([0-9a-f]{24})';
};
- 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 performAnimation
has 171 lines of code (exceeds 25 allowed). Consider refactoring. Open
function performAnimation(animationEvent, className, element, parentElement, afterElement, domOperation, options, doneCallback) {
var noopCancel = noop;
var runner = animationRunner(element, animationEvent, className, options);
if (!runner) {
fireDOMOperation();
Function animationRunner
has 144 lines of code (exceeds 25 allowed). Consider refactoring. Open
function animationRunner(element, animationEvent, className, options) {
//transcluded directives may sometimes fire an animation using only comment nodes
//best to catch this early on to prevent any animation operations from occurring
var node = element[0];
if (!node) {
Function phase_1
has 139 lines of code (exceeds 25 allowed). Consider refactoring. Open
module.exports = function phase_1(amna, log) {
var AMNACache = amna.thing.mongoose({
key: {
type: String,
Function exports
has 131 lines of code (exceeds 25 allowed). Consider refactoring. Open
module.exports = function (amna) {
var MongooseThing = function MongooseThing(schema) {
schema.deleted = Boolean;
if (amna.createdByThing) {
Function exports
has 126 lines of code (exceeds 25 allowed). Consider refactoring. Open
module.exports = function (amna, log) {
var queryJSON = function (data) {
return '?' + encodeURIComponent(JSON.stringify(data));
};
Function animateRun
has 117 lines of code (exceeds 25 allowed). Consider refactoring. Open
function animateRun(animationEvent, element, className, activeAnimationComplete, styles) {
var node = extractElementNode(element);
var elementData = element.data(NG_ANIMATE_CSS_DATA_KEY);
if (node.getAttribute('class').indexOf(className) == -1 || !elementData) {
activeAnimationComplete();
Function exports
has a Cognitive Complexity of 29 (exceeds 5 allowed). Consider refactoring. Open
module.exports = function (amna, log) {
var queryJSON = function (data) {
return '?' + encodeURIComponent(JSON.stringify(data));
};
- 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 28 (exceeds 5 allowed). Consider refactoring. Open
module.exports = function (amna) {
var MongooseThing = function MongooseThing(schema) {
schema.deleted = Boolean;
if (amna.createdByThing) {
- 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 link
has 101 lines of code (exceeds 25 allowed). Consider refactoring. Open
link: function (scope, element, attrs) {
// Give each directive instance a new id
iframeID++;
function setLoadingState(state) {
Function exports
has 98 lines of code (exceeds 25 allowed). Consider refactoring. Open
module.exports = function (amna, log) {
var Interaction = function (req, res, next, done) {
this.req = req;
this.res = res;
Function $auth
has 80 lines of code (exceeds 25 allowed). Consider refactoring. Open
amna.$auth = function (done) {
defaults();
setupAuth();
amna.$passport = passport;
Function exports
has 70 lines of code (exceeds 25 allowed). Consider refactoring. Open
module.exports = function (amna, log) {
return function (config, done) {
/**
* Set settings
Function exports
has a Cognitive Complexity of 18 (exceeds 5 allowed). Consider refactoring. Open
module.exports = function (amna, log) {
var Interaction = function (req, res, next, done) {
this.req = req;
this.res = res;
- 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 59 lines of code (exceeds 25 allowed). Consider refactoring. Open
module.exports = function (amna, log) {
var app = express();
app.use(bodyParser.urlencoded({ extended: true }));
app.use(bodyParser.json());
app.use(methodOverride('_method'));
File collection.js
has 262 lines of code (exceeds 250 allowed). Consider refactoring. Open
'use strict';
/**
* AMNA: Amazing Mongoose Node.js API
*
Function setClass
has 56 lines of code (exceeds 25 allowed). Consider refactoring. Open
setClass: function(element, add, remove, options) {
options = parseAnimateOptions(options);
var STORAGE_KEY = '$$animateClasses';
element = angular.element(element);
Function exports
has a Cognitive Complexity of 16 (exceeds 5 allowed). Consider refactoring. Open
module.exports = function () {
var Stack = function Stack() {
this.stack = [];
};
- 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"