sahat/satellizer

View on GitHub

Showing 562 of 562 total issues

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

    compile: function($element, $attr) {
      var listEl = jqLite('<div class="list">')
        .append($element.contents())
        .addClass($attr.type);

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

          return {
            pre: function($scope, $element, $attrs, navBarCtrl) {
              // only register the plain HTML, the navBarCtrl takes care of scope/compile/link
    
              var parentViewCtrl = $element.parent().data('$ionViewController');
    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 11172..11188

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

    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

          return {
            pre: function($scope, $element, $attrs, navBarCtrl) {
              // only register the plain HTML, the navBarCtrl takes care of scope/compile/link
    
              var parentViewCtrl = $element.parent().data('$ionViewController');
    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 11274..11290

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

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

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

      Function actionSheet has 75 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

        function actionSheet(opts) {
          var scope = $rootScope.$new(true);
      
          extend(scope, {
            cancel: noop,
      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

            resize: function(continueScrolling) {
              var self = this;
              if (!self.__container || !self.options) return;
        
              // Update Scroller dimensions for changed content
        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 5604..5617

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

        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

          resize: function(continueScrolling) {
            var self = this;
            if (!self.__container || !self.options) return;
        
            // Update Scroller dimensions for changed content
        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 6924..6937

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

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

          this.Param = function Param(id, type, config, location) {
            var self = this;
            config = unwrapShorthand(config);
            type = getType(config, type, location);
            var arrayMode = getArrayMode();
        Severity: Major
        Found in examples/ionic/www/lib/ionic/js/angular-ui/angular-ui-router.js - About 2 hrs to fix

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

                this.getFullUrlPath = function(location) {
                  var isHttps = location.protocol === 'https:';
                  return location.protocol + '//' + location.hostname +
                    ':' + (location.port || (isHttps ? '443' : '80')) +
                    (/^\//.test(location.pathname) ? location.pathname : '/' + location.pathname);
          Severity: Major
          Found in examples/ionic/www/lib/satellizer/satellizer.js and 1 other location - About 2 hrs to fix
          examples/ionic/www/lib/satellizer/dist/satellizer.js on lines 329..334

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

          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

              function getFullUrlPath(location) {
                  var isHttps = location.protocol === 'https:';
                  return location.protocol + '//' + location.hostname +
                      ':' + (location.port || (isHttps ? '443' : '80')) +
                      (/^\//.test(location.pathname) ? location.pathname : '/' + location.pathname);
          Severity: Major
          Found in examples/ionic/www/lib/satellizer/dist/satellizer.js and 1 other location - About 2 hrs to fix
          examples/ionic/www/lib/satellizer/satellizer.js on lines 831..836

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

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

                return function link($scope, $element, $attr, ctrls) {
                  var childScope;
                  var childElement;
                  var tabsCtrl = ctrls[0];
                  var tabCtrl = ctrls[1];
          Severity: Major
          Found in examples/ionic/www/lib/ionic/js/ionic-angular.js - About 2 hrs to fix

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

              function $get(   $location,   $rootScope,   $injector,   $browser) {
            
                var baseHref = $browser.baseHref(), location = $location.url(), lastPushedUrl;
            
                function appendBasePath(url, isHtml5, absolute) {
            Severity: Major
            Found in examples/ionic/www/lib/ionic/js/angular-ui/angular-ui-router.js - About 2 hrs to fix

              Function controller has 70 lines of code (exceeds 25 allowed). Consider refactoring.
              Open

                  controller: ['$scope', '$element', '$attrs', function($scope, $element, $attrs) {
                    var _this = this;
              
                    var continuous = $scope.$eval($scope.doesContinue) === true;
                    var shouldAutoPlay = isDefined($attrs.autoPlay) ? !!$scope.autoPlay : false;
              Severity: Major
              Found in examples/ionic/www/lib/ionic/js/ionic-angular.js - About 2 hrs to fix

                Function UrlMatcher has 70 lines of code (exceeds 25 allowed). Consider refactoring.
                Open

                function UrlMatcher(pattern, config, parentMatcher) {
                  config = extend({ params: {} }, isObject(config) ? config : {});
                
                  // Find all placeholders and create a compiled pattern, using either classic or curly syntax:
                  //   '*' name
                Severity: Major
                Found in examples/ionic/www/lib/ionic/js/angular-ui/angular-ui-router.js - About 2 hrs to fix

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

                            function heightGetter(scope, locals) {
                              var result = parsedValue(scope, locals);
                              if (result.charAt && result.charAt(result.length - 1) === '%') {
                                return Math.floor(parseInt(result) / 100 * scrollView.__clientHeight);
                              }
                  Severity: Major
                  Found in examples/ionic/www/lib/ionic/js/ionic-angular.js and 1 other location - About 2 hrs to fix
                  examples/ionic/www/lib/ionic/js/ionic-angular.js on lines 8712..8718

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

                  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

                            function widthGetter(scope, locals) {
                              var result = parsedValue(scope, locals);
                              if (result.charAt && result.charAt(result.length - 1) === '%') {
                                return Math.floor(parseInt(result) / 100 * scrollView.__clientWidth);
                              }
                  Severity: Major
                  Found in examples/ionic/www/lib/ionic/js/ionic-angular.js and 1 other location - About 2 hrs to fix
                  examples/ionic/www/lib/ionic/js/ionic-angular.js on lines 8705..8711

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

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

                    self.transition = function(enteringHeaderBar, leavingHeaderBar, viewData) {
                      var enteringHeaderBarCtrl = enteringHeaderBar.controller();
                      var transitionFn = $ionicConfig.transitions.navBar[viewData.navBarTransition] || $ionicConfig.transitions.navBar.none;
                      var transitionId = viewData.transitionId;
                  
                  
                  Severity: Major
                  Found in examples/ionic/www/lib/ionic/js/ionic-angular.js - About 2 hrs to fix

                    Function LoginWithFacebook has 94 lines of code (exceeds 50 allowed). Consider refactoring.
                    Open

                    func LoginWithFacebook(w http.ResponseWriter, r *http.Request) {
                        apiUrl := "https://graph.facebook.com"
                        accessTokenPath := "/v2.3/oauth/access_token"
                        graphApiPath := "/v2.3/me"
                    
                    
                    Severity: Major
                    Found in examples/server/go/oauth2.go - About 2 hrs to fix

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

                      angular.module('MyApp')
                        .controller('LogoutCtrl', function($location, $auth, toastr) {
                          if (!$auth.isAuthenticated()) { return; }
                          $auth.logout()
                            .then(function() {
                      Severity: Major
                      Found in examples/server/php/public/controllers/logout.js and 1 other location - About 2 hrs to fix
                      examples/client/controllers/logout.js on lines 1..9

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

                      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')
                        .controller('LogoutCtrl', function($location, $auth, toastr) {
                          if (!$auth.isAuthenticated()) { return; }
                          $auth.logout()
                            .then(function() {
                      Severity: Major
                      Found in examples/client/controllers/logout.js and 1 other location - About 2 hrs to fix
                      examples/server/php/public/controllers/logout.js on lines 1..9

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

                      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