sahat/satellizer

View on GitHub

Showing 300 of 562 total issues

Consider simplifying this complex logical expression.
Open

    if (self.__isDragging) {
        self.__decStopped = false;

      // Compute move distance
      var moveX = currentTouchLeft - self.__lastTouchLeft;
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 (self.options.freeze || !self.__isDown ||
            (!self.__isDown && e.defaultPrevented) ||
            (e.target.tagName === 'TEXTAREA' && e.target.parentElement.querySelector(':focus')) ) {
            return;
          }
    Severity: Major
    Found in examples/ionic/www/lib/ionic/js/ionic.js - About 40 mins to fix

      Function postLink has 5 arguments (exceeds 4 allowed). Consider refactoring.
      Open

        function postLink(scope, element, attr, scrollCtrl, transclude) {
      Severity: Minor
      Found in examples/ionic/www/lib/ionic/js/ionic-angular.js - About 35 mins to fix

        Function animate has 5 arguments (exceeds 4 allowed). Consider refactoring.
        Open

                animate: function(element, from, to, className, options) {
        Severity: Minor
        Found in examples/ionic/www/lib/ionic/js/angular/angular-animate.js - About 35 mins to fix

          Function animateAfter has 5 arguments (exceeds 4 allowed). Consider refactoring.
          Open

                function animateAfter(animationEvent, element, className, afterAnimationComplete, styles) {
          Severity: Minor
          Found in examples/ionic/www/lib/ionic/js/angular/angular-animate.js - About 35 mins to fix

            Function animateRun has 5 arguments (exceeds 4 allowed). Consider refactoring.
            Open

                  function animateRun(animationEvent, element, className, activeAnimationComplete, styles) {
            Severity: Minor
            Found in examples/ionic/www/lib/ionic/js/angular/angular-animate.js - About 35 mins to fix

              Function setClass has 5 arguments (exceeds 4 allowed). Consider refactoring.
              Open

                      setClass: function(element, add, remove, animationCompleted, options) {
              Severity: Minor
              Found in examples/ionic/www/lib/ionic/js/angular/angular-animate.js - About 35 mins to fix

                Function beforeSetClass has 5 arguments (exceeds 4 allowed). Consider refactoring.
                Open

                        beforeSetClass: function(element, add, remove, animationCompleted, options) {
                Severity: Minor
                Found in examples/ionic/www/lib/ionic/js/angular/angular-animate.js - About 35 mins to fix

                  Function animate has 5 arguments (exceeds 4 allowed). Consider refactoring.
                  Open

                        function animate(animationEvent, element, className, animationComplete, options) {
                  Severity: Minor
                  Found in examples/ionic/www/lib/ionic/js/angular/angular-animate.js - About 35 mins to fix

                    Function setDimensions has 5 arguments (exceeds 4 allowed). Consider refactoring.
                    Open

                      setDimensions: function(clientWidth, clientHeight, contentWidth, contentHeight, continueScrolling) {
                    Severity: Minor
                    Found in examples/ionic/www/lib/ionic/js/ionic.js - About 35 mins to fix

                      Function open has 5 arguments (exceeds 4 allowed). Consider refactoring.
                      Open

                              Popup.prototype.open = function (url, name, popupOptions, redirectUri, dontPoll) {
                      Severity: Minor
                      Found in examples/ionic/www/lib/satellizer/dist/satellizer.js - About 35 mins to fix

                        Function scrollTo has 5 arguments (exceeds 4 allowed). Consider refactoring.
                        Open

                          scrollTo: function(left, top, animate, zoom, wasResize) {
                        Severity: Minor
                        Found in examples/ionic/www/lib/ionic/js/ionic.js - About 35 mins to fix

                          Function __publish has 5 arguments (exceeds 4 allowed). Consider refactoring.
                          Open

                            __publish: function(left, top, zoom, animate, wasResize) {
                          Severity: Minor
                          Found in examples/ionic/www/lib/ionic/js/ionic.js - About 35 mins to fix

                            Function AuthUser has 5 return statements (exceeds 4 allowed).
                            Open

                            func AuthUser(db *mgo.Database, email, password string) (*User, *Error) {
                                uC := db.C("users")
                                user := &User{}
                                err := uC.Find(bson.M{"email": email}).One(user)
                                if err != nil {
                            Severity: Major
                            Found in examples/server/go/models.go - About 35 mins to fix

                              Function google has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring.
                              Open

                              def google():
                                  access_token_url = 'https://accounts.google.com/o/oauth2/token'
                                  people_api_url = 'https://www.googleapis.com/plus/v1/people/me/openIdConnect'
                              
                                  payload = dict(client_id=request.json['clientId'],
                              Severity: Minor
                              Found in examples/server/python/app.py - About 35 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

                              Function github has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring.
                              Open

                              def github():
                                  access_token_url = 'https://github.com/login/oauth/access_token'
                                  users_api_url = 'https://api.github.com/user'
                              
                                  params = {
                              Severity: Minor
                              Found in examples/server/python/app.py - About 35 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

                              Function facebook has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring.
                              Open

                              def facebook():
                                  access_token_url = 'https://graph.facebook.com/v2.3/oauth/access_token'
                                  graph_api_url = 'https://graph.facebook.com/v2.3/me'
                              
                                  params = {
                              Severity: Minor
                              Found in examples/server/python/app.py - About 35 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

                              Function linkedin has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring.
                              Open

                              def linkedin():
                                  access_token_url = 'https://www.linkedin.com/uas/oauth2/accessToken'
                                  people_api_url = 'https://api.linkedin.com/v1/people/~:(id,first-name,last-name,email-address)'
                              
                                  payload = dict(client_id=request.json['clientId'],
                              Severity: Minor
                              Found in examples/server/python/app.py - About 35 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 too many return statements within this function.
                              Open

                                              return true;
                              Severity: Major
                              Found in examples/ionic/www/lib/ionic/js/ionic-angular.js - About 30 mins to fix

                                Avoid too many return statements within this function.
                                Open

                                      return currentHistoryId ? currentHistoryId == 'root' : true;
                                Severity: Major
                                Found in examples/ionic/www/lib/ionic/js/ionic-angular.js - About 30 mins to fix
                                  Severity
                                  Category
                                  Status
                                  Source
                                  Language