Showing 371 of 463 total issues
File angular.js
has 6446 lines of code (exceeds 250 allowed). Consider refactoring. Open
Open
/**
* @license AngularJS v1.0.8
* (c) 2010-2012 Google, Inc. http://angularjs.org
* License: MIT
*/
File jquery.js
has 6037 lines of code (exceeds 250 allowed). Consider refactoring. Open
Open
/*!
* jQuery JavaScript Library v2.0.3
* http://jquery.com/
*
* Includes Sizzle.js
Function $CompileProvider
has 672 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
function $CompileProvider($provide) {
var hasDirectives = {},
Suffix = 'Directive',
COMMENT_DIRECTIVE_REGEXP = /^\s*directive\:\s*([\d\w\-_]+)\s+(.*)$/,
CLASS_DIRECTIVE_REGEXP = /(([\d\w\-_]+)(?:\:([^;]+))?;?)/,
Function $get
has 619 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
function($injector, $interpolate, $exceptionHandler, $http, $templateCache, $parse,
$controller, $rootScope, $document) {
var Attributes = function(element, attr) {
this.$$element = element;
File es5-shim.js
has 764 lines of code (exceeds 250 allowed). Consider refactoring. Open
Open
// Copyright 2009-2012 by contributors, MIT License
// vim: ts=4 sts=4 sw=4 expandtab
// Module systems magic dance
(function (definition) {
Function parser
has 335 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
function parser(text, json, $filter, csp){
var ZERO = valueFn(0),
value,
tokens = lex(text, csp),
assignment = _assignment,
Function selectDirective
has 302 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
var selectDirective = ['$compile', '$parse', function($compile, $parse) {
//0000111110000000000022220000000000000000000000333300000000000000444444444444444440000000005555555555555555500000006666666666666666600000000000000077770
var NG_OPTIONS_REGEXP = /^\s*(.*?)(?:\s+as\s+(.*?))?(?:\s+group\s+by\s+(.*))?\s+for\s+(?:([\$\w][\$\w\d]*)|(?:\(\s*([\$\w][\$\w\d]*)\s*,\s*([\$\w][\$\w\d]*)\s*\)))\s+in\s+(.*)$/,
nullModelCtrl = {$setViewValue: noop};
File angular-mocks.js
has 646 lines of code (exceeds 250 allowed). Consider refactoring. Open
Open
/**
* @license AngularJS v1.0.8
* (c) 2010-2012 Google, Inc. http://angularjs.org
* License: MIT
*
Function $RootScopeProvider
has 276 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
function $RootScopeProvider(){
var TTL = 10;
this.digestTtl = function(value) {
if (arguments.length) {
Function $get
has 266 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
function( $injector, $exceptionHandler, $parse) {
/**
* @ngdoc function
* @name ng.$rootScope.Scope
Function link
has 253 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
link: function(scope, element, attr, ctrls) {
// if ngModel is not defined, we don't need to do anything
if (!ctrls[1]) return;
var selectCtrl = ctrls[0],
Function ajax
has 240 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
ajax: function( url, options ) {
// If url is an object, simulate pre-1.5 signature
if ( typeof url === "object" ) {
options = url;
Function applyDirectivesToNode
has 239 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
function applyDirectivesToNode(directives, compileNode, templateAttrs, transcludeFn, jqCollection) {
var terminalPriority = -Number.MAX_VALUE,
preLinkFns = [],
postLinkFns = [],
newScopeDirective = null,
Function createHttpBackendMock
has a Cognitive Complexity of 60 (exceeds 5 allowed). Consider refactoring. Open
Open
function createHttpBackendMock($delegate, $browser) {
var definitions = [],
expectations = [],
responses = [],
responsesPush = angular.bind(responses, responses.push);
- 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
File json3.js
has 541 lines of code (exceeds 250 allowed). Consider refactoring. Open
Open
/*! JSON v3.2.5 | http://bestiejs.github.io/json3 | Copyright 2012-2013, Kit Cambridge | http://kit.mit-license.org */
;(function (window) {
// Convenience aliases.
var getClass = {}.toString, isProperty, forEach, undef;
Function lex
has 213 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
function lex(text, csp){
var tokens = [],
token,
index = 0,
json = [],
Function setDocument
has 200 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
setDocument = Sizzle.setDocument = function( node ) {
var doc = node ? node.ownerDocument || node : preferredDoc,
parent = doc.defaultView;
// If no document and documentElement is available, return
Function exports
has 197 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
module.exports = function (grunt) {
require('load-grunt-tasks')(grunt);
require('time-grunt')(grunt);
// configurable paths
Function $HttpProvider
has 191 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
function $HttpProvider() {
var JSON_START = /^\s*(\[|\{[^\{])/,
JSON_END = /[\}\]]\s*$/,
PROTECTION_PREFIX = /^\)\]\}',?\n/;
Function Options
has 172 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
function Options(scope, selectElement, ctrl) {
var match;
if (! (match = optionsExp.match(NG_OPTIONS_REGEXP))) {
throw Error(