sahat/satellizer

View on GitHub

Showing 562 of 562 total issues

Function scrollTo has 37 lines of code (exceeds 25 allowed). Consider refactoring.
Open

    scrollTo: function(left, top, animate) {
      var self = this;
      if (!animate) {
        self.el.scrollTop = top;
        self.el.scrollLeft = left;
Severity: Minor
Found in examples/ionic/www/lib/ionic/js/ionic.js - About 1 hr to fix

    Function polling has 37 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

            Popup.prototype.polling = function (redirectUri) {
                var _this = this;
                return this.$q(function (resolve, reject) {
                    var redirectUriParser = document.createElement('a');
                    redirectUriParser.href = redirectUri;
    Severity: Minor
    Found in examples/ionic/www/lib/satellizer/dist/satellizer.js - About 1 hr to fix

      Function scrollChildIntoView has 36 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

          self.scrollChildIntoView = function(e) {
            //console.log("scrollChildIntoView at: " + Date.now());
      
            // D
            var scrollBottomOffsetToTop = container.getBoundingClientRect().bottom;
      Severity: Minor
      Found in examples/ionic/www/lib/ionic/js/ionic.js - About 1 hr to fix

        Function touchmove has 36 lines of code (exceeds 25 allowed). Consider refactoring.
        Open

              touchmove: function(event) {
        
                // ensure swiping with one touch and not pinching
                // ensure sliding is enabled
                if (event.touches.length > 1 ||
        Severity: Minor
        Found in examples/ionic/www/lib/ionic/js/ionic.js - About 1 hr to fix

          Function LoginWithGoogle has a Cognitive Complexity of 27 (exceeds 20 allowed). Consider refactoring.
          Open

          func LoginWithGoogle(w http.ResponseWriter, r *http.Request) {
          
              accessTokenUrl := "https://accounts.google.com/o/oauth2/token"
              peopleApiUrl := "https://www.googleapis.com"
              peopleApiPath := "/plus/v1/people/me/openIdConnect"
          Severity: Minor
          Found in examples/server/go/oauth2.go - About 1 hr 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 LoginWithFacebook has a Cognitive Complexity of 27 (exceeds 20 allowed). Consider refactoring.
          Open

          func LoginWithFacebook(w http.ResponseWriter, r *http.Request) {
              apiUrl := "https://graph.facebook.com"
              accessTokenPath := "/v2.3/oauth/access_token"
              graphApiPath := "/v2.3/me"
          
          
          Severity: Minor
          Found in examples/server/go/oauth2.go - About 1 hr 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 twitter has a Cognitive Complexity of 12 (exceeds 5 allowed). Consider refactoring.
          Open

              public function twitter(Request $request)
              {
                  $stack = GuzzleHttp\HandlerStack::create();
          
                  // Part 1 of 2: Initial request from Satellizer.
          Severity: Minor
          Found in examples/server/php/app/Http/Controllers/AuthController.php - About 1 hr 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 fn has 35 lines of code (exceeds 25 allowed). Consider refactoring.
          Open

                  fn: function(i) {
                    return {
                      x1: 10 + (i * 14),
                      x2: 10 + (i * 14),
                      a: [{
          Severity: Minor
          Found in examples/ionic/www/lib/ionic/js/ionic-angular.js - About 1 hr to fix

            Function updatePositions has 35 lines of code (exceeds 25 allowed). Consider refactoring.
            Open

              self.updatePositions = function(titleEle, updateTitleLeft, updateTitleRight, buttonsLeft, buttonsRight, updateCss, showPreviousTitle) {
                var deferred = $q.defer();
            
                // only make DOM updates when there are actual changes
                if (titleEle) {
            Severity: Minor
            Found in examples/ionic/www/lib/ionic/js/ionic-angular.js - About 1 hr to fix

              Function android has 35 lines of code (exceeds 25 allowed). Consider refactoring.
              Open

                  android: function(ele) {
                    var rIndex = 0;
                    var rotateCircle = 0;
                    var startTime;
                    var svgEle = ele.querySelector('g');
              Severity: Minor
              Found in examples/ionic/www/lib/ionic/js/ionic-angular.js - About 1 hr to fix

                Function tapScrollToTopDirective has 35 lines of code (exceeds 25 allowed). Consider refactoring.
                Open

                function tapScrollToTopDirective() {
                  return ['$ionicScrollDelegate', function($ionicScrollDelegate) {
                    return {
                      restrict: 'E',
                      link: function($scope, $element, $attr) {
                Severity: Minor
                Found in examples/ionic/www/lib/ionic/js/ionic-angular.js - About 1 hr to fix

                  Function polling has 35 lines of code (exceeds 25 allowed). Consider refactoring.
                  Open

                    polling(redirectUri: string): angular.IPromise<any> {
                      return this.$q((resolve, reject) => {
                        const redirectUriParser = document.createElement('a');
                        redirectUriParser.href = redirectUri;
                        const redirectUriPath = getFullUrlPath(redirectUriParser);
                  Severity: Minor
                  Found in src/popup.ts - About 1 hr to fix

                    Function drag has 35 lines of code (exceeds 25 allowed). Consider refactoring.
                    Open

                      ReorderDrag.prototype.drag = ionic.animationFrameThrottle(function(e) {
                        // We really aren't dragging
                        var self = this;
                        if (!this._currentDrag) {
                          return;
                    Severity: Minor
                    Found in examples/ionic/www/lib/ionic/js/ionic.js - About 1 hr to fix

                      Function end has 35 lines of code (exceeds 25 allowed). Consider refactoring.
                      Open

                        SlideDrag.prototype.end = function(e, doneCallback) {
                          var self = this;
                      
                          // There is no drag, just end immediately
                          if (!self._currentDrag) {
                      Severity: Minor
                      Found in examples/ionic/www/lib/ionic/js/ionic.js - About 1 hr to fix

                        Function exports has 35 lines of code (exceeds 25 allowed). Consider refactoring.
                        Open

                        module.exports = function (config) {
                          config.set({
                            files: [
                              'examples/client/vendor/angular.js',
                              'examples/client/vendor/angular-mocks.js',
                        Severity: Minor
                        Found in karma.conf.js - About 1 hr to fix

                          Similar blocks of code found in 5 locations. Consider refactoring.
                          Open

                            var params = {
                              code: req.body.code,
                              client_id: req.body.clientId,
                              client_secret: config.GOOGLE_SECRET,
                              redirect_uri: req.body.redirectUri,
                          Severity: Major
                          Found in examples/server/node/server.js and 4 other locations - About 1 hr to fix
                          examples/server/node/server.js on lines 342..348
                          examples/server/node/server.js on lines 406..412
                          examples/server/node/server.js on lines 777..783
                          examples/server/node/server.js on lines 846..852

                          Duplicated Code

                          Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                          Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                          When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                          Tuning

                          This issue has a mass of 63.

                          We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                          The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                          If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                          See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                          Refactorings

                          Further Reading

                          Similar blocks of code found in 5 locations. Consider refactoring.
                          Open

                            var formData = {
                              code: req.body.code,
                              client_id: req.body.clientId,
                              client_secret: config.TWITCH_SECRET,
                              redirect_uri: req.body.redirectUri,
                          Severity: Major
                          Found in examples/server/node/server.js and 4 other locations - About 1 hr to fix
                          examples/server/node/server.js on lines 208..214
                          examples/server/node/server.js on lines 342..348
                          examples/server/node/server.js on lines 406..412
                          examples/server/node/server.js on lines 777..783

                          Duplicated Code

                          Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                          Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                          When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                          Tuning

                          This issue has a mass of 63.

                          We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                          The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                          If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                          See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                          Refactorings

                          Further Reading

                          Similar blocks of code found in 5 locations. Consider refactoring.
                          Open

                            var params = {
                              code: req.body.code,
                              client_id: req.body.clientId,
                              client_secret: config.LINKEDIN_SECRET,
                              redirect_uri: req.body.redirectUri,
                          Severity: Major
                          Found in examples/server/node/server.js and 4 other locations - About 1 hr to fix
                          examples/server/node/server.js on lines 208..214
                          examples/server/node/server.js on lines 342..348
                          examples/server/node/server.js on lines 777..783
                          examples/server/node/server.js on lines 846..852

                          Duplicated Code

                          Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                          Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                          When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                          Tuning

                          This issue has a mass of 63.

                          We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                          The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                          If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                          See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                          Refactorings

                          Further Reading

                          Similar blocks of code found in 5 locations. Consider refactoring.
                          Open

                            var params = {
                              client_id: req.body.clientId,
                              redirect_uri: req.body.redirectUri,
                              client_secret: config.INSTAGRAM_SECRET,
                              code: req.body.code,
                          Severity: Major
                          Found in examples/server/node/server.js and 4 other locations - About 1 hr to fix
                          examples/server/node/server.js on lines 208..214
                          examples/server/node/server.js on lines 406..412
                          examples/server/node/server.js on lines 777..783
                          examples/server/node/server.js on lines 846..852

                          Duplicated Code

                          Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                          Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                          When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                          Tuning

                          This issue has a mass of 63.

                          We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                          The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                          If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                          See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                          Refactorings

                          Further Reading

                          Similar blocks of code found in 5 locations. Consider refactoring.
                          Open

                            var formData = {
                              code: req.body.code,
                              client_id: req.body.clientId,
                              client_secret: config.FOURSQUARE_SECRET,
                              redirect_uri: req.body.redirectUri,
                          Severity: Major
                          Found in examples/server/node/server.js and 4 other locations - About 1 hr to fix
                          examples/server/node/server.js on lines 208..214
                          examples/server/node/server.js on lines 342..348
                          examples/server/node/server.js on lines 406..412
                          examples/server/node/server.js on lines 846..852

                          Duplicated Code

                          Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                          Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                          When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                          Tuning

                          This issue has a mass of 63.

                          We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                          The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                          If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                          See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                          Refactorings

                          Further Reading

                          Severity
                          Category
                          Status
                          Source
                          Language