Showing 2,008 of 4,250 total issues
Function ngTranscludeDirective
has 45 lines of code (exceeds 25 allowed). Consider refactoring. Open
var ngTranscludeDirective = ['$compile', function($compile) {
return {
restrict: 'EAC',
compile: function ngTranscludeCompile(tElement) {
Function LocationHashbangUrl
has 45 lines of code (exceeds 25 allowed). Consider refactoring. Open
function LocationHashbangUrl(appBase, appBaseNoFile, hashPrefix) {
parseAbsoluteUrl(appBase, this);
Function $TimeoutProvider
has 45 lines of code (exceeds 25 allowed). Consider refactoring. Open
function $TimeoutProvider() {
this.$get = ['$rootScope', '$browser', '$q', '$$q', '$exceptionHandler',
function($rootScope, $browser, $q, $$q, $exceptionHandler) {
var deferreds = {};
Function dump
has 45 lines of code (exceeds 25 allowed). Consider refactoring. Open
angular.mock.dump = function(object) {
return serialize(object);
function serialize(object) {
var out;
Function resolveElementClasses
has 45 lines of code (exceeds 25 allowed). Consider refactoring. Open
function resolveElementClasses(existing, toAdd, toRemove) {
var ADD_CLASS = 1;
var REMOVE_CLASS = -1;
var flags = {};
Function processAllVersionsResponse
has 45 lines of code (exceeds 25 allowed). Consider refactoring. Open
function processAllVersionsResponse(versions) {
var latestMap = {};
// When the docs are built on a tagged commit, yarn info won't include the latest release,
Function link
has 44 lines of code (exceeds 25 allowed). Consider refactoring. Open
link: function(scope, element, attr) {
var numberExp = attr.count,
whenExp = attr.$attr.when && element.attr(attr.$attr.when), // we have {{}} in attrs
offset = attr.offset || 0,
whens = scope.$eval(whenExp) || {},
Function ngSwitchDirective
has 44 lines of code (exceeds 25 allowed). Consider refactoring. Open
var ngSwitchDirective = ['$animate', '$compile', function($animate, $compile) {
return {
require: 'ngSwitch',
// asks for $scope to fool the BC controller module
Function ngModelDirective
has 44 lines of code (exceeds 25 allowed). Consider refactoring. Open
var ngModelDirective = ['$rootScope', function($rootScope) {
return {
restrict: 'A',
require: ['ngModel', '^?form', '^?ngModelOptions'],
controller: NgModelController,
Function $CoreAnimateCssProvider
has 44 lines of code (exceeds 25 allowed). Consider refactoring. Open
var $CoreAnimateCssProvider = function() {
this.$get = ['$$rAF', '$q', '$$AnimateRunner', function($$rAF, $q, $$AnimateRunner) {
return function(element, initialOptions) {
// all of the animation functions should create
Function start
has 44 lines of code (exceeds 25 allowed). Consider refactoring. Open
start: function() {
if (runner) {
return runner;
}
Function readString
has a Cognitive Complexity of 14 (exceeds 5 allowed). Consider refactoring. Open
readString: function(quote) {
var start = this.index;
this.index++;
var string = '';
var rawString = quote;
- 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 isValidForStep
has a Cognitive Complexity of 14 (exceeds 5 allowed). Consider refactoring. Open
function isValidForStep(viewValue, stepBase, step) {
// At this point `stepBase` and `step` are expected to be non-NaN values
// and `viewValue` is expected to be a valid stringified number.
var value = Number(viewValue);
- 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 readNumber
has a Cognitive Complexity of 14 (exceeds 5 allowed). Consider refactoring. Open
readNumber: function() {
var number = '';
var start = this.index;
while (this.index < this.text.length) {
var ch = lowercase(this.text.charAt(this.index));
- 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 primary
has a Cognitive Complexity of 14 (exceeds 5 allowed). Consider refactoring. Open
primary: function() {
var primary;
if (this.expect('(')) {
primary = this.filterChain();
this.consume(')');
- 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 $$TestabilityProvider
has a Cognitive Complexity of 14 (exceeds 5 allowed). Consider refactoring. Open
function $$TestabilityProvider() {
this.$get = ['$rootScope', '$browser', '$location',
function($rootScope, $browser, $location) {
/**
- 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 bindJQuery
has a Cognitive Complexity of 14 (exceeds 5 allowed). Consider refactoring. Open
function bindJQuery() {
var originalCleanData;
if (bindJQueryFired) {
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 ruleInAngularExpression
has a Cognitive Complexity of 14 (exceeds 5 allowed). Consider refactoring. Open
MessageFormatParser.prototype.ruleInAngularExpression = function ruleInAngularExpression() {
var match = this.searchRe(INTERESTING_OPERATORS_RE);
var position;
if (match == null) {
if (this.angularOperatorStack.length === 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 createDateParser
has 43 lines of code (exceeds 25 allowed). Consider refactoring. Open
function createDateParser(regexp, mapping) {
return function(iso, previousDate) {
var parts, map;
if (isDate(iso)) {
Function $get
has 43 lines of code (exceeds 25 allowed). Consider refactoring. Open
this.$get = ['$parse', '$sceDelegate', function(
$parse, $sceDelegate) {
// Support: IE 9-11 only
// Prereq: Ensure that we're not running in IE<11 quirks mode. In that mode, IE < 11 allow
// the "expression(javascript expression)" syntax which is insecure.