sahat/satellizer

View on GitHub

Showing 562 of 562 total issues

Function openAmount has 32 lines of code (exceeds 25 allowed). Consider refactoring.
Open

  self.openAmount = function(amount) {
    var maxLeft = self.left && self.left.width || 0;
    var maxRight = self.right && self.right.width || 0;

    // Check if we can move to that side, depending if the left/right panel is enabled
Severity: Minor
Found in examples/ionic/www/lib/ionic/js/ionic-angular.js - About 1 hr to fix

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

          var transition = $state.transition = resolved.then(function () {
            var l, entering, exiting;
    
            if ($state.transition !== transition) return TransitionSuperseded;
    
    
    Severity: Minor
    Found in examples/ionic/www/lib/ionic/js/angular-ui/angular-ui-router.js - About 1 hr to fix

      Function onRelease has 32 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

          function onRelease(ev) {
            if (isPrimary && viewTransition && dragPoints && dragPoints.length > 1) {
      
              var now = Date.now();
              var releaseX = getDragX(ev);
      Severity: Minor
      Found in examples/ionic/www/lib/ionic/js/ionic-angular.js - About 1 hr to fix

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

            if (self.__isDecelerating) {
              zyngaCore.effect.Animate.stop(self.__isDecelerating);
              self.__isDecelerating = false;
              self.__interruptedAnimation = true;
            }
        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 6090..6094

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

        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

            if (self.__isAnimating) {
              zyngaCore.effect.Animate.stop(self.__isAnimating);
              self.__isAnimating = false;
              self.__interruptedAnimation = true;
            }
        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 6083..6087

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

        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

        Method doFilter has a Cognitive Complexity of 11 (exceeds 5 allowed). Consider refactoring.
        Open

            @Override
            public void doFilter(ServletRequest request, ServletResponse response,
                    FilterChain chain) throws IOException, ServletException {
                
                HttpServletRequest httpRequest = (HttpServletRequest) request;

        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

        Method processUser has a Cognitive Complexity of 11 (exceeds 5 allowed). Consider refactoring.
        Open

          private Response processUser(final HttpServletRequest request, final Provider provider,
              final String id, final String displayName) throws JOSEException, ParseException {
            final Optional<User> user = dao.findByProvider(provider, id);
        
            // Step 3a. If user is already signed in then link accounts.

        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 OAuth has 10 arguments (exceeds 4 allowed). Consider refactoring.
        Open

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

          Function setup has 31 lines of code (exceeds 25 allowed). Consider refactoring.
          Open

              function setup() {
          
                // do not setup if the container has no width
                if (!container.offsetWidth) {
                  return;
          Severity: Minor
          Found in examples/ionic/www/lib/ionic/js/ionic.js - About 1 hr to fix

            Function register has 31 lines of code (exceeds 25 allowed). Consider refactoring.
            Open

              register: function(ele) {
                tapDoc = ele;
            
                tapEventListener('click', true, true);
                tapEventListener('mouseup');
            Severity: Minor
            Found in examples/ionic/www/lib/ionic/js/ionic.js - About 1 hr to fix

              Function snapToRest has 31 lines of code (exceeds 25 allowed). Consider refactoring.
              Open

                self.snapToRest = function(e) {
                  // We want to animate at the end of this
                  self.content.enableAnimation();
                  isDragging = false;
              
              
              Severity: Minor
              Found in examples/ionic/www/lib/ionic/js/ionic-angular.js - About 1 hr to fix

                Method processUser has 31 lines of code (exceeds 25 allowed). Consider refactoring.
                Open

                  private Response processUser(final HttpServletRequest request, final Provider provider,
                      final String id, final String displayName) throws JOSEException, ParseException {
                    final Optional<User> user = dao.findByProvider(provider, id);
                
                    // Step 3a. If user is already signed in then link accounts.

                  Function Storage has 31 lines of code (exceeds 25 allowed). Consider refactoring.
                  Open

                      var Storage = (function () {
                          function Storage($window, SatellizerConfig) {
                              this.$window = $window;
                              this.SatellizerConfig = SatellizerConfig;
                              this.memoryStore = {};
                  Severity: Minor
                  Found in examples/ionic/www/lib/satellizer/dist/satellizer.js - About 1 hr to fix

                    Function __resizeScrollbars has 31 lines of code (exceeds 25 allowed). Consider refactoring.
                    Open

                      __resizeScrollbars: function() {
                        var self = this;
                    
                        // Update horiz bar
                        if (self.__indicatorX) {
                    Severity: Minor
                    Found in examples/ionic/www/lib/ionic/js/ionic.js - About 1 hr to fix

                      Function prelink has 30 lines of code (exceeds 25 allowed). Consider refactoring.
                      Open

                            function prelink($scope, $element, $attr, tabsCtrl) {
                              var deregisterInstance = $ionicTabsDelegate._registerInstance(
                                tabsCtrl, $attr.delegateHandle, tabsCtrl.hasActiveScope
                              );
                      
                      
                      Severity: Minor
                      Found in examples/ionic/www/lib/ionic/js/ionic-angular.js - About 1 hr to fix

                        Function keyboardFocusIn has 30 lines of code (exceeds 25 allowed). Consider refactoring.
                        Open

                        function keyboardFocusIn(e) {
                          clearTimeout(keyboardFocusOutTimer);
                          //console.log("keyboardFocusIn from: " + e.type + " at: " + Date.now());
                        
                          if (!e.target ||
                        Severity: Minor
                        Found in examples/ionic/www/lib/ionic/js/ionic.js - About 1 hr to fix

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

                                    var polling = $interval(function() {
                                      if (!Popup.popupWindow || Popup.popupWindow.closed || Popup.popupWindow.closed === undefined) {
                                        deferred.reject('The popup window was closed.');
                                        $interval.cancel(polling);
                                      }
                          Severity: Minor
                          Found in examples/ionic/www/lib/satellizer/satellizer.js - About 1 hr to fix

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

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

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

                                self.scrollTo = function(left, top, shouldAnimate) {
                                  self.resize().then(function() {
                                    scrollView.scrollTo(left, top, !!shouldAnimate);
                                  });
                                };
                              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 7040..7044

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

                              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

                                      AuthProvider.prototype.oauth2 = function (options) {
                                          this.SatellizerConfig.providers[options.name] = angular.extend(options, {
                                              oauthType: '2.0'
                                          });
                                      };
                              Severity: Major
                              Found in examples/ionic/www/lib/satellizer/dist/satellizer.js and 1 other location - About 1 hr to fix
                              examples/ionic/www/lib/satellizer/dist/satellizer.js on lines 284..288

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

                              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