sahat/satellizer

View on GitHub

Showing 300 of 562 total issues

Avoid deeply nested control flow statements.
Open

          for (y = 0; y < splitClasses.length; y++) {
            cssClass = splitClasses[y].trim();
            if (existingClasses.indexOf(' ' + cssClass + ' ') === -1) {
              existingClasses += cssClass + ' ';
            }
Severity: Major
Found in examples/ionic/www/lib/ionic/js/ionic-angular.js - About 45 mins to fix

    Avoid deeply nested control flow statements.
    Open

                if (tmp && tmp.parentHistoryId === hist.parentHistoryId) {
                  direction = DIRECTION_SWAP;
                }
    Severity: Major
    Found in examples/ionic/www/lib/ionic/js/ionic-angular.js - About 45 mins to fix

      Avoid deeply nested control flow statements.
      Open

                    if (!foundHistoryId) {
                      return true;
                    }
      Severity: Major
      Found in examples/ionic/www/lib/ionic/js/ionic-angular.js - About 45 mins to fix

        Function create has 6 arguments (exceeds 4 allowed). Consider refactoring.
        Open

            create: function(navViewCtrl, viewLocals, enteringView, leavingView, renderStart, renderEnd) {
        Severity: Minor
        Found in examples/ionic/www/lib/ionic/js/ionic-angular.js - About 45 mins to fix

          Function render has 6 arguments (exceeds 4 allowed). Consider refactoring.
          Open

            self.render = function(registerData, viewLocals, enteringView, leavingView, renderStart, renderEnd) {
          Severity: Minor
          Found in examples/ionic/www/lib/ionic/js/ionic-angular.js - About 45 mins to fix

            Avoid deeply nested control flow statements.
            Open

                    if (initHeight) viewportProperties.height = '0';
            Severity: Major
            Found in examples/ionic/www/lib/ionic/js/ionic.js - About 45 mins to fix

              Avoid deeply nested control flow statements.
              Open

                      if (initHeight) viewportProperties.height = '0';
              Severity: Major
              Found in examples/ionic/www/lib/ionic/js/ionic.js - About 45 mins to fix

                Function rectContains has 6 arguments (exceeds 4 allowed). Consider refactoring.
                Open

                    rectContains: function(x, y, x1, y1, x2, y2) {
                Severity: Minor
                Found in examples/ionic/www/lib/ionic/js/ionic.js - About 45 mins to fix

                  Avoid deeply nested control flow statements.
                  Open

                              if (!self.__enableScrollX && self.__refreshHeight != null) {
                  
                                // hide the refresher when it's behind the header bar in case of header transparency
                                if (scrollTop < 0) {
                                  self.__refreshHidden = false;
                  Severity: Major
                  Found in examples/ionic/www/lib/ionic/js/ionic.js - About 45 mins to fix

                    Function __init__ has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring.
                    Open

                        def __init__(self, email=None, password=None, display_name=None,
                                     facebook=None, github=None, google=None, linkedin=None,
                                     twitter=None, bitbucket=None):
                            if email:
                                self.email = email.lower()
                    Severity: Minor
                    Found in examples/server/python/app.py - About 45 mins to fix

                    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

                    Avoid deeply nested control flow statements.
                    Open

                              if (isArray(encoded)) {
                                result += map(encoded, encodeDashes).join("-");
                              } else {
                                result += encodeURIComponent(encoded);
                              }
                    Severity: Major
                    Found in examples/ionic/www/lib/ionic/js/angular-ui/angular-ui-router.js - About 45 mins to fix

                      Avoid deeply nested control flow statements.
                      Open

                                  if (!self.__refreshActive) {
                                    self.__startDeceleration(timeStamp);
                                  }
                      Severity: Major
                      Found in examples/ionic/www/lib/ionic/js/ionic.js - About 45 mins to fix

                        Function start has 6 arguments (exceeds 4 allowed). Consider refactoring.
                        Open

                            start: function(stepCallback, verifyCallback, completedCallback, duration, easingMethod, root) {
                        Severity: Minor
                        Found in examples/ionic/www/lib/ionic/js/ionic.js - About 45 mins to fix

                          Avoid deeply nested control flow statements.
                          Open

                                    } else if (scrollTop > maxScrollTop) {
                          
                                      scrollTop = maxScrollTop;
                          
                                    } else {
                          Severity: Major
                          Found in examples/ionic/www/lib/ionic/js/ionic.js - About 45 mins to fix

                            Function bitbucket has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring.
                            Open

                            def bitbucket():
                                access_token_url = 'https://bitbucket.org/site/oauth2/access_token'
                                users_api_url = 'https://api.bitbucket.org/2.0/user'
                                auth_encoded = base64.b64encode(
                                    "{0}:{1}".format(request.json['clientId'],
                            Severity: Minor
                            Found in examples/server/python/app.py - About 45 mins to fix

                            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

                            Avoid deeply nested control flow statements.
                            Open

                                  } else if (version == 7) {
                                    //iPhone == 7.0 WebView
                                    viewportProperties.height = DEVICE_HEIGHT;
                                  }
                            Severity: Major
                            Found in examples/ionic/www/lib/ionic/js/ionic.js - About 45 mins to fix

                              Consider simplifying this complex logical expression.
                              Open

                                      if ( !(button > 1 || e.ctrlKey || e.metaKey || e.shiftKey || element.attr('target')) ) {
                                        // HACK: This is to allow ng-clicks to be processed before the transition is initiated:
                                        var transition = $timeout(function() {
                                          $state.go(ref.state, params, options);
                                        });
                              Severity: Major
                              Found in examples/ionic/www/lib/ionic/js/angular-ui/angular-ui-router.js - About 40 mins to fix

                                Consider simplifying this complex logical expression.
                                Open

                                    if ((isBackShown && isNavBackShown && isBackEnabled) !== isBackElementShown) {
                                      isBackElementShown = isBackShown && isNavBackShown && isBackEnabled;
                                      ele = getEle(BACK_BUTTON);
                                      ele && ele.classList[ isBackElementShown ? 'remove' : 'add' ](HIDE);
                                    }
                                Severity: Major
                                Found in examples/ionic/www/lib/ionic/js/ionic-angular.js - About 40 mins to fix

                                  Consider simplifying this complex logical expression.
                                  Open

                                        if (!self.options.freeze && scrollParent === self.__container) {
                                  
                                          self.hintResize();
                                          self.scrollBy(
                                            (e.wheelDeltaX || e.deltaX || 0) / self.options.wheelDampen,
                                  Severity: Major
                                  Found in examples/ionic/www/lib/ionic/js/ionic.js - About 40 mins to fix

                                    Consider simplifying this complex logical expression.
                                    Open

                                      if (!("classList" in document.documentElement) && Object.defineProperty && typeof HTMLElement !== 'undefined') {
                                        Object.defineProperty(HTMLElement.prototype, 'classList', {
                                          get: function() {
                                            var self = this;
                                            function update(fn) {
                                    Severity: Major
                                    Found in examples/ionic/www/lib/ionic/js/ionic.js - About 40 mins to fix
                                      Severity
                                      Category
                                      Status
                                      Source
                                      Language