datahuborg/datahub

View on GitHub

Showing 1,132 of 1,132 total issues

Function onSubmit has 34 lines of code (exceeds 25 allowed). Consider refactoring.
Open

    onSubmit: function() {
      if (!this.model.isValid()) {
        this.$("#errmsg").html(this.model.validationError);
        return false;
      }
Severity: Minor
Found in src/apps/dbwipes/static/js/summary/scorpionview.js - About 1 hr to fix

    Function render has 34 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

        render: function() {
          if (!this.model.isValid()) {
            this.$svg.hide();
            return this;
          }
    Severity: Minor
    Found in src/browser/static/dbwipes/js/summary/queryview.js - About 1 hr to fix

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

      $(document).on("click", ".dt-op-button", function() {
        $(this).text(nextOp[$(this).text()]);
        datatable.draw();
      });
      Severity: Major
      Found in src/apps/datatables/client/js/filter-bar.js and 1 other location - About 1 hr to fix
      src/browser/static/datatables/js/dataTables.extra.js on lines 316..319

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

      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

      $(document).on("click", ".dt-op-button", function() {
        $(this).text(nextOp[$(this).text()]);
        datatable.draw();
      });
      Severity: Major
      Found in src/browser/static/datatables/js/dataTables.extra.js and 1 other location - About 1 hr to fix
      src/apps/datatables/client/js/filter-bar.js on lines 34..37

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

      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

          def go_to_create_app(self):
              element = self.find_element('create_app_link')
              self._show_menu_if_not_displayed(element)
              element.click()
              return AppsPage(self.driver)
      Severity: Major
      Found in src/functional_tests/pages.py and 1 other location - About 1 hr to fix
      src/functional_tests/pages.py on lines 100..104

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

      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

          locators = {
              'name': (By.ID, 'id_name'),
              'client_type': (By.ID, 'id_client_type'),
              'authorization_grant_type': (By.ID, 'id_authorization_grant_type'),
              'redirect_uris': (By.ID, 'id_redirect_uris'),
      Severity: Major
      Found in src/functional_tests/pages.py and 1 other location - About 1 hr to fix
      src/functional_tests/pages.py on lines 75..80

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

      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

          locators = {
              'user_menu_link': (By.ID, 'id_user_menu'),
              'launch_terminal_link': (By.ID, 'id_launch_terminal'),
              'create_app_link': (By.ID, 'id_create_app'),
              'settings_link': (By.ID, 'id_settings'),
      Severity: Major
      Found in src/functional_tests/pages.py and 1 other location - About 1 hr to fix
      src/functional_tests/pages.py on lines 172..177

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

      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

          def go_to_settings(self):
              element = self.find_element('settings_link')
              self._show_menu_if_not_displayed(element)
              element.click()
              return SettingsPage(self.driver)
      Severity: Major
      Found in src/functional_tests/pages.py and 1 other location - About 1 hr to fix
      src/functional_tests/pages.py on lines 94..98

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

      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

              try:
                  app = App.objects.get(app_id=collaborator)
                  collaborator_obj, _ = Collaborator.objects.get_or_create(
                      app=app, repo_name=repo, repo_base=self.repo_base)
      Severity: Major
      Found in src/core/db/manager.py and 1 other location - About 1 hr to fix
      src/core/db/manager.py on lines 416..419

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

      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

      Severity: Major
      Found in src/inventory/migrations/0004_rename_users_table.py and 1 other location - About 1 hr to fix
      src/inventory/migrations/0005_rename_user_model.py on lines 0..14

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

      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

      Severity: Major
      Found in src/inventory/migrations/0005_rename_user_model.py and 1 other location - About 1 hr to fix
      src/inventory/migrations/0004_rename_users_table.py on lines 0..14

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

      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

              except App.DoesNotExist:
                  user = User.objects.get(username=collaborator)
                  collaborator_obj, _ = Collaborator.objects.get_or_create(
                      user=user, repo_name=repo, repo_base=self.repo_base)
      Severity: Major
      Found in src/core/db/manager.py and 1 other location - About 1 hr to fix
      src/core/db/manager.py on lines 412..415

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

      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

      Method main has 33 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

        public static void main(String [] args) {
          try {
            // This will initially thrown an exception since
            // You will need to register an application and assign
            // the variables below.
      Severity: Minor
      Found in src/examples/java/src/SampleAccount.java - About 1 hr to fix

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

          $(document).on("click", ".dq-filter-quit", function() {
            callback();
            $("#dq-filter-modal").remove();
            $(".modal-backdrop").remove();
          });
        Severity: Major
        Found in src/apps/dataq/client_src/js/dq-filter-modal.js and 1 other location - About 1 hr to fix
        src/apps/dataq/client_src/js/dq-grouping-modal.js on lines 58..62

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

        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

          $(document).on("click", "#dq-grouping-modal-quit-btn", function() {
            callback();
            $("#dq-grouping-modal").remove();
            $(".modal-backdrop").remove();
          });
        Severity: Major
        Found in src/apps/dataq/client_src/js/dq-grouping-modal.js and 1 other location - About 1 hr to fix
        src/apps/dataq/client_src/js/dq-filter-modal.js on lines 67..71

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

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

          var setupButtons = function(q, qv) {
            $("[data-toggle=tooltip]").tooltip();
        
            var st_on_text = "Visualization shows what data matching your filter" ,
                st_off_text = "Visualization removes data matching your filter";
        Severity: Minor
        Found in src/apps/dbwipes/static/js/summary/setup.js - About 1 hr to fix

          Function setupButtons has 32 lines of code (exceeds 25 allowed). Consider refactoring.
          Open

            var setupButtons = function(q, qv) {
              $("[data-toggle=tooltip]").tooltip();
          
              var st_on_text = "Visualization shows what data matching your filter" ,
                  st_off_text = "Visualization removes data matching your filter";
          Severity: Minor
          Found in src/browser/static/dbwipes/js/summary/setup.js - About 1 hr to fix

            Function 13 has 32 lines of code (exceeds 25 allowed). Consider refactoring.
            Open

            },{"hbsfy/runtime":20}],13:[function(require,module,exports){
            (function (global){
            "use strict";
            /*globals Handlebars: true */
            var base = require("./handlebars/base");
            Severity: Minor
            Found in src/browser/static/datatables/js/dataTables.extra.js - About 1 hr to fix

              Function 13 has a Cognitive Complexity of 11 (exceeds 5 allowed). Consider refactoring.
              Open

              },{"hbsfy/runtime":20}],13:[function(require,module,exports){
              (function (global){
              "use strict";
              /*globals Handlebars: true */
              var base = require("./handlebars/base");
              Severity: Minor
              Found in src/browser/static/datatables/js/dataTables.extra.js - About 1 hr 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

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

                $(document).on("click", ".dq-sort-modal-done-btn", 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-sort-modal.js on lines 115..119

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

              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