Showing 2,008 of 4,250 total issues
Function $get
has 227 lines of code (exceeds 25 allowed). Consider refactoring. Open
function($injector, $$AnimateRunner, $$jqLite) {
var applyAnimationClasses = applyAnimationClassesFactory($$jqLite);
// $animateJs(element, 'enter');
return function(element, event, classes, options) {
Function recurse
has 224 lines of code (exceeds 25 allowed). Consider refactoring. Open
recurse: function(ast, intoId, nameId, recursionFn, create, skipWatchIdCheck) {
var left, right, self = this, args, expression, computed;
recursionFn = recursionFn || noop;
if (!skipWatchIdCheck && isDefined(ast.watchId)) {
intoId = intoId || this.nextId();
Function equals
has a Cognitive Complexity of 57 (exceeds 5 allowed). Consider refactoring. Open
function equals(o1, o2) {
if (o1 === o2) return true;
if (o1 === null || o2 === null) return false;
// eslint-disable-next-line no-self-compare
if (o1 !== o1 && o2 !== o2) return true; // NaN === NaN
- 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 $get
has 222 lines of code (exceeds 25 allowed). Consider refactoring. Open
function($rootScope, $location, $routeParams, $q, $injector, $templateRequest, $sce, $browser) {
/**
* @ngdoc service
* @name $route
Function createInjector
has 212 lines of code (exceeds 25 allowed). Consider refactoring. Open
function createInjector(modulesToLoad, strictDi) {
strictDi = (strictDi === true);
var INSTANTIATING = {},
providerSuffix = 'Provider',
path = [],
Function $ControllerProvider
has a Cognitive Complexity of 54 (exceeds 5 allowed). Consider refactoring. Open
function $ControllerProvider() {
var controllers = {};
/**
* @ngdoc method
- 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 createHttpBackendMock
has 204 lines of code (exceeds 25 allowed). Consider refactoring. Open
function createHttpBackendMock($rootScope, $timeout, $delegate, $browser) {
var definitions = [],
expectations = [],
matchLatestDefinition = false,
responses = [],
Function SelectController
has 201 lines of code (exceeds 25 allowed). Consider refactoring. Open
['$element', '$scope', /** @this */ function($element, $scope) {
var self = this,
optionsMap = new NgMap();
File animateQueue.js
has 483 lines of code (exceeds 250 allowed). Consider refactoring. Open
'use strict';
var NG_ANIMATE_ATTR_NAME = 'data-ng-animate';
var NG_ANIMATE_PIN_DATA = '$ngAnimatePin';
var $$AnimateQueueProvider = ['$animateProvider', /** @this */ function($animateProvider) {
Function $ParseProvider
has 187 lines of code (exceeds 25 allowed). Consider refactoring. Open
function $ParseProvider() {
var cache = createMap();
var literals = {
'true': true,
'false': false,
Function $$AnimateCssDriverProvider
has 187 lines of code (exceeds 25 allowed). Consider refactoring. Open
var $$AnimateCssDriverProvider = ['$$animationProvider', /** @this */ function($$animationProvider) {
$$animationProvider.drivers.push('$$animateCssDriver');
var NG_ANIMATE_SHIM_CLASS_NAME = 'ng-animate-shim';
var NG_ANIMATE_ANCHOR_CLASS_NAME = 'ng-anchor';
Function exports
has 185 lines of code (exceeds 25 allowed). Consider refactoring. Open
module.exports = function(config, specificOptions) {
config.set({
frameworks: ['jasmine'],
autoWatch: true,
logLevel: config.LOG_INFO,
Function $$AnimateRunnerFactoryProvider
has a Cognitive Complexity of 47 (exceeds 5 allowed). Consider refactoring. Open
var $$AnimateRunnerFactoryProvider = /** @this */ function() {
this.$get = ['$q', '$sniffer', '$$animateAsyncRun', '$$isDocumentHidden', '$timeout',
function($q, $sniffer, $$animateAsyncRun, $$isDocumentHidden, $timeout) {
var INITIAL_STATE = 0;
- 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 resourceFactory
has 181 lines of code (exceeds 25 allowed). Consider refactoring. Open
function resourceFactory(url, paramDefaults, actions, options) {
var route = new Route(url, options);
actions = extend({}, provider.defaults.actions, actions);
File Gruntfile.js
has 467 lines of code (exceeds 250 allowed). Consider refactoring. Open
'use strict';
var serveFavicon = require('serve-favicon');
var serveStatic = require('serve-static');
var serveIndex = require('serve-index');
Function $get
has 176 lines of code (exceeds 25 allowed). Consider refactoring. Open
function($animateCss, $rootScope, $$AnimateRunner, $rootElement, $sniffer, $$jqLite, $document) {
// only browsers that support these properties can render animations
if (!$sniffer.animations && !$sniffer.transitions) return noop;
Function queueAnimation
has 173 lines of code (exceeds 25 allowed). Consider refactoring. Open
function queueAnimation(originalElement, event, initialOptions) {
// we always make a copy of the options since
// there should never be any side effects on
// the input data when running `$animateCss`.
var options = copy(initialOptions);
Function $get
has 169 lines of code (exceeds 25 allowed). Consider refactoring. Open
this.$get = ['$filter', function($filter) {
var noUnsafeEval = csp().noUnsafeEval;
var $parseOptions = {
csp: noUnsafeEval,
literals: copy(literals),
Function MockHttpExpectation
has a Cognitive Complexity of 44 (exceeds 5 allowed). Consider refactoring. Open
function MockHttpExpectation(expectedMethod, expectedUrl, expectedData, expectedHeaders,
expectedKeys) {
this.data = expectedData;
this.headers = expectedHeaders;
- 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 ngOptionsPostLink
has 167 lines of code (exceeds 25 allowed). Consider refactoring. Open
function ngOptionsPostLink(scope, selectElement, attr, ctrls) {
var selectCtrl = ctrls[0];
var ngModelCtrl = ctrls[1];
var multiple = attr.multiple;