Showing 371 of 463 total issues
Function nodeLinkFn
has 96 lines of code (exceeds 25 allowed). Consider refactoring. Open
function nodeLinkFn(childLinkFn, scope, linkNode, $rootElement, boundTranscludeFn) {
var attrs, $element, i, ii, linkFn, controller;
if (compileNode === linkNode) {
attrs = templateAttrs;
Function defaultPrefilter
has 93 lines of code (exceeds 25 allowed). Consider refactoring. Open
function defaultPrefilter( elem, props, opts ) {
/* jshint validthis: true */
var prop, value, toggle, tween, hooks, oldfire,
anim = this,
orig = {},
Function textInputType
has 90 lines of code (exceeds 25 allowed). Consider refactoring. Open
function textInputType(scope, element, attr, ctrl, $sniffer, $browser) {
var listener = function() {
var value = trim(element.val());
Function TzDate
has 90 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 compile
has 88 lines of code (exceeds 25 allowed). Consider refactoring. Open
compile: function(element, attr, linker) {
return function(scope, iterStartElement, attr){
var expression = attr.ngRepeat;
var match = expression.match(/^\s*(.+)\s+in\s+(.*)\s*$/),
lhs, rhs, valueIdent, keyIdent;
Function $CacheFactoryProvider
has 88 lines of code (exceeds 25 allowed). Consider refactoring. Open
function $CacheFactoryProvider() {
this.$get = function() {
var caches = {};
Function $get
has 86 lines of code (exceeds 25 allowed). Consider refactoring. Open
this.$get = function() {
var caches = {};
function cacheFactory(cacheId, options) {
if (cacheId in caches) {
Function NgModelController
has 86 lines of code (exceeds 25 allowed). Consider refactoring. Open
function($scope, $exceptionHandler, $attr, $element, $parse) {
this.$viewValue = Number.NaN;
this.$modelValue = Number.NaN;
this.$parsers = [];
this.$formatters = [];
Function HAREntryClosure
has a Cognitive Complexity of 24 (exceeds 5 allowed). Consider refactoring. Open
var HAREntry = (function HAREntryClosure() {
'use strict';
/**
* A single entry request.
- 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 htmlParser
has 85 lines of code (exceeds 25 allowed). Consider refactoring. Open
function htmlParser( html, handler ) {
var index, chars, match, stack = [], last = html;
stack.last = function() { return stack[ stack.length - 1 ]; };
while ( html ) {
Function $get
has 84 lines of code (exceeds 25 allowed). Consider refactoring. Open
function( $rootScope, $browser, $sniffer, $rootElement) {
var $location,
basePath,
pathPrefix,
initUrl = $browser.url(),
Function Animation
has 84 lines of code (exceeds 25 allowed). Consider refactoring. Open
function Animation( elem, properties, options ) {
var result,
stopped,
index = 0,
length = animationPrefilters.length,
Function trigger
has 82 lines of code (exceeds 25 allowed). Consider refactoring. Open
trigger: function( event, data, elem, onlyHandlers ) {
var i, cur, tmp, bubbleType, ontype, handle, special,
eventPath = [ elem || document ],
type = core_hasOwn.call( event, "type" ) ? event.type : event,
Function MockHttpExpectation
has a Cognitive Complexity of 23 (exceeds 5 allowed). Consider refactoring. Open
function MockHttpExpectation(method, url, data, headers) {
this.data = data;
this.headers = headers;
- 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 serialize
has 81 lines of code (exceeds 25 allowed). Consider refactoring. Open
var serialize = function (property, object, callback, properties, whitespace, indentation, stack) {
var value = object[property], className, year, month, date, time, hours, minutes, seconds, milliseconds, results, element, index, length, prefix, hasMembers, result;
try {
// Necessary for host object support.
value = object[property];
Function filterFilter
has 80 lines of code (exceeds 25 allowed). Consider refactoring. Open
function filterFilter() {
return function(array, expression) {
if (!isArray(array)) return array;
var predicates = [];
predicates.check = function(value) {
Function createHttpBackend
has 79 lines of code (exceeds 25 allowed). Consider refactoring. Open
function createHttpBackend($browser, XHR, $browserDefer, callbacks, rawDocument, locationProtocol) {
// TODO(vojta): fix the signature
return function(method, url, post, callback, headers, timeout, withCredentials) {
$browser.$$incOutstandingRequestCount();
url = url || $browser.url();
Function $InterpolateProvider
has 77 lines of code (exceeds 25 allowed). Consider refactoring. Open
function $InterpolateProvider() {
var startSymbol = '{{';
var endSymbol = '}}';
/**
Function Sizzle
has 76 lines of code (exceeds 25 allowed). Consider refactoring. Open
function Sizzle( selector, context, results, seed ) {
var match, elem, m, nodeType,
// QSA vars
i, groups, old, nid, newContext, newSelector;
Function dump
has a Cognitive Complexity of 21 (exceeds 5 allowed). Consider refactoring. Open
angular.mock.dump = function(object) {
return serialize(object);
function serialize(object) {
var out;
- 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"