datahuborg/datahub

View on GitHub

Showing 283 of 1,132 total issues

Function show has 26 lines of code (exceeds 25 allowed). Consider refactoring.
Open

    Tour.prototype.show = function(key) {
      var next;
      if (key == null) {
        key = 0;
      }
Severity: Minor
Found in src/browser/static/dbwipes/js/lib/shepherd.js - About 1 hr to fix

    Function show has 26 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

        Tour.prototype.show = function(key) {
          var next;
          if (key == null) {
            key = 0;
          }
    Severity: Minor
    Found in src/apps/dbwipes/static/js/lib/shepherd.js - About 1 hr to fix

      Function find_security_policies has 8 arguments (exceeds 4 allowed). Consider refactoring.
      Open

          def find_security_policies(self, repo_base, repo=None, table=None,
      Severity: Major
      Found in src/core/db/backend/pg.py - About 1 hr to fix

        Function find_security_policies has 8 arguments (exceeds 4 allowed). Consider refactoring.
        Open

            def find_security_policies(
        Severity: Major
        Found in src/core/db/connection.py - About 1 hr to fix

          Function find_security_policies has 8 arguments (exceeds 4 allowed). Consider refactoring.
          Open

              def find_security_policies(repo_base, repo=None, table=None,
          Severity: Major
          Found in src/core/db/rlsmanager.py - About 1 hr to fix

            Function match_type has a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring.
            Open

            def match_type(types_a, types_b):
              if len(types_a) != len(types_b):
                return False
            
              for i in range(len(types_a)):
            Severity: Minor
            Found in src/apps/refiner/distill/inference.py - About 55 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 user_data_path has a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring.
            Open

            def user_data_path(repo_base, repo='', file_name='', file_format=None):
                """
                Returns an absolute path to a file or repo in a user's data folder.
            
                user_data_path('foo') => '/user_data/foo'
            Severity: Minor
            Found in src/core/db/manager.py - About 55 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 migrate_datahub_accounts has a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring.
            Open

            def migrate_datahub_accounts(*args, **kwargs):
                old_users = DataHubLegacyUser.objects.all()
                apps = App.objects.exclude(legacy_user=None)
                users = User.objects.all()
                print("Old model users: {0} New model users: {1}".format(
            Severity: Minor
            Found in src/account/management/commands/migratedatahubaccounts.py - About 55 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 9 (exceeds 5 allowed). Consider refactoring.
            Open

                def find_security_policies(repo_base, repo=None, table=None,
                                           policy_id=None, policy=None, policy_type=None,
                                           grantee=None, grantor=None, safe=True):
                    '''
                    Looks for security policies matching what the user specified in
            Severity: Minor
            Found in src/core/db/rlsmanager.py - About 55 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_numeric_stats has a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring.
            Open

                def get_numeric_stats(self, c):
                    ndistinct = self.get_distinct_count(c)
                    if ndistinct == 0:
                        return []
                    if ndistinct == 1:
            Severity: Minor
            Found in src/apps/dbwipes/summary.py - About 55 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 execute_query has a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring.
            Open

                def execute_query(self, query, current_page=1,
                                  rows_per_page=1000, repo=None,
                                  rows_only=False):
            
                    result = None
            Severity: Minor
            Found in src/api/serializer.py - About 55 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 update_card has a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring.
            Open

                def update_card(self, repo, card_name, new_query=None,
                                new_name=None, public=None):
                    """
                    Updates a card's name, query, and/or public visibility.
            
            
            Severity: Minor
            Found in src/core/db/manager.py - About 55 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 program has 7 arguments (exceeds 4 allowed). Consider refactoring.
            Open

            exports.template = template;function program(container, i, fn, data, declaredBlockParams, blockParams, depths) {
            Severity: Major
            Found in src/browser/static/datatables/js/dataTables.extra.js - About 50 mins to fix

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

              function ii(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 gg has 7 arguments (exceeds 4 allowed). Consider refactoring.
                Open

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

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

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

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

                    function ff(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 ii has 7 arguments (exceeds 4 allowed). Consider refactoring.
                      Open

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

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

                        function hh(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 hh has 7 arguments (exceeds 4 allowed). Consider refactoring.
                          Open

                          function hh(a, b, c, d, x, s, t) {
                          Severity: Major
                          Found in src/apps/dbwipes/static/js/lib/md5.js - About 50 mins to fix
                            Severity
                            Category
                            Status
                            Source
                            Language