sahat/satellizer

View on GitHub

Showing 562 of 562 total issues

Function eventListener has 28 lines of code (exceeds 25 allowed). Consider refactoring.
Open

        Popup.prototype.eventListener = function (redirectUri) {
            var _this = this;
            return this.$q(function (resolve, reject) {
                _this.popup.addEventListener('loadstart', function (event) {
                    if (event.url.indexOf(redirectUri) !== 0) {
Severity: Minor
Found in examples/ionic/www/lib/satellizer/dist/satellizer.js - About 1 hr to fix

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

          const polling = this.$interval(() => {
            if (!this.popup || this.popup.closed || this.popup.closed === undefined) {
              this.$interval.cancel(polling);
              reject(new Error('The popup window was closed'));
            }
    Severity: Minor
    Found in src/popup.ts - About 1 hr to fix

      Function exec has 28 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

      UrlMatcher.prototype.exec = function (path, searchParams) {
        var m = this.regexp.exec(path);
        if (!m) return null;
        searchParams = searchParams || {};
      
      
      Severity: Minor
      Found in examples/ionic/www/lib/ionic/js/angular-ui/angular-ui-router.js - About 1 hr to fix

        Function findState has 28 lines of code (exceeds 25 allowed). Consider refactoring.
        Open

          function findState(stateOrName, base) {
            if (!stateOrName) return undefined;
        
            var isStr = isString(stateOrName),
                name  = isStr ? stateOrName : stateOrName.name,
        Severity: Minor
        Found in examples/ionic/www/lib/ionic/js/angular-ui/angular-ui-router.js - About 1 hr to fix

          Function keyboardWaitForResize has 28 lines of code (exceeds 25 allowed). Consider refactoring.
          Open

          function keyboardWaitForResize(callback, isOpening) {
            clearInterval(waitForResizeTimer);
            var count = 0;
            var maxCount;
            var initialHeight = getViewportHeight();
          Severity: Minor
          Found in examples/ionic/www/lib/ionic/js/ionic.js - About 1 hr to fix

            Function $ViewDirectiveFill has 28 lines of code (exceeds 25 allowed). Consider refactoring.
            Open

            function $ViewDirectiveFill (  $compile,   $controller,   $state,   $interpolate) {
              return {
                restrict: 'ECA',
                priority: -400,
                compile: function (tElement) {
            Severity: Minor
            Found in examples/ionic/www/lib/ionic/js/angular-ui/angular-ui-router.js - About 1 hr to fix

              Function start has 28 lines of code (exceeds 25 allowed). Consider refactoring.
              Open

                SlideDrag.prototype.start = function(e) {
                  var content, buttons, offsetX, buttonsWidth;
              
                  if (!this.canSwipe()) {
                    return;
              Severity: Minor
              Found in examples/ionic/www/lib/ionic/js/ionic.js - About 1 hr to fix

                Function step has 28 lines of code (exceeds 25 allowed). Consider refactoring.
                Open

                      var step = function(virtual) {
                
                        // Normalize virtual value
                        var render = virtual !== true;
                
                
                Severity: Minor
                Found in examples/ionic/www/lib/ionic/js/ionic.js - About 1 hr to fix

                  Function OAuth2 has 28 lines of code (exceeds 25 allowed). Consider refactoring.
                  Open

                          function OAuth2($http, $window, $timeout, $q, SatellizerConfig, SatellizerPopup, SatellizerStorage) {
                              this.$http = $http;
                              this.$window = $window;
                              this.$timeout = $timeout;
                              this.$q = $q;
                  Severity: Minor
                  Found in examples/ionic/www/lib/satellizer/dist/satellizer.js - About 1 hr to fix

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

                        template: '<div class="action-sheet-backdrop">' +
                                    '<div class="action-sheet-wrapper">' +
                                      '<div class="action-sheet" ng-class="{\'action-sheet-has-icons\': $actionSheetHasIcon}">' +
                                        '<div class="action-sheet-group action-sheet-options">' +
                                          '<div class="action-sheet-title" ng-if="titleText" ng-bind-html="titleText"></div>' +
                    Severity: Major
                    Found in examples/ionic/www/lib/ionic/js/ionic-angular.js and 1 other location - About 1 hr to fix
                    examples/ionic/www/lib/ionic/js/ionic-angular.js on lines 11765..11779

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

                    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

                      oauth1(options: IOAuth1Options): void {
                        this.SatellizerConfig.providers[options.name] = angular.extend(options, {
                          oauthType: '1.0'
                        });
                      }
                    Severity: Major
                    Found in src/authProvider.ts and 1 other location - About 1 hr to fix
                    src/authProvider.ts on lines 102..106

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

                    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

                            case ionic.Gestures.EVENT_END:
                              // trigger dragend
                              if(this.triggered) {
                                inst.trigger(this.name + 'end', ev);
                              }
                    Severity: Major
                    Found in examples/ionic/www/lib/ionic/js/ionic.js and 1 other location - About 1 hr to fix
                    examples/ionic/www/lib/ionic/js/ionic.js on lines 1953..1960

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

                    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

                            case ionic.Gestures.EVENT_END:
                              // trigger dragend
                              if(this.triggered) {
                                inst.trigger(this.name + 'end', ev);
                              }
                    Severity: Major
                    Found in examples/ionic/www/lib/ionic/js/ionic.js and 1 other location - About 1 hr to fix
                    examples/ionic/www/lib/ionic/js/ionic.js on lines 1863..1870

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

                    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

                        template:
                        '<div class="scroll-refresher invisible" collection-repeat-ignore>' +
                          '<div class="ionic-refresher-content" ' +
                          'ng-class="{\'ionic-refresher-with-text\': pullingText || refreshingText}">' +
                            '<div class="icon-pulling" ng-class="{\'pulling-rotation-disabled\':disablePullingRotation}">' +
                    Severity: Major
                    Found in examples/ionic/www/lib/ionic/js/ionic-angular.js and 1 other location - About 1 hr to fix
                    examples/ionic/www/lib/ionic/js/ionic-angular.js on lines 8275..8288

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

                    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

                      oauth2(options: IOAuth2Options): void {
                        this.SatellizerConfig.providers[options.name] = angular.extend(options, {
                          oauthType: '2.0'
                        });
                      }
                    Severity: Major
                    Found in src/authProvider.ts and 1 other location - About 1 hr to fix
                    src/authProvider.ts on lines 96..100

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

                    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 decodeBase64 has a Cognitive Complexity of 10 (exceeds 5 allowed). Consider refactoring.
                    Open

                    export function decodeBase64 (str) {
                      let buffer;
                      if (typeof module !== 'undefined' && module.exports) {
                        try {
                          buffer = require('buffer').Buffer;
                    Severity: Minor
                    Found in src/utils.ts - 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 open has a Cognitive Complexity of 10 (exceeds 5 allowed). Consider refactoring.
                    Open

                      open(url: string,
                           name: string,
                           popupOptions: { width: number, height: number },
                           redirectUri: string,
                           dontPoll?: boolean): angular.IPromise<any> {
                    Severity: Minor
                    Found in src/popup.ts - 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 initialize has 27 lines of code (exceeds 25 allowed). Consider refactoring.
                    Open

                        initialize: function(opts) {
                          var self = this;
                    
                          opts = ionic.extend({
                            onReorder: function() {},
                    Severity: Minor
                    Found in examples/ionic/www/lib/ionic/js/ionic.js - About 1 hr to fix

                      Function resolveState has 27 lines of code (exceeds 25 allowed). Consider refactoring.
                      Open

                          function resolveState(state, params, paramsAreFiltered, inherited, dst, options) {
                            // Make a restricted $stateParams with only the parameters that apply to this state if
                            // necessary. In addition to being available to the controller and onEnter/onExit callbacks,
                            // we also need $stateParams to be available for any $injector calls we make during the
                            // dependency resolution process.
                      Severity: Minor
                      Found in examples/ionic/www/lib/ionic/js/angular-ui/angular-ui-router.js - About 1 hr to fix

                        Function Local has 27 lines of code (exceeds 25 allowed). Consider refactoring.
                        Open

                            var Local = (function () {
                                function Local($http, SatellizerConfig, SatellizerShared) {
                                    this.$http = $http;
                                    this.SatellizerConfig = SatellizerConfig;
                                    this.SatellizerShared = SatellizerShared;
                        Severity: Minor
                        Found in examples/ionic/www/lib/satellizer/dist/satellizer.js - About 1 hr to fix
                          Severity
                          Category
                          Status
                          Source
                          Language