datahuborg/datahub

View on GitHub

Showing 283 of 1,132 total issues

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/connection.py - About 35 mins to fix

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

        def __init__(self, repo, table, draw_request, draw_response, manager):
    Severity: Minor
    Found in src/apps/datatables/util/run_draw_request.py - About 35 mins to fix

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

          def get(self, request, repo_base, repo_name, file_name, format=None):
      Severity: Minor
      Found in src/api/views.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, file_name, format=None):
        Severity: Minor
        Found in src/api/views.py - About 35 mins to fix

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

          def security_policy_delete(request, repo_base, repo, table, policy_id):
          Severity: Minor
          Found in src/browser/views.py - About 35 mins to fix

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

                def __init__(self, user, password, host=HOST, port=PORT, repo_base=None):
            Severity: Minor
            Found in src/core/db/backend/pg.py - About 35 mins to fix

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

                  def get(self, request, repo_base, repo_name, collaborator, format=None):
              Severity: Minor
              Found in src/api/views.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 aggregate has 5 arguments (exceeds 4 allowed). Consider refactoring.
                  Open

                  def aggregate(request, repo, table, agg_type, col_name):
                  Severity: Minor
                  Found in src/apps/datatables/views.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/manager.py - About 35 mins to fix

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

                          def import_rows(
                      Severity: Minor
                      Found in src/core/db/connection.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/backend/pg.py - About 35 mins to fix

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

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

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

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

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

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

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

                                def _convert_pg_exception(e):
                                    # Convert some psycopg2 errors into exceptions meaningful to
                                    # Django.
                                    if (e.pgcode == errorcodes.INSUFFICIENT_PRIVILEGE):
                                        raise PermissionDenied()
                                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 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

                                Severity
                                Category
                                Status
                                Source
                                Language