Showing 295 of 1,635 total issues
Function create
has 212 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
create: function(navViewCtrl, viewLocals, enteringView, leavingView, renderStart, renderEnd) {
// get a reference to an entering/leaving element if they exist
// loop through to see if the view is already in the navViewElement
var enteringEle, leavingEle;
var transitionId = ++transitionCounter;
Function $get
has 211 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
function $get( $rootScope, $q, $view, $injector, $resolve, $stateParams, $urlRouter, $location, $urlMatcherFactory) {
var TransitionSuperseded = $q.reject(new Error('transition superseded'));
var TransitionPrevented = $q.reject(new Error('transition prevented'));
var TransitionAborted = $q.reject(new Error('transition aborted'));
Function $get
has 209 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
this.$get = ['$http', '$q', function($http, $q) {
var noop = angular.noop,
forEach = angular.forEach,
extend = angular.extend,
Function $$AnimateJsProvider
has 203 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
var $$AnimateJsProvider = ['$animateProvider', function($animateProvider) {
this.$get = ['$injector', '$$AnimateRunner', '$$rAFMutex', '$$jqLite',
function($injector, $$AnimateRunner, $$rAFMutex, $$jqLite) {
var applyAnimationClasses = applyAnimationClassesFactory($$jqLite);
Function $get
has 200 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
function($injector, $$AnimateRunner, $$rAFMutex, $$jqLite) {
var applyAnimationClasses = applyAnimationClassesFactory($$jqLite);
// $animateJs(element, 'enter');
return function(element, event, classes, options) {
Function __initEventHandlers
has 190 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
__initEventHandlers: function() {
var self = this;
// Event Handler
var container = self.__container;
Function register
has 188 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
register: function(parentScope, viewLocals) {
var currentStateId = getCurrentStateId(),
hist = getHistory(parentScope),
currentView = viewHistory.currentView,
Function zoom
has a Cognitive Complexity of 47 (exceeds 5 allowed). Consider refactoring. Open
Open
var zoom = (function(){
// The current zoom level (scale)
var level = 1;
- 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 $$AnimateCssDriverProvider
has 180 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
var $$AnimateCssDriverProvider = ['$$animationProvider', function($$animationProvider) {
$$animationProvider.drivers.push('$$animateCssDriver');
var NG_ANIMATE_SHIM_CLASS_NAME = 'ng-animate-shim';
var NG_ANIMATE_ANCHOR_CLASS_NAME = 'ng-anchor';
Function $get
has 172 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
function($animateCss, $rootScope, $$AnimateRunner, $rootElement, $document, $sniffer) {
// only browsers that support these properties can render animations
if (!$sniffer.animations && !$sniffer.transitions) return noop;
Function queueAnimation
has 155 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
function queueAnimation(element, event, options) {
var node, parent;
element = stripCommentsFromElement(element);
if (element) {
node = getDomNode(element);
Function zoom
has 152 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
var zoom = (function(){
// The current zoom level (scale)
var level = 1;
Function $UrlRouterProvider
has 143 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
function $UrlRouterProvider( $locationProvider, $urlMatcherFactory) {
var rules = [], otherwise = null, interceptDeferred = false, listener;
// Returns a string that is a prefix of all strings matching the RegExp
function regExpPrefix(re) {
Function RevealSearch
has 137 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
var RevealSearch = (function() {
var matchedSlides;
var currentMatchedIndex;
var searchboxDirty;
Function compile
has 135 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
compile: function(element, attr) {
element.addClass('menu-content pane');
return { pre: prelink };
function prelink($scope, $element, $attr, sideMenuCtrl) {
Function resourceFactory
has 133 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
function resourceFactory(url, paramDefaults, actions, options) {
var route = new Route(url, options);
actions = extend({}, provider.defaults.actions, actions);
Function prelink
has 131 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
function prelink($scope, $element, $attr, sideMenuCtrl) {
var startCoord = null;
var primaryScrollAxis = null;
if (isDefined(attr.dragContent)) {
Function exports
has 127 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
module.exports = function(grunt) {
var port = grunt.option('port') || 8001;
// Project configuration
grunt.initConfig({
pkg: grunt.file.readJSON('package.json'),
Function $Resolve
has 124 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
function $Resolve( $q, $injector) {
var VISIT_IN_PROGRESS = 1,
VISIT_DONE = 2,
NOTHING = {},
Function DynamicViewType
has 122 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
function DynamicViewType() {
var self = this;
var debouncedScrollViewSetDimensions = ionic.debounce(scrollViewSetDimensions, 25, true);
var calculateDimensions = isGridView ? calculateDimensionsGrid : calculateDimensionsList;
var dimensionsIndex;