sahat/satellizer

View on GitHub

Showing 562 of 562 total issues

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

/*!
 * Copyright 2014 Drifty Co.
 * http://drifty.com/
 *
 * Ionic, v1.0.0
Severity: Major
Found in examples/ionic/www/lib/ionic/js/ionic-angular.js - About 3 wks to fix

    File ionic.js has 4854 lines of code (exceeds 250 allowed). Consider refactoring.
    Open

    /*!
     * Copyright 2014 Drifty Co.
     * http://drifty.com/
     *
     * Ionic, v1.0.0
    Severity: Major
    Found in examples/ionic/www/lib/ionic/js/ionic.js - About 2 wks to fix

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

      angular.module('MyApp')
        .directive('passwordStrength', function() {
          return {
            restrict: 'A',
            require: 'ngModel',
      Severity: Major
      Found in examples/client/directives/passwordStrength.js and 1 other location - About 1 wk to fix
      examples/server/php/public/directives/passwordStrength.js on lines 1..116

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

      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('passwordStrength', function() {
          return {
            restrict: 'A',
            require: 'ngModel',
      Severity: Major
      Found in examples/server/php/public/directives/passwordStrength.js and 1 other location - About 1 wk to fix
      examples/client/directives/passwordStrength.js on lines 1..116

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

      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-ui-router.js has 1637 lines of code (exceeds 250 allowed). Consider refactoring.
      Open

      /**
       * State-based routing for AngularJS
       * @version v0.2.13
       * @link http://angular-ui.github.com/
       * @license MIT License, http://www.opensource.org/licenses/MIT
      Severity: Major
      Found in examples/ionic/www/lib/ionic/js/angular-ui/angular-ui-router.js - About 4 days to fix

        File angular-animate.js has 1106 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: Major
        Found in examples/ionic/www/lib/ionic/js/angular/angular-animate.js - About 2 days to fix

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

          angular.module('MyApp')
            .controller('ProfileCtrl', function($scope, $auth, toastr, Account) {
              $scope.getProfile = function() {
                Account.getProfile()
                  .then(function(response) {
          Severity: Major
          Found in examples/server/php/public/controllers/profile.js and 1 other location - About 2 days to fix
          examples/client/controllers/profile.js on lines 1..43

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

          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('ProfileCtrl', function($scope, $auth, toastr, Account) {
              $scope.getProfile = function() {
                Account.getProfile()
                  .then(function(response) {
          Severity: Major
          Found in examples/client/controllers/profile.js and 1 other location - About 2 days to fix
          examples/server/php/public/controllers/profile.js on lines 1..43

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

          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 satellizer.js has 936 lines of code (exceeds 250 allowed). Consider refactoring.
          Open

          /**
           * Satellizer 0.15.5
           * (c) 2016 Sahat Yalkabov 
           * License: MIT 
           */
          Severity: Major
          Found in examples/ionic/www/lib/satellizer/dist/satellizer.js - About 2 days to fix

            Function RepeatManagerFactory has 460 lines of code (exceeds 25 allowed). Consider refactoring.
            Open

            function RepeatManagerFactory($rootScope, $window, $$rAF) {
              var EMPTY_DIMENSION = { primaryPos: 0, secondaryPos: 0, primarySize: 0, secondarySize: 0, rowPrimarySize: 0 };
            
              return function RepeatController(options) {
                var afterItemsNode = options.afterItemsNode;
            Severity: Major
            Found in examples/ionic/www/lib/ionic/js/ionic-angular.js - About 2 days to fix

              Function RepeatController has 457 lines of code (exceeds 25 allowed). Consider refactoring.
              Open

                return function RepeatController(options) {
                  var afterItemsNode = options.afterItemsNode;
                  var containerNode = options.containerNode;
                  var forceRefreshImages = options.forceRefreshImages;
                  var heightData = options.heightData;
              Severity: Major
              Found in examples/ionic/www/lib/ionic/js/ionic-angular.js - About 2 days to fix

                File server.js has 846 lines of code (exceeds 250 allowed). Consider refactoring.
                Open

                /**
                 * Satellizer Node.js Example
                 * (c) 2015 Sahat Yalkabov
                 * License: MIT
                 */
                Severity: Major
                Found in examples/server/node/server.js - About 2 days to fix

                  Function $StateProvider has 400 lines of code (exceeds 25 allowed). Consider refactoring.
                  Open

                  function $StateProvider(   $urlRouterProvider,   $urlMatcherFactory) {
                  
                    var root, states = {}, $state, queue = {}, abstractKey = 'abstract';
                  
                    // Builds state properties from definition passed to registerState()
                  Severity: Major
                  Found in examples/ionic/www/lib/ionic/js/angular-ui/angular-ui-router.js - About 2 days to fix

                    File satellizer.js has 802 lines of code (exceeds 250 allowed). Consider refactoring.
                    Open

                    /**
                     * Satellizer 0.14.1
                     * (c) 2016 Sahat Yalkabov
                     * License: MIT
                     */
                    Severity: Major
                    Found in examples/ionic/www/lib/satellizer/satellizer.js - About 1 day to fix

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

                        initialize: function (options) {
                          var slider = this;
                      
                          // utilities
                          var noop = function() {}; // simple no operation function
                      Severity: Major
                      Found in examples/ionic/www/lib/ionic/js/ionic.js - About 1 day to fix

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

                                if ($request->header('Authorization'))
                                {
                                    $user = User::where('foursquare', '=', $profile['id']);
                                    if ($user->first())
                                    {
                        Severity: Major
                        Found in examples/server/php/app/Http/Controllers/AuthController.php and 1 other location - About 1 day to fix
                        examples/server/php/app/Http/Controllers/AuthController.php on lines 267..302

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

                        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 ($request->header('Authorization'))
                                {
                                    $user = User::where('linkedin', '=', $profile['id']);
                        
                                    if ($user->first())
                        Severity: Major
                        Found in examples/server/php/app/Http/Controllers/AuthController.php and 1 other location - About 1 day to fix
                        examples/server/php/app/Http/Controllers/AuthController.php on lines 455..489

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

                        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 request.headers.get('Authorization'):
                                user = User.query.filter_by(google=profile['sub']).first()
                                if user:
                                    response = jsonify(message='There is already a Google account that belongs to you')
                                    response.status_code = 409
                        Severity: Major
                        Found in examples/server/python/app.py and 2 other locations - About 1 day to fix
                        examples/server/python/app.py on lines 171..190
                        examples/server/python/app.py on lines 427..446

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

                        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 request.headers.get('Authorization'):
                                user = User.query.filter_by(bitbucket=profile['uuid']).first()
                                if user:
                                    response = jsonify(message='There is already a Bitbucket account that belongs to you')
                                    response.status_code = 409
                        Severity: Major
                        Found in examples/server/python/app.py and 2 other locations - About 1 day to fix
                        examples/server/python/app.py on lines 171..190
                        examples/server/python/app.py on lines 282..300

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

                        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 request.headers.get('Authorization'):
                                user = User.query.filter_by(facebook=profile['id']).first()
                                if user:
                                    response = jsonify(message='There is already a Facebook account that belongs to you')
                                    response.status_code = 409
                        Severity: Major
                        Found in examples/server/python/app.py and 2 other locations - About 1 day to fix
                        examples/server/python/app.py on lines 282..300
                        examples/server/python/app.py on lines 427..446

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

                        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