sahat/satellizer

View on GitHub

Showing 562 of 562 total issues

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

    if (self.options.scrollingX) {
      indicatorX = {
        el: self.__createScrollbar('h'),
        sizeRatio: 1
      };
Severity: Major
Found in examples/ionic/www/lib/ionic/js/ionic.js and 1 other location - About 3 hrs to fix
examples/ionic/www/lib/ionic/js/ionic.js on lines 5414..5425

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

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.options.scrollingY) {
      indicatorY = {
        el: self.__createScrollbar('v'),
        sizeRatio: 1
      };
Severity: Major
Found in examples/ionic/www/lib/ionic/js/ionic.js and 1 other location - About 3 hrs to fix
examples/ionic/www/lib/ionic/js/ionic.js on lines 5401..5412

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

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 (scrollOutsideX !== 0) {
        var isHeadingOutwardsX = scrollOutsideX * self.__decelerationVelocityX <= self.__minDecelerationScrollLeft;
        if (isHeadingOutwardsX) {
          self.__decelerationVelocityX += scrollOutsideX * penetrationDeceleration;
        }
Severity: Major
Found in examples/ionic/www/lib/ionic/js/ionic.js and 1 other location - About 3 hrs to fix
examples/ionic/www/lib/ionic/js/ionic.js on lines 6804..6814

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

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 (scrollOutsideY !== 0) {
        var isHeadingOutwardsY = scrollOutsideY * self.__decelerationVelocityY <= self.__minDecelerationScrollTop;
        if (isHeadingOutwardsY) {
          self.__decelerationVelocityY += scrollOutsideY * penetrationDeceleration;
        }
Severity: Major
Found in examples/ionic/www/lib/ionic/js/ionic.js and 1 other location - About 3 hrs to fix
examples/ionic/www/lib/ionic/js/ionic.js on lines 6792..6802

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

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

  self.calcWidths = function(textAlign, isPreviousTitle) {
    var titleEle = getEle(TITLE);
    var backBtnEle = getEle(BACK_BUTTON);
    var x, y, z, b, c, d, childSize, bounds;
    var childNodes = $element[0].childNodes;
Severity: Major
Found in examples/ionic/www/lib/ionic/js/ionic-angular.js - About 3 hrs to fix

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

          link: function(scope, element, attrs, ngModel) {
            var indicator = element.children();
            var dots = Array.prototype.slice.call(indicator.children());
            var weakest = dots.slice(-1)[0];
            var weak = dots.slice(-2);
    Severity: Major
    Found in examples/server/php/public/directives/passwordStrength.js - About 3 hrs to fix

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

            link: function(scope, element, attrs, ngModel) {
              var indicator = element.children();
              var dots = Array.prototype.slice.call(indicator.children());
              var weakest = dots.slice(-1)[0];
              var weak = dots.slice(-2);
      Severity: Major
      Found in examples/client/directives/passwordStrength.js - About 3 hrs to fix

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

                } else if (currentView) {
                  direction = DIRECTION_EXIT;
        
                  tmp = getHistoryById(backView.historyId);
                  if (tmp && tmp.parentHistoryId === currentView.historyId) {
        Severity: Major
        Found in examples/ionic/www/lib/ionic/js/ionic-angular.js and 1 other location - About 3 hrs to fix
        examples/ionic/www/lib/ionic/js/ionic-angular.js on lines 930..943

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

        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 (currentView.historyId !== hist.historyId) {
                    direction = DIRECTION_ENTER;
        
                    tmp = getHistoryById(currentView.historyId);
                    if (tmp && tmp.parentHistoryId === hist.parentHistoryId) {
        Severity: Major
        Found in examples/ionic/www/lib/ionic/js/ionic-angular.js and 1 other location - About 3 hrs to fix
        examples/ionic/www/lib/ionic/js/ionic-angular.js on lines 813..826

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

        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

        File angular-sanitize.js has 311 lines of code (exceeds 250 allowed). Consider refactoring.
        Open

        /**
         * @license AngularJS v1.3.13
         * (c) 2010-2014 Google, Inc. http://angularjs.org
         * License: MIT
         */
        Severity: Minor
        Found in examples/ionic/www/lib/ionic/js/angular/angular-sanitize.js - About 3 hrs to fix

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

                  angular.forEach((str || '').split('&'), function (keyValue) {
                      if (keyValue) {
                          value = keyValue.split('=');
                          key = decodeURIComponent(value[0]);
                          obj[key] = angular.isDefined(value[1]) ? decodeURIComponent(value[1]) : true;
          Severity: Major
          Found in examples/ionic/www/lib/satellizer/dist/satellizer.js and 1 other location - About 3 hrs to fix
          examples/ionic/www/lib/satellizer/satellizer.js on lines 846..852

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

          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

                  angular.forEach((keyValue || '').split('&'), function(keyValue) {
                    if (keyValue) {
                      value = keyValue.split('=');
                      key = decodeURIComponent(value[0]);
                      obj[key] = angular.isDefined(value[1]) ? decodeURIComponent(value[1]) : true;
          Severity: Major
          Found in examples/ionic/www/lib/satellizer/satellizer.js and 1 other location - About 3 hrs to fix
          examples/ionic/www/lib/satellizer/dist/satellizer.js on lines 339..345

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

          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 LoginWithTwitter has 108 lines of code (exceeds 50 allowed). Consider refactoring.
          Open

          func LoginWithTwitter(w http.ResponseWriter, r *http.Request) {
          
              c := oauth.NewConsumer(
                  config.TWITTER_KEY,
                  config.TWITTER_SECRET,
          Severity: Major
          Found in examples/server/go/oauth.go - About 3 hrs to fix

            Method twitter has 83 lines of code (exceeds 25 allowed). Consider refactoring.
            Open

                public function twitter(Request $request)
                {
                    $stack = GuzzleHttp\HandlerStack::create();
            
                    // Part 1 of 2: Initial request from Satellizer.
            Severity: Major
            Found in examples/server/php/app/Http/Controllers/AuthController.php - About 3 hrs to fix

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

                    function prelink($scope, $element, $attr) {
                      var parentScope = $scope.$parent;
                      $scope.$watch(function() {
                        return (parentScope.$hasHeader ? ' has-header' : '') +
                          (parentScope.$hasSubheader ? ' has-subheader' : '') +
              Severity: Major
              Found in examples/ionic/www/lib/ionic/js/ionic-angular.js - About 3 hrs to fix

                Function render has 81 lines of code (exceeds 25 allowed). Consider refactoring.
                Open

                    function render(forceRerender) {
                      if (render.destroyed) return;
                      var i;
                      var ii;
                      var item;
                Severity: Major
                Found in examples/ionic/www/lib/ionic/js/ionic-angular.js - About 3 hrs to fix

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

                        this.joinUrl = function(baseUrl, url) {
                          if (/^(?:[a-z]+:)?\/\//i.test(url)) {
                            return url;
                          }
                  
                  
                  Severity: Major
                  Found in examples/ionic/www/lib/satellizer/satellizer.js and 1 other location - About 3 hrs to fix
                  examples/ionic/www/lib/satellizer/dist/satellizer.js on lines 315..328

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

                  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

                      function joinUrl(baseUrl, url) {
                          if (/^(?:[a-z]+:)?\/\//i.test(url)) {
                              return url;
                          }
                          var joined = [baseUrl, url].join('/');
                  Severity: Major
                  Found in examples/ionic/www/lib/satellizer/dist/satellizer.js and 1 other location - About 3 hrs to fix
                  examples/ionic/www/lib/satellizer/satellizer.js on lines 856..872

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

                  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.options.scrollingX) {
                  
                        left = self.__scrollLeft;
                  
                      } else {
                  Severity: Major
                  Found in examples/ionic/www/lib/ionic/js/ionic.js and 1 other location - About 3 hrs to fix
                  examples/ionic/www/lib/ionic/js/ionic.js on lines 5999..6011

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

                  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.options.scrollingY) {
                  
                        top = self.__scrollTop;
                  
                      } else {
                  Severity: Major
                  Found in examples/ionic/www/lib/ionic/js/ionic.js and 1 other location - About 3 hrs to fix
                  examples/ionic/www/lib/ionic/js/ionic.js on lines 5985..5997

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

                  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