Showing 2,008 of 4,250 total issues
prototype
has 26 functions (exceeds 20 allowed). Consider refactoring. Open
ASTInterpreter.prototype = {
compile: function(ast) {
var self = this;
findConstantAndWatchExpressions(ast, self.$filter);
var assignable;
Function compile
has 75 lines of code (exceeds 25 allowed). Consider refactoring. Open
compile: function(elem, attr) {
if (attr.hasOwnProperty(ARIA_DISABLE_ATTR)) return;
var shape = getShape(attr, elem);
File form.js
has 291 lines of code (exceeds 250 allowed). Consider refactoring. Open
'use strict';
/* global -nullFormCtrl, -PENDING_CLASS, -SUBMITTED_CLASS
*/
var nullFormCtrl = {
Function baseInputType
has 74 lines of code (exceeds 25 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.
File shared.js
has 289 lines of code (exceeds 250 allowed). Consider refactoring. Open
'use strict';
var ELEMENT_NODE = 1;
var COMMENT_NODE = 8;
Function compileNodes
has 73 lines of code (exceeds 25 allowed). Consider refactoring. Open
function compileNodes(nodeList, transcludeFn, $rootElement, maxPriority, ignoreDirective,
previousCompileContext) {
var linkFns = [],
// `nodeList` can be either an element's `.childNodes` (live NodeList)
// or a jqLite/jQuery collection or an array
Function $ControllerProvider
has 73 lines of code (exceeds 25 allowed). Consider refactoring. Open
function $ControllerProvider() {
var controllers = {};
/**
* @ngdoc method
Function outputLocale
has 73 lines of code (exceeds 25 allowed). Consider refactoring. Open
function outputLocale(localeInfo, localeID) {
var fallBackID = localeID.match(/[A-Za-z]+/)[0],
localeObj = localeInfo[localeID],
fallBackObj = localeInfo[fallBackID];
Function addSetValidityMethod
has 72 lines of code (exceeds 25 allowed). Consider refactoring. Open
function addSetValidityMethod(context) {
var clazz = context.clazz,
set = context.set,
unset = context.unset;
Function module
has 71 lines of code (exceeds 25 allowed). Consider refactoring. Open
return function module(name, requires, configFn) {
var info = {};
var assertNotHasOwnProperty = function(name, context) {
File angularFiles.js
has 284 lines of code (exceeds 250 allowed). Consider refactoring. Open
'use strict';
var angularFiles = {
'angularSrc': [
'src/minErr.js',
Function ngIncludeDirective
has 70 lines of code (exceeds 25 allowed). Consider refactoring. Open
function($templateRequest, $anchorScroll, $animate) {
return {
restrict: 'ECA',
priority: 400,
terminal: true,
Function registerOption
has 70 lines of code (exceeds 25 allowed). Consider refactoring. Open
self.registerOption = function(optionScope, optionElement, optionAttrs, interpolateValueFn, interpolateTextFn) {
if (optionAttrs.$attr.ngValue) {
// The value attribute is set by ngValue
var oldVal, hashedVal;
Function ngMessageDirectiveFactory
has 70 lines of code (exceeds 25 allowed). Consider refactoring. Open
function ngMessageDirectiveFactory(isDefault) {
return ['$animate', function($animate) {
return {
restrict: 'AE',
transclude: 'element',
Function post
has 69 lines of code (exceeds 25 allowed). Consider refactoring. Open
post: function(scope, elem, attr, ngModel) {
var needsTabIndex = shouldAttachAttr('tabindex', 'tabindex', elem, false);
function ngAriaWatchModelValue() {
return ngModel.$modelValue;
Function ngIfDirective
has a Cognitive Complexity of 20 (exceeds 5 allowed). Consider refactoring. Open
var ngIfDirective = ['$animate', '$compile', function($animate, $compile) {
return {
multiElement: true,
transclude: 'element',
priority: 600,
- 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 ngPluralizeDirective
has a Cognitive Complexity of 20 (exceeds 5 allowed). Consider refactoring. Open
var ngPluralizeDirective = ['$locale', '$interpolate', '$log', function($locale, $interpolate, $log) {
var BRACE = /{}/g,
IS_WHEN = /^when(Minus)?(.+)$/;
return {
- 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 $LogProvider
has a Cognitive Complexity of 20 (exceeds 5 allowed). Consider refactoring. Open
function $LogProvider() {
var debug = true,
self = this;
/**
- 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 $HttpParamSerializerJQLikeProvider
has a Cognitive Complexity of 20 (exceeds 5 allowed). Consider refactoring. Open
function $HttpParamSerializerJQLikeProvider() {
/**
* @ngdoc service
* @name $httpParamSerializerJQLike
*
- 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 $$AnimateJsDriverProvider
has a Cognitive Complexity of 20 (exceeds 5 allowed). Consider refactoring. Open
var $$AnimateJsDriverProvider = ['$$animationProvider', /** @this */ function($$animationProvider) {
$$animationProvider.drivers.push('$$animateJsDriver');
this.$get = ['$$animateJs', '$$AnimateRunner', function($$animateJs, $$AnimateRunner) {
return function initDriverFn(animationDetails) {
if (animationDetails.from && animationDetails.to) {
- 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"