Showing 2,008 of 4,250 total issues
File http.js
has 445 lines of code (exceeds 250 allowed). Consider refactoring. Open
'use strict';
var APPLICATION_JSON = 'application/json';
var CONTENT_TYPE_APPLICATION_JSON = {'Content-Type': APPLICATION_JSON + ';charset=utf-8'};
var JSON_START = /^\[|^\{(?!\{)/;
File location.js
has 442 lines of code (exceeds 250 allowed). Consider refactoring. Open
'use strict';
/* global stripHash: true */
var PATH_MATCH = /^([^?#]*)(\?([^#]*))?(#(.*))?$/,
DEFAULT_PORTS = {'http': 80, 'https': 443, 'ftp': 21};
Function rangeInputType
has a Cognitive Complexity of 43 (exceeds 5 allowed). Consider refactoring. Open
function rangeInputType(scope, element, attr, ctrl, $sniffer, $browser) {
badInputChecker(scope, element, attr, ctrl, 'range');
numberFormatterParser(ctrl);
baseInputType(scope, element, attr, ctrl, $sniffer, $browser);
- 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 $AnimateProvider
has a Cognitive Complexity of 43 (exceeds 5 allowed). Consider refactoring. Open
var $AnimateProvider = ['$provide', /** @this */ function($provide) {
var provider = this;
var classNameFilter = null;
var customFilter = null;
- 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 $$AnimationProvider
has a Cognitive Complexity of 43 (exceeds 5 allowed). Consider refactoring. Open
var $$AnimationProvider = ['$animateProvider', /** @this */ function($animateProvider) {
var NG_ANIMATE_REF_ATTR = 'ng-animate-ref';
var drivers = this.drivers = [];
- 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 ngRepeatDirective
has 164 lines of code (exceeds 25 allowed). Consider refactoring. Open
var ngRepeatDirective = ['$parse', '$animate', '$compile', function($parse, $animate, $compile) {
var NG_REMOVED = '$$NG_REMOVED';
var ngRepeatMinErr = minErr('ngRepeat');
var updateScope = function(scope, index, valueIdentifier, value, keyIdentifier, key, arrayLength) {
Function forEach
has a Cognitive Complexity of 42 (exceeds 5 allowed). Consider refactoring. Open
function forEach(obj, iterator, context) {
var key, length;
if (obj) {
if (isFunction(obj)) {
for (key in obj) {
- 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 $LocationProvider
has 160 lines of code (exceeds 25 allowed). Consider refactoring. Open
function $LocationProvider() {
var hashPrefix = '!',
html5Mode = {
enabled: false,
requireBase: true,
Function $LocationProvider
has a Cognitive Complexity of 41 (exceeds 5 allowed). Consider refactoring. Open
function $LocationProvider() {
var hashPrefix = '!',
html5Mode = {
enabled: false,
requireBase: true,
- 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
File ngModel.js
has 418 lines of code (exceeds 250 allowed). Consider refactoring. Open
'use strict';
/* global VALID_CLASS: true,
INVALID_CLASS: true,
PRISTINE_CLASS: true,
File messageFormatParser.js
has 417 lines of code (exceeds 250 allowed). Consider refactoring. Open
'use strict';
// NOTE: ADVANCED_OPTIMIZATIONS mode.
//
// This file is compiled with Closure compiler's ADVANCED_OPTIMIZATIONS flag! Be wary of using
Function deepCompare
has a Cognitive Complexity of 39 (exceeds 5 allowed). Consider refactoring. Open
function deepCompare(actual, expected, comparator, anyPropertyKey, matchAgainstAnyProp, dontMatchWholeObject) {
var actualType = getTypeForFilter(actual);
var expectedType = getTypeForFilter(expected);
if ((expectedType === 'string') && (expected.charAt(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 generatePagesDataProcessor
has 145 lines of code (exceeds 25 allowed). Consider refactoring. Open
module.exports = function generatePagesDataProcessor(log) {
var navGroupMappers = {
api: function(areaPages, area) {
Function publishExternalAPI
has 144 lines of code (exceeds 25 allowed). Consider refactoring. Open
function publishExternalAPI(angular) {
extend(angular, {
'errorHandlingConfig': errorHandlingConfig,
'bootstrap': bootstrap,
'copy': copy,
Function $AnchorScrollProvider
has a Cognitive Complexity of 38 (exceeds 5 allowed). Consider refactoring. Open
function $AnchorScrollProvider() {
var autoScrollingEnabled = true;
/**
- 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 $SceDelegateProvider
has 143 lines of code (exceeds 25 allowed). Consider refactoring. Open
function $SceDelegateProvider() {
this.SCE_CONTEXTS = SCE_CONTEXTS;
// Resource URLs can also be trusted by policy.
var trustedResourceUrlList = ['self'],
Function nodeLinkFn
has 140 lines of code (exceeds 25 allowed). Consider refactoring. Open
function nodeLinkFn(childLinkFn, scope, linkNode, $rootElement, boundTranscludeFn) {
var i, ii, linkFn, isolateScope, controllerScope, elementControllers, transcludeFn, $element,
attrs, scopeBindingInfo;
if (compileNode === linkNode) {
Function NgMessagesCtrl
has 138 lines of code (exceeds 25 allowed). Consider refactoring. Open
controller: ['$element', '$scope', '$attrs', function NgMessagesCtrl($element, $scope, $attrs) {
var ctrl = this;
var latestKey = 0;
var nextAttachId = 0;
Function $InterpolateProvider
has 137 lines of code (exceeds 25 allowed). Consider refactoring. Open
function $InterpolateProvider() {
var startSymbol = '{{';
var endSymbol = '}}';
/**
Function $$IntervalFactoryProvider
has a Cognitive Complexity of 36 (exceeds 5 allowed). Consider refactoring. Open
function $$IntervalFactoryProvider() {
this.$get = ['$browser', '$q', '$$q', '$rootScope',
function($browser, $q, $$q, $rootScope) {
return function intervalFactory(setIntervalFn, clearIntervalFn) {
return function intervalFn(fn, delay, count, invokeApply) {
- 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"