sahat/satellizer

View on GitHub

Showing 562 of 562 total issues

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

      forEach({
        'name': attr.name,
        'ng-value': attr.ngValue,
        'ng-model': attr.ngModel,
        'ng-checked': attr.ngChecked,
Severity: Major
Found in examples/ionic/www/lib/ionic/js/ionic-angular.js and 1 other location - About 4 hrs to fix
examples/ionic/www/lib/ionic/js/ionic-angular.js on lines 8327..8342

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

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 animateRun has 117 lines of code (exceeds 25 allowed). Consider refactoring.
Open

      function animateRun(animationEvent, element, className, activeAnimationComplete, styles) {
        var node = extractElementNode(element);
        var elementData = element.data(NG_ANIMATE_CSS_DATA_KEY);
        if (node.getAttribute('class').indexOf(className) == -1 || !elementData) {
          activeAnimationComplete();
Severity: Major
Found in examples/ionic/www/lib/ionic/js/angular/angular-animate.js - About 4 hrs to fix

    Function Popup has 114 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

        var Popup = (function () {
            function Popup($interval, $window, $q) {
                this.$interval = $interval;
                this.$window = $window;
                this.$q = $q;
    Severity: Major
    Found in examples/ionic/www/lib/satellizer/dist/satellizer.js - About 4 hrs to fix

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

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

        Function study has 113 lines of code (exceeds 25 allowed). Consider refactoring.
        Open

          this.study = function (invocables) {
            if (!isObject(invocables)) throw new Error("'invocables' must be an object");
            var invocableKeys = objectKeys(invocables || {});
            
            // Perform a topological sort of invocables to build an ordered plan
        Severity: Major
        Found in examples/ionic/www/lib/ionic/js/angular-ui/angular-ui-router.js - About 4 hrs to fix

          Function doTouchMove has 113 lines of code (exceeds 25 allowed). Consider refactoring.
          Open

            doTouchMove: function(touches, timeStamp, scale) {
              if (timeStamp instanceof Date) {
                timeStamp = timeStamp.valueOf();
              }
              if (typeof timeStamp !== "number") {
          Severity: Major
          Found in examples/ionic/www/lib/ionic/js/ionic.js - About 4 hrs to fix

            File app.py has 350 lines of code (exceeds 250 allowed). Consider refactoring.
            Open

            from datetime import datetime, timedelta
            import os
            import jwt
            import json
            import requests
            Severity: Minor
            Found in examples/server/python/app.py - About 4 hrs to fix

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

                  } else if (window.navigator.pointerEnabled) {
                    // Pointer Events
                    container.addEventListener("pointerdown", self.touchStart, false);
                    if(self.options.preventDefault) container.addEventListener("pointermove", self.touchMoveBubble, false);
                    document.addEventListener("pointermove", self.touchMove, false);
              Severity: Major
              Found in examples/ionic/www/lib/ionic/js/ionic.js and 1 other location - About 4 hrs to fix
              examples/ionic/www/lib/ionic/js/ionic.js on lines 5270..5327

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

              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

                  } else if (window.navigator.msPointerEnabled) {
                    // IE10, WP8 (Pointer Events)
                    container.addEventListener("MSPointerDown", self.touchStart, false);
                    if(self.options.preventDefault) container.addEventListener("MSPointerMove", self.touchMoveBubble, false);
                    document.addEventListener("MSPointerMove", self.touchMove, false);
              Severity: Major
              Found in examples/ionic/www/lib/ionic/js/ionic.js and 1 other location - About 4 hrs to fix
              examples/ionic/www/lib/ionic/js/ionic.js on lines 5261..5327

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

              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 htmlParser has 105 lines of code (exceeds 25 allowed). Consider refactoring.
              Open

              function htmlParser(html, handler) {
                if (typeof html !== 'string') {
                  if (html === null || typeof html === 'undefined') {
                    html = '';
                  } else {
              Severity: Major
              Found in examples/ionic/www/lib/ionic/js/angular/angular-sanitize.js - About 4 hrs to fix

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

                    compile: function(element, attr) {
                
                      //We create the tabNavTemplate in the compile phase so that the
                      //attributes we pass down won't be interpolated yet - we want
                      //to pass down the 'raw' versions of the attributes
                Severity: Major
                Found in examples/ionic/www/lib/ionic/js/ionic-angular.js - About 4 hrs to fix

                  Function $ViewDirective has 104 lines of code (exceeds 25 allowed). Consider refactoring.
                  Open

                  function $ViewDirective(   $state,   $injector,   $uiViewScroll,   $interpolate) {
                  
                    function getService() {
                      return ($injector.has) ? function(service) {
                        return $injector.has(service) ? $injector.get(service) : null;
                  Severity: Major
                  Found in examples/ionic/www/lib/ionic/js/angular-ui/angular-ui-router.js - About 4 hrs to fix

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

                    angular.module('MyApp')
                      .directive('passwordMatch', function() {
                        return {
                          require: 'ngModel',
                          scope: {
                    Severity: Major
                    Found in examples/client/directives/passwordMatch.js and 1 other location - About 4 hrs to fix
                    examples/server/php/public/directives/passwordMatch.js on lines 1..17

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

                    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

                    angular.module('MyApp')
                      .directive('passwordMatch', function() {
                        return {
                          require: 'ngModel',
                          scope: {
                    Severity: Major
                    Found in examples/server/php/public/directives/passwordMatch.js and 1 other location - About 4 hrs to fix
                    examples/client/directives/passwordMatch.js on lines 1..17

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

                    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 compile has 99 lines of code (exceeds 25 allowed). Consider refactoring.
                    Open

                        compile: function(element, attr) {
                          var innerElement;
                          var scrollCtrl;
                    
                          element.addClass('scroll-content ionic-scroll');
                    Severity: Major
                    Found in examples/ionic/www/lib/ionic/js/ionic-angular.js - About 3 hrs to fix

                      Function initialize has 97 lines of code (exceeds 25 allowed). Consider refactoring.
                      Open

                        initialize: function(options) {
                          var self = this;
                      
                          self.__container = options.el;
                          self.__content = options.el.firstElementChild;
                      Severity: Major
                      Found in examples/ionic/www/lib/ionic/js/ionic.js - About 3 hrs to fix

                        Function transitionTo has 95 lines of code (exceeds 25 allowed). Consider refactoring.
                        Open

                            $state.transitionTo = function transitionTo(to, toParams, options) {
                              toParams = toParams || {};
                              options = extend({
                                location: true, inherit: false, relative: null, notify: true, reload: false, $retry: false
                              }, options || {});
                        Severity: Major
                        Found in examples/ionic/www/lib/ionic/js/angular-ui/angular-ui-router.js - About 3 hrs to fix

                          Function transition has 94 lines of code (exceeds 25 allowed). Consider refactoring.
                          Open

                                  transition: function(direction, enableBack, allowAnimate) {
                                    var deferred;
                                    var enteringData = getTransitionData(viewLocals, enteringEle, direction, enteringView);
                                    var leavingData = extend(extend({}, enteringData), getViewData(leavingView));
                                    enteringData.transitionId = leavingData.transitionId = transitionId;
                          Severity: Major
                          Found in examples/ionic/www/lib/ionic/js/ionic-angular.js - About 3 hrs to fix

                            Function name has 93 lines of code (exceeds 25 allowed). Consider refactoring.
                            Open

                                      Resource[name] = function(a1, a2, a3, a4) {
                                        var params = {}, data, success, error;
                            
                                        /* jshint -W086 */ /* (purposefully fall through case statements) */
                                        switch (arguments.length) {
                            Severity: Major
                            Found in examples/ionic/www/lib/ionic/js/angular/angular-resource.js - About 3 hrs to fix

                              Function initSwipeBack has 93 lines of code (exceeds 25 allowed). Consider refactoring.
                              Open

                                self.initSwipeBack = function() {
                                  var swipeBackHitWidth = $ionicConfig.views.swipeBackHitWidth();
                                  var viewTransition, associatedNavBarCtrl, backView;
                                  var deregDragStart, deregDrag, deregRelease;
                                  var windowWidth, startDragX, dragPoints;
                              Severity: Major
                              Found in examples/ionic/www/lib/ionic/js/ionic-angular.js - About 3 hrs to fix
                                Severity
                                Category
                                Status
                                Source
                                Language