datahuborg/datahub

View on GitHub

Showing 1,132 of 1,132 total issues

Function forEachRowInColumn has 27 lines of code (exceeds 25 allowed). Consider refactoring.
Open

        datatable.forEachRowInColumn = function(colName, func) {
          var targets = -1;
          columnDefs.forEach(function(columnDef) {
            if (columnDef.name === colName) {
              targets = columnDef.targets;
Severity: Minor
Found in src/browser/static/datatables/js/dataTables.extra.js - About 1 hr to fix

    Function FilterModal has 27 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

      DataQ.FilterModal = function(q, cb) {
        // Set the instance variables.
        callback = cb;
        query = q;
    
    
    Severity: Minor
    Found in src/apps/dataq/client_src/js/dq-filter-modal.js - About 1 hr to fix

      Function test_public_repo has 27 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

          def test_public_repo(self):
              # Django migrations.RunPython doesn't happen before each test.
              # To work around this we call some methods (that should have been done
              # in migrations) here.
              # Django 1.8/1.9 https://code.djangoproject.com/ticket/23640
      Severity: Minor
      Found in src/functional_tests/test_db.py - About 1 hr to fix

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

            $(".modal-backdrop").click(function() {
              $("#dq-table-modal").remove();
              $(".modal-backdrop").remove();
              cb();
            })
        Severity: Major
        Found in src/apps/dataq/client_src/js/dq-table-modal.js and 1 other location - About 1 hr to fix
        src/apps/dataq/client_src/js/dq-sort-modal.js on lines 46..50

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

        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

            $(".modal-backdrop").click(function() {
              $("#dq-sort-modal").remove();
              $(".modal-backdrop").remove();
              callback();
            })
        Severity: Major
        Found in src/apps/dataq/client_src/js/dq-sort-modal.js and 1 other location - About 1 hr to fix
        src/apps/dataq/client_src/js/dq-table-modal.js on lines 64..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 56.

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

              parse: function(resp) {
                //
                // results: [ { score:, c_range:, clauses:, alt_clauses:, } ]
                // top_k_results: { 
                //  yalias: { 
          Severity: Minor
          Found in src/apps/dbwipes/static/js/summary/scorpionquery.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 parse has 26 lines of code (exceeds 25 allowed). Consider refactoring.
              Open

                  parse: function(resp) {
                    //
                    // results: [ { score:, c_range:, clauses:, alt_clauses:, } ]
                    // top_k_results: { 
                    //  yalias: { 
              Severity: Minor
              Found in src/browser/static/dbwipes/js/summary/scorpionquery.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(repo_base, repo=None, table=None,
                  Severity: Major
                  Found in src/core/db/rlsmanager.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

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

                          @staticmethod
                          def create_license_link_table():
                              ''' Used to create the license link table on DataHub start '''
                              repo_base = settings.LICENSE_DB
                              with _superuser_connection(repo_base) as conn:
                      Severity: Major
                      Found in src/core/db/licensemanager.py and 4 other locations - About 1 hr to fix
                      src/core/db/licensemanager.py on lines 54..60
                      src/core/db/licensemanager.py on lines 62..68
                      src/core/db/rlsmanager.py on lines 54..60
                      src/core/db/rlsmanager.py on lines 62..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 38.

                      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 5 locations. Consider refactoring.
                      Open

                          @staticmethod
                          def create_security_policy_table():
                              ''' Used to create the security policy table on DataHub start '''
                              repo_base = settings.POLICY_DB
                              with _superuser_connection(repo_base) as conn:
                      Severity: Major
                      Found in src/core/db/rlsmanager.py and 4 other locations - About 1 hr to fix
                      src/core/db/licensemanager.py on lines 54..60
                      src/core/db/licensemanager.py on lines 62..68
                      src/core/db/licensemanager.py on lines 70..76
                      src/core/db/rlsmanager.py on lines 54..60

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

                      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

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

                      def get_tables(manager, repo_name):
                          tables = manager.list_tables(repo_name)
                          if len(tables) > 0:
                              return tables
                          return None
                      Severity: Major
                      Found in src/apps/datatables/views.py and 1 other location - About 1 hr to fix
                      src/apps/dataq/views.py on lines 65..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 38.

                      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 5 locations. Consider refactoring.
                      Open

                          @staticmethod
                          def create_license_schema():
                              ''' Used to create the license schema on DataHub start '''
                              repo_base = settings.LICENSE_DB
                              with _superuser_connection(repo_base) as conn:
                      Severity: Major
                      Found in src/core/db/licensemanager.py and 4 other locations - About 1 hr to fix
                      src/core/db/licensemanager.py on lines 62..68
                      src/core/db/licensemanager.py on lines 70..76
                      src/core/db/rlsmanager.py on lines 54..60
                      src/core/db/rlsmanager.py on lines 62..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 38.

                      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

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

                      def get_tables(manager, repo_name):
                          tables = manager.list_tables(repo_name)
                          if len(tables) > 0:
                              return tables
                          return None
                      Severity: Major
                      Found in src/apps/dataq/views.py and 1 other location - About 1 hr to fix
                      src/apps/datatables/views.py on lines 48..52

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

                      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 5 locations. Consider refactoring.
                      Open

                          @staticmethod
                          def create_license_table():
                              ''' Used to create the license table on DataHub start '''
                              repo_base = settings.LICENSE_DB
                              with _superuser_connection(repo_base) as conn:
                      Severity: Major
                      Found in src/core/db/licensemanager.py and 4 other locations - About 1 hr to fix
                      src/core/db/licensemanager.py on lines 54..60
                      src/core/db/licensemanager.py on lines 70..76
                      src/core/db/rlsmanager.py on lines 54..60
                      src/core/db/rlsmanager.py on lines 62..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 38.

                      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 5 locations. Consider refactoring.
                      Open

                          @staticmethod
                          def create_security_policy_schema():
                              ''' Used to create the security policy schema on DataHub start '''
                              repo_base = settings.POLICY_DB
                              with _superuser_connection(repo_base) as conn:
                      Severity: Major
                      Found in src/core/db/rlsmanager.py and 4 other locations - About 1 hr to fix
                      src/core/db/licensemanager.py on lines 54..60
                      src/core/db/licensemanager.py on lines 62..68
                      src/core/db/licensemanager.py on lines 70..76
                      src/core/db/rlsmanager.py on lines 62..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 38.

                      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

                          that.selected_columns = function(table_name, selected_columns) {
                            if (selected_columns !== undefined) {
                              that._selected_columns_for_table[table_name] = selected_columns;
                            }
                            return that._selected_columns_for_table[table_name];
                      Severity: Minor
                      Found in src/apps/dataq/client_src/js/dq-query.js and 1 other location - About 55 mins to fix
                      src/apps/dataq/client_src/js/dq-query.js on lines 30..35

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

                      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

                      Severity
                      Category
                      Status
                      Source
                      Language