Showing 371 of 463 total issues
Function createInjector
has 168 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
function createInjector(modulesToLoad) {
var INSTANTIATING = {},
providerSuffix = 'Provider',
path = [],
loadedModules = new HashMap(),
Function $get
has 164 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
function($httpBackend, $browser, $cacheFactory, $rootScope, $q, $injector) {
var defaultCache = $cacheFactory('$http'),
responseInterceptors = [];
Function Browser
has 153 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
function Browser(window, document, $log, $sniffer) {
var self = this,
rawDocument = document[0],
location = window.location,
history = window.history,
Function $RouteProvider
has 144 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
function $RouteProvider(){
var routes = {};
/**
* @ngdoc method
Function qFactory
has 140 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
function qFactory(nextTick, exceptionHandler) {
/**
* @ngdoc
* @name ng.$q#defer
Function Callbacks
has 128 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
jQuery.Callbacks = function( options ) {
// Convert options from String-formatted to Object-formatted if needed
// (we check in cache first)
options = typeof options === "string" ?
Function createHttpBackendMock
has 127 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
function createHttpBackendMock($delegate, $browser) {
var definitions = [],
expectations = [],
responses = [],
responsesPush = angular.bind(responses, responses.push);
Function $get
has 126 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
function( $rootScope, $location, $routeParams, $q, $injector, $http, $templateCache) {
/**
* @ngdoc object
* @name ng.$route
Consider simplifying this complex logical expression. Open
Open
if ( event.pageX == null && original.clientX != null ) {
eventDoc = event.target.ownerDocument || document;
doc = eventDoc.documentElement;
body = eventDoc.body;
File jquery-migrate.js
has 371 lines of code (exceeds 250 allowed). Consider refactoring. Open
Open
/*!
* jQuery Migrate - v1.1.1 - 2013-02-16
* https://github.com/jquery/jquery-migrate
* Copyright 2005, 2013 jQuery Foundation, Inc. and other contributors; Licensed MIT
*/
Function HAREntryClosure
has 118 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
var HAREntry = (function HAREntryClosure() {
'use strict';
/**
* A single entry request.
Consider simplifying this complex logical expression. Open
Open
if (stringifySupported) {
// A test function object with a custom `toJSON` method.
(value = function () {
return 1;
}).toJSON = value;
Function render
has 113 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
function render() {
var optionGroups = {'':[]}, // Temporary location for the option groups before we render them
optionGroupNames = [''],
optionGroupName,
optionGroup,
File ui.js
has 352 lines of code (exceeds 250 allowed). Consider refactoring. Open
Open
/*!
* ui.js
* Copyright Mathias Bynens <http://mths.be/>
* Modified by John-David Dalton <http://allyoucanleet.com/>
* Available under MIT license <http://mths.be/mit>
Function extractComments
has a Cognitive Complexity of 30 (exceeds 5 allowed). Consider refactoring. Open
Open
function extractComments(source) {
var index = 0, length = source.length, results = [], symbol, position, original;
while (index < length) {
symbol = source[index];
switch (symbol) {
- 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 105 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
function $LocationProvider(){
var hashPrefix = '',
html5Mode = false;
/**
Function lex
has 104 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
var lex = function () {
var source = Source, length = source.length, value, begin, position, isSigned, charCode;
while (Index < length) {
charCode = source.charCodeAt(Index);
switch (charCode) {
Function publishExternalAPI
has 103 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
function publishExternalAPI(angular){
extend(angular, {
'bootstrap': bootstrap,
'copy': copy,
'extend': extend,
Function ResourceFactory
has 100 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
function ResourceFactory(url, paramDefaults, actions) {
var route = new Route(url);
actions = extend({}, DEFAULT_ACTIONS, actions);
File html5.js
has 330 lines of code (exceeds 250 allowed). Consider refactoring. Open
Open
/*!
* HTML5.js v1.0.0-rc
* Copyright 2012 John-David Dalton <http://allyoucanleet.com/>
* Based on HTML5 Shiv vpre3.3 | @afarkas @jon_neal @rem | MIT/GPL2 Licensed
* Available under MIT/GPL2 license