Showing 2,008 of 4,250 total issues
Function ngRepeatLink
has 95 lines of code (exceeds 25 allowed). Consider refactoring. Open
return function ngRepeatLink($scope, $element, $attr, ctrl, $transclude) {
// Store a list of elements from previous run. This is a hash where key is the item from the
// iterator, and the value is objects with following properties.
// - scope: bound scope
Function $get
has 94 lines of code (exceeds 25 allowed). Consider refactoring. Open
this.$get = function() {
var caches = {};
function cacheFactory(cacheId, options) {
if (cacheId in caches) {
Function TzDate
has 94 lines of code (exceeds 25 allowed). Consider refactoring. Open
angular.mock.TzDate = function(offset, timestamp) {
var self = new Date(0);
if (angular.isString(timestamp)) {
var tsStr = timestamp;
Function ngTranscludeDirective
has a Cognitive Complexity of 26 (exceeds 5 allowed). Consider refactoring. Open
var ngTranscludeDirective = ['$compile', function($compile) {
return {
restrict: 'EAC',
compile: function ngTranscludeCompile(tElement) {
- 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 TaskTracker
has a Cognitive Complexity of 26 (exceeds 5 allowed). Consider refactoring. Open
function TaskTracker(log) {
var self = this;
var taskCounts = {};
var taskCallbacks = [];
- 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 ngRepeatAction
has 92 lines of code (exceeds 25 allowed). Consider refactoring. Open
$scope.$watchCollection(rhs, function ngRepeatAction(collection) {
var index, length,
previousNode = $element[0], // node that cloned nodes should be inserted after
// initialized to the comment node anchor
nextNode,
Function $interpolate
has 92 lines of code (exceeds 25 allowed). Consider refactoring. Open
function $interpolate(text, mustHaveExpression, trustedContext, allOrNothing) {
var contextAllowsConcatenation = trustedContext === $sce.URL || trustedContext === $sce.MEDIA_URL;
// Provide a quick exit and simplified result function for text with no interpolation
if (!text.length || text.indexOf(startSymbol) === -1) {
Function prepareAnchoredAnimation
has 92 lines of code (exceeds 25 allowed). Consider refactoring. Open
function prepareAnchoredAnimation(classes, outAnchor, inAnchor) {
var clone = jqLite(getDomNode(outAnchor).cloneNode(true));
var startingClasses = filterCssClasses(getClassVal(clone));
outAnchor.addClass(NG_ANIMATE_SHIM_CLASS_NAME);
Function createDateInputType
has 91 lines of code (exceeds 25 allowed). Consider refactoring. Open
function createDateInputType(type, regexp, parseDate, format) {
return function dynamicDateInputType(scope, element, attr, ctrl, $sniffer, $browser, $filter, $parse) {
badInputChecker(scope, element, attr, ctrl, type);
baseInputType(scope, element, attr, ctrl, $sniffer, $browser);
File sanitize.js
has 317 lines of code (exceeds 250 allowed). Consider refactoring. Open
'use strict';
/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
* Any commits to this file should be reviewed with security in mind. *
* Changes to this file can potentially create security vulnerabilities. *
Function $Browser
has 90 lines of code (exceeds 25 allowed). Consider refactoring. Open
angular.mock.$Browser = function($log, $$taskTrackerFactory) {
var self = this;
var taskTracker = $$taskTrackerFactory($log);
this.isMock = true;
Function baseInputType
has a Cognitive Complexity of 25 (exceeds 5 allowed). Consider refactoring. Open
function baseInputType(scope, element, attr, ctrl, $sniffer, $browser) {
var type = lowercase(element[0].type);
// In composition mode, users are still inputting intermediate text buffer,
// hold the listener until composition is 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 lex
has a Cognitive Complexity of 25 (exceeds 5 allowed). Consider refactoring. Open
lex: function(text) {
this.text = text;
this.index = 0;
this.tokens = [];
- 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 formDirectiveFactory
has a Cognitive Complexity of 25 (exceeds 5 allowed). Consider refactoring. Open
var formDirectiveFactory = function(isNgForm) {
return ['$timeout', '$parse', function($timeout, $parse) {
var formDirective = {
name: 'form',
restrict: isNgForm ? 'EAC' : 'E',
- 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 dynamicDateInputType
has 89 lines of code (exceeds 25 allowed). Consider refactoring. Open
return function dynamicDateInputType(scope, element, attr, ctrl, $sniffer, $browser, $filter, $parse) {
badInputChecker(scope, element, attr, ctrl, type);
baseInputType(scope, element, attr, ctrl, $sniffer, $browser);
var isTimeType = type === 'time' || type === 'datetimelocal';
Function $digest
has 89 lines of code (exceeds 25 allowed). Consider refactoring. Open
$digest: function() {
var watch, value, last, fn, get,
watchers,
dirty, ttl = TTL,
next, current, target = asyncQueue.length ? $rootScope : this,
Function MockHttpExpectation
has 89 lines of code (exceeds 25 allowed). Consider refactoring. Open
function MockHttpExpectation(expectedMethod, expectedUrl, expectedData, expectedHeaders,
expectedKeys) {
this.data = expectedData;
this.headers = expectedHeaders;
Function triggerAnimationStart
has 86 lines of code (exceeds 25 allowed). Consider refactoring. Open
function triggerAnimationStart() {
// just incase a stagger animation kicks in when the animation
// itself was cancelled entirely
if (animationClosed) return;
Function ngViewFactory
has a Cognitive Complexity of 24 (exceeds 5 allowed). Consider refactoring. Open
function ngViewFactory($route, $anchorScroll, $animate) {
return {
restrict: 'ECA',
terminal: true,
priority: 400,
- 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 $$CoreAnimateQueueProvider
has 85 lines of code (exceeds 25 allowed). Consider refactoring. Open
var $$CoreAnimateQueueProvider = /** @this */ function() {
var postDigestQueue = new NgMap();
var postDigestElements = [];
this.$get = ['$$AnimateRunner', '$rootScope',