Showing 463 of 463 total issues
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"
Further reading
Function cacheFactory
has 72 lines of code (exceeds 25 allowed). Consider refactoring. Open
function cacheFactory(cacheId, options) {
if (cacheId in caches) {
throw Error('cacheId ' + cacheId + ' taken');
}
Function FormController
has 71 lines of code (exceeds 25 allowed). Consider refactoring. Open
function FormController(element, attrs) {
var form = this,
parentForm = element.parent().controller('form') || nullFormCtrl,
invalidCount = 0, // used to easily determine if we are valid
errors = form.$error = {};
Function matcherFromGroupMatchers
has 71 lines of code (exceeds 25 allowed). Consider refactoring. Open
function matcherFromGroupMatchers( elementMatchers, setMatchers ) {
// A counter to specify which element is currently being matched
var matcherCachedRuns = 0,
bySet = setMatchers.length > 0,
byElement = elementMatchers.length > 0,
Function add
has 71 lines of code (exceeds 25 allowed). Consider refactoring. Open
add: function( elem, types, handler, data, selector ) {
var handleObjIn, eventHandle, tmp,
events, t, handleObj,
special, handlers, type, namespaces, origType,
File controllers.js
has 283 lines of code (exceeds 250 allowed). Consider refactoring. Open
/**
* Network Tab Controller.
*/
(function(ng, $) {
Function tokenizeFormatString
has a Cognitive Complexity of 20 (exceeds 5 allowed). Consider refactoring. Open
String.tokenizeFormatString = function(format, formatters)
{
var tokens = [];
var substitutionIndex = 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 ngRepeatWatch
has 67 lines of code (exceeds 25 allowed). Consider refactoring. Open
scope.$watch(function ngRepeatWatch(scope){
var index, length,
collection = scope.$eval(rhs),
cursor = iterStartElement, // current position of the node
// Same as lastOrder but it has the current state. It will become the
Function done
has 67 lines of code (exceeds 25 allowed). Consider refactoring. Open
function done( status, nativeStatusText, responses, headers ) {
var isSuccess, success, error, response, modified,
statusText = nativeStatusText;
// Called once