datahuborg/datahub

View on GitHub

Showing 1,132 of 1,132 total issues

Function export_view has 5 arguments (exceeds 4 allowed). Consider refactoring.
Open

    def export_view(self, view_name, file_path, file_format='CSV',
Severity: Minor
Found in src/core/db/backend/pg.py - About 35 mins to fix

    Function import_rows has 5 arguments (exceeds 4 allowed). Consider refactoring.
    Open

        def import_rows(self, repo, table, rows, delimiter=',', header=False):
    Severity: Minor
    Found in src/core/db/backend/pg.py - About 35 mins to fix

      Function execute_query has 5 arguments (exceeds 4 allowed). Consider refactoring.
      Open

          def execute_query(self, query, current_page=1,
      Severity: Minor
      Found in src/api/serializer.py - About 35 mins to fix

        Function create_license_view has 5 arguments (exceeds 4 allowed). Consider refactoring.
        Open

            def create_license_view(self, repo_base, repo,
        Severity: Minor
        Found in src/core/db/connection.py - About 35 mins to fix

          Function fill_in_form has 5 arguments (exceeds 4 allowed). Consider refactoring.
          Open

              def fill_in_form(self, name, client_type,
          Severity: Minor
          Found in src/functional_tests/pages.py - About 35 mins to fix

            Function delete has 5 arguments (exceeds 4 allowed). Consider refactoring.
            Open

                def delete(self, request, repo_base, repo_name, card_name, format=None):
            Severity: Minor
            Found in src/api/views.py - About 35 mins to fix

              Function update_card has 5 arguments (exceeds 4 allowed). Consider refactoring.
              Open

                  def update_card(self, repo, card_name, new_query, new_name, public):
              Severity: Minor
              Found in src/api/serializer.py - About 35 mins to fix

                Function delete has 5 arguments (exceeds 4 allowed). Consider refactoring.
                Open

                    def delete(self, request, repo_base, repo_name, table, format=None):
                Severity: Minor
                Found in src/api/views.py - About 35 mins to fix

                  Function export_view has 5 arguments (exceeds 4 allowed). Consider refactoring.
                  Open

                      def export_view(self, view_name, file_path, file_format='CSV',
                  Severity: Minor
                  Found in src/core/db/connection.py - About 35 mins to fix

                    Function get_view_sql has 5 arguments (exceeds 4 allowed). Consider refactoring.
                    Open

                        def get_view_sql(self, repo_base, repo, table, view_params, license_id):
                    Severity: Minor
                    Found in src/core/db/backend/pg.py - About 35 mins to fix

                      Function 6 has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring.
                      Open

                      },{}],6:[function(require,module,exports){
                      module.exports = function(query, hidden_cols) {
                        try {
                          var lower_case_query = query.toLowerCase();
                          var select_end = lower_case_query.indexOf("select") + "select".length;
                      Severity: Minor
                      Found in src/browser/static/datatables/js/dataTables.extra.js - About 35 mins 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 15 has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring.
                      Open

                      },{"./exception":15,"./utils":18}],15:[function(require,module,exports){
                      "use strict";
                      
                      var errorProps = ['description', 'fileName', 'lineNumber', 'message', 'name', 'number', 'stack'];
                      
                      
                      Severity: Minor
                      Found in src/browser/static/datatables/js/dataTables.extra.js - About 35 mins 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 createFilter has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring.
                      Open

                      var createFilter = function(){
                        var selector = $(".dataTables_scrollFootInner tfoot"); 
                        var order = datatable.colReorder.order();
                      
                        for (var i = 0; i < order.length; i++) {
                      Severity: Minor
                      Found in src/apps/datatables/client/js/filter-bar.js - About 35 mins 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 _check_external_links has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring.
                      Open

                          def _check_external_links(self):
                              # Justin gets a list of external links
                              links = self.browser.find_elements_by_xpath(
                                  "//a[(starts-with(@href, 'http'))]")
                              links = map(lambda x: x.get_attribute('href'), links)
                      Severity: Minor
                      Found in src/functional_tests/base.py - About 35 mins 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 find_security_policies has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring.
                      Open

                          def find_security_policies(self, repo_base, repo=None, table=None,
                                                     policy_id=None, policy=None, policy_type=None,
                                                     grantee=None, grantor=None):
                              '''
                              Returns a list of all security polices that match the inputs specied
                      Severity: Minor
                      Found in src/core/db/backend/pg.py - About 35 mins 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 refine_data has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring.
                      Open

                      def refine_data(request):
                          res = {'error': None}
                          try:
                              if request.method == 'POST':
                                  training_input = request.POST['training_input']
                      Severity: Minor
                      Found in src/apps/refiner/views.py - About 35 mins 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 get_date_stats has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring.
                      Open

                          def get_date_stats(self, col_name):
                              q = ('select max(%s)::date, min(%s)::date, '
                                   'EXTRACT(EPOCH FROM (max(%s::timestamp) - min(%s::timestamp)))/60'
                                   ' as minutes from %s')
                              q = q % (col_name, col_name, col_name, col_name, self.tablename)
                      Severity: Minor
                      Found in src/apps/dbwipes/summary.py - About 35 mins 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 remove_user has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring.
                      Open

                          def remove_user(username, remove_db=True, ignore_missing_user=False):
                              # Delete the Django user
                              try:
                                  DataHubManager._remove_django_user(username)
                              except User.DoesNotExist as e:
                      Severity: Minor
                      Found in src/core/db/manager.py - About 35 mins 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 analyze_structure has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring.
                      Open

                      def analyze_structure(o_chunks_list):
                        o_fields_structure = defaultdict(list)
                      
                        for o_chunks in o_chunks_list:
                          for i in range(len(o_chunks)):
                      Severity: Minor
                      Found in src/apps/refiner/distill/inference.py - About 35 mins 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 license_create has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring.
                      Open

                      def license_create(request):
                          username = request.user.get_username()
                          public_role = settings.PUBLIC_ROLE
                      
                          if request.method == 'POST':
                      Severity: Minor
                      Found in src/browser/views.py - About 35 mins 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

                      Severity
                      Category
                      Status
                      Source
                      Language