gecos-team/gecoscc-ui

View on GitHub

Showing 1,621 of 1,621 total issues

Function DataTable has 4212 lines of code (exceeds 25 allowed). Consider refactoring.
Open

    var DataTable = function( oInit )
    {
        
        
        /**
Severity: Major
Found in gecoscc/static/js/libs/jquery.dataTables-1.9.4.js - About 3 wks to fix

    File fuelux.js has 6098 lines of code (exceeds 250 allowed). Consider refactoring.
    Open

    /*!
     * Fuel UX v3.16.0 
     * Copyright 2012-2017 ExactTarget
     * Licensed under the BSD-3-Clause license (https://github.com/ExactTarget/fuelux/blob/master/LICENSE)
     */
    Severity: Major
    Found in gecoscc/static/js/libs/fuelux.js - About 2 wks to fix

      File tests.py has 5325 lines of code (exceeds 250 allowed). Consider refactoring.
      Open

      #
      # Copyright 2013, Junta de Andalucia
      # http://www.juntadeandalucia.es/
      #
      # Authors:
      Severity: Major
      Found in gecoscc/tests.py - About 2 wks to fix

        File jquery.dataTables-1.9.4.js has 4999 lines of code (exceeds 250 allowed). Consider refactoring.
        Open

        /**
         * @summary     DataTables
         * @description Paginate, search and sort HTML tables
         * @version     1.9.4
         * @file        jquery.dataTables.js
        Severity: Major
        Found in gecoscc/static/js/libs/jquery.dataTables-1.9.4.js - About 2 wks to fix

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

              @mock.patch('gecoscc.forms.create_chef_admin_user')
              @mock.patch('gecoscc.forms._')
              @mock.patch('gecoscc.utils.isinstance')
              @mock.patch('chef.Node')
              @mock.patch('gecoscc.utils.ChefNode')
          Severity: Major
          Found in gecoscc/tests.py and 1 other location - About 1 wk to fix
          gecoscc/tests.py on lines 3697..3812

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

          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

              @mock.patch('gecoscc.forms.create_chef_admin_user')
              @mock.patch('gecoscc.forms._')
              @mock.patch('gecoscc.utils.isinstance')
              @mock.patch('chef.Node')
              @mock.patch('gecoscc.utils.ChefNode')
          Severity: Major
          Found in gecoscc/tests.py and 1 other location - About 1 wk to fix
          gecoscc/tests.py on lines 3814..3929

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

          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 jsonform-b3-1.0.0.js has 2705 lines of code (exceeds 250 allowed). Consider refactoring.
          Open

          /* Copyright (c) 2012 Joshfire - MIT license */
          /**
           * @fileoverview Core of the JSON Form client-side library.
           *
           * Generates an HTML form from a structured data model and a layout description.
          Severity: Major
          Found in gecoscc/static/js/libs/jsonform-b3-1.0.0.js - About 1 wk to fix

            Function Marionette has 1277 lines of code (exceeds 25 allowed). Consider refactoring.
            Open

            var Marionette = (function(global, Backbone, _){
              "use strict";
            
              // Define and export the Marionette namespace
              var Marionette = {};
            Severity: Major
            Found in gecoscc/static/js/libs/backbone-marionette-1.7.3.js - About 6 days to fix

              File tasks.py has 2089 lines of code (exceeds 250 allowed). Consider refactoring.
              Open

              #
              # Copyright 2013, Junta de Andalucia
              # http://www.juntadeandalucia.es/
              #
              # Authors:
              Severity: Major
              Found in gecoscc/tasks.py - About 5 days to fix

                File utils.py has 1980 lines of code (exceeds 250 allowed). Consider refactoring.
                Open

                # -*- coding: utf-8 -*-
                
                #
                # Copyright 2013, Junta de Andalucia
                # http://www.juntadeandalucia.es/
                Severity: Major
                Found in gecoscc/utils.py - About 5 days to fix

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

                  Severity: Major
                  Found in gecoscc/api/gpoconversors/user_mount.py and 1 other location - About 4 days to fix
                  gecoscc/api/gpoconversors/sharing_permissions.py on lines 0..69

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

                  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

                  Severity: Major
                  Found in gecoscc/api/gpoconversors/sharing_permissions.py and 1 other location - About 4 days to fix
                  gecoscc/api/gpoconversors/user_mount.py on lines 0..68

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

                  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 Marionette has a Cognitive Complexity of 227 (exceeds 5 allowed). Consider refactoring.
                  Open

                  var Marionette = (function(global, Backbone, _){
                    "use strict";
                  
                    // Define and export the Marionette namespace
                    var Marionette = {};
                  Severity: Minor
                  Found in gecoscc/static/js/libs/backbone-marionette-1.7.3.js - About 4 days to fix

                  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

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

                          for policy in policies:
                              # 4 - Add policy in OU
                              ou_1['policies'] = {text_type(policies[policy]['policy']['_id']):
                                  policies[policy]['policy_data_node_1']}
                              node_policy = self.add_and_get_policy(node=ou_1,
                  Severity: Major
                  Found in gecoscc/tests.py and 2 other locations - About 4 days to fix
                  gecoscc/tests.py on lines 3434..3482
                  gecoscc/tests.py on lines 3537..3585

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

                  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

                          for policy in policies:
                              # 6 - Add policy in A group
                              group_a['policies'] = {text_type(policies[policy]['policy']['_id']):
                                  policies[policy]['policy_data_node_1']}
                              group_a_policy = self.add_and_get_policy(node=group_a,
                  Severity: Major
                  Found in gecoscc/tests.py and 2 other locations - About 4 days to fix
                  gecoscc/tests.py on lines 3332..3378
                  gecoscc/tests.py on lines 3434..3482

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

                  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

                          for policy in policies:
                              # 6 - Add policy in A group
                              group_a['policies'] = {text_type(policies[policy]['policy']['_id']):
                                  policies[policy]['policy_data_node_1']}
                              group_a_policy = self.add_and_get_policy(node=group_a,
                  Severity: Major
                  Found in gecoscc/tests.py and 2 other locations - About 4 days to fix
                  gecoscc/tests.py on lines 3332..3378
                  gecoscc/tests.py on lines 3537..3585

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

                  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 backbone-marionette-1.7.3.js has 1504 lines of code (exceeds 250 allowed). Consider refactoring.
                  Open

                  // MarionetteJS (Backbone.Marionette)
                  // ----------------------------------
                  // v1.7.3
                  //
                  // Copyright (c)2014 Derick Bailey, Muted Solutions, LLC.
                  Severity: Major
                  Found in gecoscc/static/js/libs/backbone-marionette-1.7.3.js - About 4 days to fix

                    Function Paginator has a Cognitive Complexity of 195 (exceeds 5 allowed). Consider refactoring.
                    Open

                    Backbone.Paginator = (function ( Backbone, _, $ ) {
                      "use strict";
                    
                    
                      var bbVer = _.map(Backbone.VERSION.split('.'), function(digit) {
                    Severity: Minor
                    Found in gecoscc/static/js/libs/backbone.paginator-0.8.1.js - About 3 days to fix

                    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 command has a Cognitive Complexity of 184 (exceeds 5 allowed). Consider refactoring.
                    Open

                        def command(self):
                            # Clean the database if necessary
                            if self.options.clean:
                                print('Cleaning MongoDB data before importing...')
                                self.db.packages.drop()
                    Severity: Minor
                    Found in gecoscc/commands/synchronize_repositories.py - About 3 days to fix

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

                    Backbone.Paginator = (function ( Backbone, _, $ ) {
                      "use strict";
                    
                    
                      var bbVer = _.map(Backbone.VERSION.split('.'), function(digit) {
                    Severity: Major
                    Found in gecoscc/static/js/libs/backbone.paginator-0.8.1.js - About 3 days to fix
                      Severity
                      Category
                      Status
                      Source
                      Language