datahuborg/datahub

View on GitHub

Showing 283 of 1,132 total issues

Function gg has 7 arguments (exceeds 4 allowed). Consider refactoring.
Open

function gg(a, b, c, d, x, s, t) {
Severity: Major
Found in src/browser/static/dbwipes/js/lib/md5.js - About 50 mins to fix

    Function create_security_policy has 7 arguments (exceeds 4 allowed). Consider refactoring.
    Open

        def create_security_policy(self, policy, policy_type, grantee, grantor,
    Severity: Major
    Found in src/core/db/backend/pg.py - About 50 mins to fix

      Function create_security_policy has 7 arguments (exceeds 4 allowed). Consider refactoring.
      Open

          def create_security_policy(
      Severity: Major
      Found in src/core/db/rlsmanager.py - About 50 mins to fix

        Function create_security_policy has 7 arguments (exceeds 4 allowed). Consider refactoring.
        Open

            def create_security_policy(self, policy, policy_type, grantee,
        Severity: Major
        Found in src/core/db/connection.py - About 50 mins to fix

          Function import_file has 7 arguments (exceeds 4 allowed). Consider refactoring.
          Open

              def import_file(self, table_name, file_path, file_format='CSV',
          Severity: Major
          Found in src/core/db/connection.py - About 50 mins to fix

            Function import_file has 7 arguments (exceeds 4 allowed). Consider refactoring.
            Open

                def import_file(self, table_name, file_path, file_format='CSV',
            Severity: Major
            Found in src/core/db/backend/pg.py - About 50 mins to fix

              Avoid deeply nested control flow statements.
              Open

                          if (eAttachment.left === 'left') {
                            left -= targetWidth;
                            tAttachment.left = 'left';
                            left -= width;
                            eAttachment.left = 'right';
              Severity: Major
              Found in src/browser/static/dbwipes/js/lib/tether.js - About 45 mins to fix

                Avoid deeply nested control flow statements.
                Open

                          } else if (tAttachment.left === 'center') {
                            if (left + width > bounds[2] && eAttachment.left === 'left') {
                              left -= width;
                              eAttachment.left = 'right';
                            } else if (left < bounds[0] && eAttachment.left === 'right') {
                Severity: Major
                Found in src/apps/dbwipes/static/js/lib/tether.js - About 45 mins to fix

                  Function cmn has 6 arguments (exceeds 4 allowed). Consider refactoring.
                  Open

                  function cmn(q, a, b, x, s, t) {
                  Severity: Minor
                  Found in src/browser/static/dbwipes/js/lib/md5.js - About 45 mins to fix

                    Function cmn has 6 arguments (exceeds 4 allowed). Consider refactoring.
                    Open

                    function cmn(q, a, b, x, s, t) {
                    Severity: Minor
                    Found in src/apps/dbwipes/static/js/lib/md5.js - About 45 mins to fix

                      Avoid deeply nested control flow statements.
                      Open

                                  if (priorKey) {
                                    execIteration(priorKey, i-1);
                                  }
                      Severity: Major
                      Found in src/browser/static/datatables/js/dataTables.extra.js - About 45 mins to fix

                        Avoid deeply nested control flow statements.
                        Open

                                  } else if (tAttachment.left === 'center') {
                                    if (left + width > bounds[2] && eAttachment.left === 'left') {
                                      left -= width;
                                      eAttachment.left = 'right';
                                    } else if (left < bounds[0] && eAttachment.left === 'right') {
                        Severity: Major
                        Found in src/browser/static/dbwipes/js/lib/tether.js - About 45 mins to fix

                          Avoid deeply nested control flow statements.
                          Open

                                      if (eAttachment.left === 'left') {
                                        left -= targetWidth;
                                        tAttachment.left = 'left';
                                        left -= width;
                                        eAttachment.left = 'right';
                          Severity: Major
                          Found in src/apps/dbwipes/static/js/lib/tether.js - About 45 mins to fix

                            Function schema has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring.
                            Open

                            def schema(request, repo, table):
                                username = request.user.get_username()
                                manager = DataHubManager(username)
                                repos = get_repos(manager)
                                if repos is not None and repo in repos:
                            Severity: Minor
                            Found in src/apps/datatables/views.py - About 45 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 __init__ has 6 arguments (exceeds 4 allowed). Consider refactoring.
                            Open

                                def __init__(self, data, name, searchable, orderable, searchValue, searchRegex):
                            Severity: Minor
                            Found in src/apps/datatables/models/draw_request_column.py - About 45 mins to fix

                              Function create_user_db_and_data_folder_if_needed has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring.
                              Open

                              def create_user_db_and_data_folder_if_needed(sender, instance, **kwargs):
                                  """
                                  Creates a Postgres role and db and data folder to go with new Django users.
                              
                                  Raises an exception if the role, database, or user data folder exists
                              Severity: Minor
                              Found in src/account/signals.py - About 45 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

                              Avoid deeply nested control flow statements.
                              Open

                                                      if type_for_col[col_filter.name] == "text":
                                                          first = "'" + first + "'"
                                                          second = "'" + second + "'"
                                                      col_filter_string = "(%s BETWEEN %s AND %s)" % (col_filter.name, first, second)
                              Severity: Major
                              Found in src/apps/datatables/util/run_draw_request.py - About 45 mins to fix

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

                                    def export_view(self, repo, view, file_name=None, file_format='CSV',
                                Severity: Minor
                                Found in src/api/serializer.py - About 45 mins to fix

                                  Function create_table_from_file has 6 arguments (exceeds 4 allowed). Consider refactoring.
                                  Open

                                      def create_table_from_file(self, repo, table, file_name, delimiter,
                                  Severity: Minor
                                  Found in src/api/serializer.py - About 45 mins to fix

                                    Avoid deeply nested control flow statements.
                                    Open

                                                            if len(range_vals) != 2:
                                                                return ""
                                                            first, second = range_vals[0], range_vals[1]
                                    Severity: Major
                                    Found in src/apps/datatables/util/run_draw_request.py - About 45 mins to fix
                                      Severity
                                      Category
                                      Status
                                      Source
                                      Language