sahat/satellizer

View on GitHub

Showing 562 of 562 total issues

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

    on: function onEvent(gesture, handler){
      var gestures = gesture.split(' ');
      for(var t = 0; t < gestures.length; t++) {
        this.element.addEventListener(gestures[t], handler, false);
      }
Severity: Major
Found in examples/ionic/www/lib/ionic/js/ionic.js and 1 other location - About 2 hrs to fix
examples/ionic/www/lib/ionic/js/ionic.js on lines 776..782

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 82.

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 2 locations. Consider refactoring.
Open

    off: function offEvent(gesture, handler){
      var gestures = gesture.split(' ');
      for(var t = 0; t < gestures.length; t++) {
        this.element.removeEventListener(gestures[t], handler, false);
      }
Severity: Major
Found in examples/ionic/www/lib/ionic/js/ionic.js and 1 other location - About 2 hrs to fix
examples/ionic/www/lib/ionic/js/ionic.js on lines 761..767

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 82.

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

Function OAuth has 58 lines of code (exceeds 25 allowed). Consider refactoring.
Open

    var OAuth = (function () {
        function OAuth($http, $window, $timeout, $q, SatellizerConfig, SatellizerPopup, SatellizerStorage, SatellizerShared, SatellizerOAuth1, SatellizerOAuth2) {
            this.$http = $http;
            this.$window = $window;
            this.$timeout = $timeout;
Severity: Major
Found in examples/ionic/www/lib/satellizer/dist/satellizer.js - About 2 hrs to fix

    Function __repositionScrollbars has 57 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

      __repositionScrollbars: function() {
        var self = this,
            heightScale, widthScale,
            widthDiff, heightDiff,
            x, y,
    Severity: Major
    Found in examples/ionic/www/lib/ionic/js/ionic.js - About 2 hrs to fix

      Identical blocks of code found in 2 locations. Consider refactoring.
      Open

                      live: {
                          name: 'live',
                          url: '/auth/live',
                          authorizationEndpoint: 'https://login.live.com/oauth20_authorize.srf',
                          redirectUri: window.location.origin,
      Severity: Major
      Found in examples/ionic/www/lib/satellizer/dist/satellizer.js and 1 other location - About 2 hrs to fix
      examples/ionic/www/lib/satellizer/satellizer.js on lines 117..128

      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 80.

      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

      Identical blocks of code found in 2 locations. Consider refactoring.
      Open

              live: {
                name: 'live',
                url: '/auth/live',
                authorizationEndpoint: 'https://login.live.com/oauth20_authorize.srf',
                redirectUri: window.location.origin,
      Severity: Major
      Found in examples/ionic/www/lib/satellizer/satellizer.js and 1 other location - About 2 hrs to fix
      examples/ionic/www/lib/satellizer/dist/satellizer.js on lines 107..118

      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 80.

      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

      Function setClass has 56 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

              setClass: function(element, add, remove, options) {
                options = parseAnimateOptions(options);
      
                var STORAGE_KEY = '$$animateClasses';
                element = angular.element(element);
      Severity: Major
      Found in examples/ionic/www/lib/ionic/js/angular/angular-animate.js - About 2 hrs to fix

        Function getRenderFn has 56 lines of code (exceeds 25 allowed). Consider refactoring.
        Open

          getRenderFn: function() {
            var self = this;
        
            var content = self.__content;
        
        
        Severity: Major
        Found in examples/ionic/www/lib/ionic/js/ionic.js - About 2 hrs to fix

          Function compile has 55 lines of code (exceeds 25 allowed). Consider refactoring.
          Open

              compile: function(tElement, tAttrs) {
          
                // clone the back button, but as a <div>
                var buttonEle = $document[0].createElement('button');
                for (var n in tAttrs.$attr) {
          Severity: Major
          Found in examples/ionic/www/lib/ionic/js/ionic-angular.js - About 2 hrs to fix

            Function $StateRefDirective has 55 lines of code (exceeds 25 allowed). Consider refactoring.
            Open

            function $StateRefDirective($state, $timeout) {
              var allowedOptions = ['location', 'inherit', 'reload'];
            
              return {
                restrict: 'A',
            Severity: Major
            Found in examples/ionic/www/lib/ionic/js/angular-ui/angular-ui-router.js - About 2 hrs to fix

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

                      twitch: {
                        name: 'twitch',
                        url: '/auth/twitch',
                        authorizationEndpoint: 'https://api.twitch.tv/kraken/oauth2/authorize',
                        redirectUri: window.location.origin,
              Severity: Major
              Found in examples/ionic/www/lib/satellizer/satellizer.js and 3 other locations - About 2 hrs to fix
              examples/ionic/www/lib/satellizer/dist/satellizer.js on lines 75..86
              examples/ionic/www/lib/satellizer/dist/satellizer.js on lines 95..106
              examples/ionic/www/lib/satellizer/satellizer.js on lines 85..96

              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 79.

              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 4 locations. Consider refactoring.
              Open

                              twitch: {
                                  name: 'twitch',
                                  url: '/auth/twitch',
                                  authorizationEndpoint: 'https://api.twitch.tv/kraken/oauth2/authorize',
                                  redirectUri: window.location.origin,
              Severity: Major
              Found in examples/ionic/www/lib/satellizer/dist/satellizer.js and 3 other locations - About 2 hrs to fix
              examples/ionic/www/lib/satellizer/dist/satellizer.js on lines 75..86
              examples/ionic/www/lib/satellizer/satellizer.js on lines 85..96
              examples/ionic/www/lib/satellizer/satellizer.js on lines 105..116

              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 79.

              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 4 locations. Consider refactoring.
              Open

                              linkedin: {
                                  name: 'linkedin',
                                  url: '/auth/linkedin',
                                  authorizationEndpoint: 'https://www.linkedin.com/uas/oauth2/authorization',
                                  redirectUri: window.location.origin,
              Severity: Major
              Found in examples/ionic/www/lib/satellizer/dist/satellizer.js and 3 other locations - About 2 hrs to fix
              examples/ionic/www/lib/satellizer/dist/satellizer.js on lines 95..106
              examples/ionic/www/lib/satellizer/satellizer.js on lines 85..96
              examples/ionic/www/lib/satellizer/satellizer.js on lines 105..116

              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 79.

              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 4 locations. Consider refactoring.
              Open

                      linkedin: {
                        name: 'linkedin',
                        url: '/auth/linkedin',
                        authorizationEndpoint: 'https://www.linkedin.com/uas/oauth2/authorization',
                        redirectUri: window.location.origin,
              Severity: Major
              Found in examples/ionic/www/lib/satellizer/satellizer.js and 3 other locations - About 2 hrs to fix
              examples/ionic/www/lib/satellizer/dist/satellizer.js on lines 75..86
              examples/ionic/www/lib/satellizer/dist/satellizer.js on lines 95..106
              examples/ionic/www/lib/satellizer/satellizer.js on lines 105..116

              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 79.

              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 2 locations. Consider refactoring.
              Open

                      beforeRemoveClass: function(element, className, animationCompleted, options) {
                        options = options || {};
                        var cancellationMethod = animateBefore('removeClass', element, suffixClasses(className, '-remove'), options.from);
                        if (cancellationMethod) {
                          afterReflow(element, animationCompleted);
              Severity: Major
              Found in examples/ionic/www/lib/ionic/js/angular/angular-animate.js and 1 other location - About 2 hrs to fix
              examples/ionic/www/lib/ionic/js/angular/angular-animate.js on lines 2082..2091

              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 79.

              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 2 locations. Consider refactoring.
              Open

                      beforeAddClass: function(element, className, animationCompleted, options) {
                        options = options || {};
                        var cancellationMethod = animateBefore('addClass', element, suffixClasses(className, '-add'), options.from);
                        if (cancellationMethod) {
                          afterReflow(element, animationCompleted);
              Severity: Major
              Found in examples/ionic/www/lib/ionic/js/angular/angular-animate.js and 1 other location - About 2 hrs to fix
              examples/ionic/www/lib/ionic/js/angular/angular-animate.js on lines 2093..2102

              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 79.

              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 2 locations. Consider refactoring.
              Open

                  twitch: {
                    name: 'twitch',
                    url: '/auth/twitch',
                    authorizationEndpoint: 'https://api.twitch.tv/kraken/oauth2/authorize',
                    redirectUri: window.location.origin,
              Severity: Major
              Found in src/config.ts and 1 other location - About 2 hrs to fix
              src/config.ts on lines 66..77

              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 79.

              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 2 locations. Consider refactoring.
              Open

                  linkedin: {
                    name: 'linkedin',
                    url: '/auth/linkedin',
                    authorizationEndpoint: 'https://www.linkedin.com/uas/oauth2/authorization',
                    redirectUri: window.location.origin,
              Severity: Major
              Found in src/config.ts and 1 other location - About 2 hrs to fix
              src/config.ts on lines 86..97

              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 79.

              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

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

                    end: function() {
              
                      // measure duration
                      var duration = +new Date() - start.time;
              
              
              Severity: Major
              Found in examples/ionic/www/lib/ionic/js/ionic.js - About 2 hrs to fix

                Identical blocks of code found in 2 locations. Consider refactoring.
                Open

                        bitbucket: {
                          name: 'bitbucket',
                          url: '/auth/bitbucket',
                          authorizationEndpoint: 'https://bitbucket.org/site/oauth2/authorize',
                          redirectUri: window.location.origin + '/',
                Severity: Major
                Found in examples/ionic/www/lib/satellizer/satellizer.js and 1 other location - About 2 hrs to fix
                examples/ionic/www/lib/satellizer/dist/satellizer.js on lines 129..139

                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 78.

                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