sahat/satellizer

View on GitHub

Showing 562 of 562 total issues

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

function $StateRefActiveDirective($state, $stateParams, $interpolate) {
  return  {
    restrict: "A",
    controller: ['$scope', '$element', '$attrs', function ($scope, $element, $attrs) {
      var state, params, activeClass;
Severity: Minor
Found in examples/ionic/www/lib/ionic/js/angular-ui/angular-ui-router.js - About 1 hr to fix

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

          function animateScroll(Y, X) {
            // scroll animation loop w/ easing
            // credit https://gist.github.com/dezinezync/5487119
            var start = Date.now(),
              duration = 1000, //milliseconds
    Severity: Minor
    Found in examples/ionic/www/lib/ionic/js/ionic.js - About 1 hr to fix

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

              loadViewElements: function(registerData) {
                var x, l, viewEle;
                var viewElements = navViewCtrl.getViewElements();
                var enteringEleIdentifier = getViewElementIdentifier(viewLocals, enteringView);
                var navViewActiveEleId = navViewCtrl.activeEleId();
      Severity: Minor
      Found in examples/ionic/www/lib/ionic/js/ionic-angular.js - About 1 hr to fix

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

            link: function($scope, $element, $attrs, ctrls) {
              var tabsCtrl = ctrls[0],
                tabCtrl = ctrls[1];
        
              //Remove title attribute so browser-tooltip does not apear
        Severity: Minor
        Found in examples/ionic/www/lib/ionic/js/ionic-angular.js - About 1 hr to fix

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

                get: function() {
                  var self = this;
                  function update(fn) {
                    return function() {
                      var x, classes = self.className.split(/\s+/);
          Severity: Minor
          Found in examples/ionic/www/lib/ionic/js/ionic.js - About 1 hr to fix

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

                  function instanceMethodCaller(methodName) {
                    return function caller() {
                      var handle = this.handle;
                      var args = arguments;
                      var foundInstancesCount = 0;
            Severity: Minor
            Found in examples/ionic/www/lib/ionic/js/ionic.js - About 1 hr to fix

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

                        if (isDefined($attr.showDelete)) {
                          $scope.$watch('!!(' + $attr.showDelete + ')', function(value) {
                            listCtrl.showDelete(value);
                          });
                        }
              Severity: Major
              Found in examples/ionic/www/lib/ionic/js/ionic-angular.js and 2 other locations - About 1 hr to fix
              examples/ionic/www/lib/ionic/js/ionic-angular.js on lines 10717..10721
              examples/ionic/www/lib/ionic/js/ionic-angular.js on lines 10727..10731

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

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

                        if (isDefined($attr.showReorder)) {
                          $scope.$watch('!!(' + $attr.showReorder + ')', function(value) {
                            listCtrl.showReorder(value);
                          });
                        }
              Severity: Major
              Found in examples/ionic/www/lib/ionic/js/ionic-angular.js and 2 other locations - About 1 hr to fix
              examples/ionic/www/lib/ionic/js/ionic-angular.js on lines 10717..10721
              examples/ionic/www/lib/ionic/js/ionic-angular.js on lines 10722..10726

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

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

                        if (isDefined($attr.canSwipe)) {
                          $scope.$watch('!!(' + $attr.canSwipe + ')', function(value) {
                            listCtrl.canSwipeItems(value);
                          });
                        }
              Severity: Major
              Found in examples/ionic/www/lib/ionic/js/ionic-angular.js and 2 other locations - About 1 hr to fix
              examples/ionic/www/lib/ionic/js/ionic-angular.js on lines 10722..10726
              examples/ionic/www/lib/ionic/js/ionic-angular.js on lines 10727..10731

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

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

                    function resolveElementClasses(element, cache, runningAnimations) {
                      runningAnimations = runningAnimations || {};
              
                      var lookup = {};
                      forEach(runningAnimations, function(data, selector) {
              Severity: Minor
              Found in examples/ionic/www/lib/ionic/js/angular/angular-animate.js - About 1 hr to fix

                Function closeAnimation has 26 lines of code (exceeds 25 allowed). Consider refactoring.
                Open

                        function closeAnimation() {
                          if (!closeAnimation.hasBeenRun) {
                            if (runner) { //the runner doesn't exist if it fails to instantiate
                              runner.applyStyles();
                            }
                Severity: Minor
                Found in examples/ionic/www/lib/ionic/js/angular/angular-animate.js - About 1 hr to fix

                  Function ios has 26 lines of code (exceeds 25 allowed). Consider refactoring.
                  Open

                    provider.transitions.views.ios = function(enteringEle, leavingEle, direction, shouldAnimate) {
                  
                      function setStyles(ele, opacity, x, boxShadowOpacity) {
                        var css = {};
                        css[ionic.CSS.TRANSITION_DURATION] = d.shouldAnimate ? '' : 0;
                  Severity: Minor
                  Found in examples/ionic/www/lib/ionic/js/ionic-angular.js - About 1 hr to fix

                    Function Interceptor has 26 lines of code (exceeds 25 allowed). Consider refactoring.
                    Open

                        var Interceptor = (function () {
                            function Interceptor(SatellizerConfig, SatellizerShared, SatellizerStorage) {
                                var _this = this;
                                this.SatellizerConfig = SatellizerConfig;
                                this.SatellizerShared = SatellizerShared;
                    Severity: Minor
                    Found in examples/ionic/www/lib/satellizer/dist/satellizer.js - About 1 hr to fix

                      Function promise has 26 lines of code (exceeds 25 allowed). Consider refactoring.
                      Open

                                  var promise = $http(httpConfig).then(function(response) {
                                    var data = response.data,
                                      promise = value.$promise;
                      
                                    if (data) {
                      Severity: Minor
                      Found in examples/ionic/www/lib/ionic/js/angular/angular-resource.js - About 1 hr to fix

                        Function getRenderer has 26 lines of code (exceeds 25 allowed). Consider refactoring.
                        Open

                          function getRenderer(attrs, scope) {
                            var statics = function() {
                              return {
                                enter: function (element, target, cb) { target.after(element); cb(); },
                                leave: function (element, cb) { element.remove(); cb(); }
                        Severity: Minor
                        Found in examples/ionic/www/lib/ionic/js/angular-ui/angular-ui-router.js - About 1 hr to fix

                          Function touchMove has 26 lines of code (exceeds 25 allowed). Consider refactoring.
                          Open

                              self.touchMove = function(e) {
                                if (self.options.freeze || !self.__isDown ||
                                  (!self.__isDown && e.defaultPrevented) ||
                                  (e.target.tagName === 'TEXTAREA' && e.target.parentElement.querySelector(':focus')) ) {
                                  return;
                          Severity: Minor
                          Found in examples/ionic/www/lib/ionic/js/ionic.js - About 1 hr to fix

                            Function fn has 26 lines of code (exceeds 25 allowed). Consider refactoring.
                            Open

                                    fn: function(i) {
                                      return {
                                        cx: 16 + (16 * i),
                                        cy: 32,
                                        sw: 0,
                            Severity: Minor
                            Found in examples/ionic/www/lib/ionic/js/ionic-angular.js - About 1 hr to fix

                              Function goBack has 26 lines of code (exceeds 25 allowed). Consider refactoring.
                              Open

                                  goBack: function(backCount) {
                                    if (isDefined(backCount) && backCount !== -1) {
                                      if (backCount > -1) return;
                              
                                      var currentHistory = viewHistory.histories[this.currentHistoryId()];
                              Severity: Minor
                              Found in examples/ionic/www/lib/ionic/js/ionic-angular.js - About 1 hr to fix

                                Function collectEventData has 26 lines of code (exceeds 25 allowed). Consider refactoring.
                                Open

                                    collectEventData: function collectEventData(element, eventType, touches, ev) {
                                
                                      // find out pointerType
                                      var pointerType = ionic.Gestures.POINTER_TOUCH;
                                      if(ev.type.match(/mouse/) || ionic.Gestures.PointerEvent.matchType(ionic.Gestures.POINTER_MOUSE, ev)) {
                                Severity: Minor
                                Found in examples/ionic/www/lib/ionic/js/ionic.js - About 1 hr to fix

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

                                    eventListener(redirectUri): angular.IPromise<any> {
                                      return this.$q((resolve, reject) => {
                                        this.popup.addEventListener('loadstart', (event) => {
                                          if (event.url.indexOf(redirectUri) !== 0) {
                                            return;
                                  Severity: Minor
                                  Found in src/popup.ts - About 1 hr to fix
                                    Severity
                                    Category
                                    Status
                                    Source
                                    Language