datahuborg/datahub

View on GitHub

Showing 1,132 of 1,132 total issues

Avoid too many return statements within this function.
Open

      return fn(context, options);
Severity: Major
Found in src/browser/static/datatables/js/dataTables.extra.js - About 30 mins to fix

    Avoid too many return statements within this function.
    Open

      return string.replace(badChars, escapeChar);
    Severity: Major
    Found in src/browser/static/datatables/js/dataTables.extra.js - About 30 mins to fix

      Avoid too many return statements within this function.
      Open

              return Response(
      Severity: Major
      Found in src/api/views.py - About 30 mins to fix

        Avoid too many return statements within this function.
        Open

                return super(SummaryEncoder, self).default(o)
        Severity: Major
        Found in src/apps/dbwipes/util.py - About 30 mins to fix

          Avoid too many return statements within this function.
          Open

                  return HttpResponse(
          Severity: Major
          Found in src/browser/views.py - About 30 mins to fix

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

                that.operated_column = function(operated_column) {
                  if (operated_column !== undefined) {
                    that._operated_column = operated_column;
                  }
                  return that._operated_column;
            Severity: Minor
            Found in src/apps/dataq/client_src/js/dq-query.js and 2 other locations - About 30 mins to fix
            src/apps/dataq/client_src/js/dq-query.js on lines 45..50
            src/apps/dataq/client_src/js/dq-query.js on lines 141..146

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

            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

                    self.app = models.App.objects.create(
                        app_id="app_id", id=10, app_name="app_name",
                        app_token="app_token", user=self.user,
                        legacy_user=self.legacy_user)
            Severity: Minor
            Found in src/inventory/tests/test_models.py and 1 other location - About 30 mins to fix
            src/inventory/tests/test_models.py on lines 75..78

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

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

                that.grouping = function(grouping) {
                  if (grouping !== undefined) {
                    that._grouping = grouping;
                  }
                  return that._grouping;
            Severity: Minor
            Found in src/apps/dataq/client_src/js/dq-query.js and 2 other locations - About 30 mins to fix
            src/apps/dataq/client_src/js/dq-query.js on lines 45..50
            src/apps/dataq/client_src/js/dq-query.js on lines 60..65

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

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

                    self.assertEqual(
                        self.mock_execute_sql.call_args_list[0][0][1], revoke_params_1)
            Severity: Major
            Found in src/core/test/test_connector_pg.py and 8 other locations - About 30 mins to fix
            src/core/test/test_connector_pg.py on lines 210..211
            src/core/test/test_connector_pg.py on lines 271..272
            src/core/test/test_connector_pg.py on lines 288..289
            src/core/test/test_connector_pg.py on lines 753..754
            src/core/test/test_connector_pg.py on lines 758..759
            src/core/test/test_connector_pg.py on lines 760..761
            src/core/test/test_connector_pg.py on lines 767..768
            src/core/test/test_connector_pg.py on lines 769..770

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

            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

                    app = models.App.objects.create(
                        app_id="app_id", id=10, app_name="app_name",
                        app_token="app_token", user=self.user,
                        legacy_user=self.legacy_user)
            Severity: Minor
            Found in src/inventory/tests/test_models.py and 1 other location - About 30 mins to fix
            src/inventory/tests/test_models.py on lines 101..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 32.

            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

            api.table_url = function(repo, table) {
              return url_base + "table/" + repo + "/" + table + "/";
            }
            Severity: Minor
            Found in src/apps/datatables/client/js/api.js and 1 other location - About 30 mins to fix
            src/browser/static/datatables/js/dataTables.extra.js on lines 227..229

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

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

                that.repo = function(repo_name) {
                  if (repo_name !== undefined) {
                    that._repo_name = repo_name;
                  }
                  return that._repo_name;
            Severity: Minor
            Found in src/apps/dataq/client_src/js/dq-query.js and 2 other locations - About 30 mins to fix
            src/apps/dataq/client_src/js/dq-query.js on lines 60..65
            src/apps/dataq/client_src/js/dq-query.js on lines 141..146

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

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

                    self.assertEqual(
                        self.mock_execute_sql.call_args[0][1][0], reponame)
            Severity: Major
            Found in src/core/test/test_connector_pg.py and 8 other locations - About 30 mins to fix
            src/core/test/test_connector_pg.py on lines 271..272
            src/core/test/test_connector_pg.py on lines 288..289
            src/core/test/test_connector_pg.py on lines 753..754
            src/core/test/test_connector_pg.py on lines 755..756
            src/core/test/test_connector_pg.py on lines 758..759
            src/core/test/test_connector_pg.py on lines 760..761
            src/core/test/test_connector_pg.py on lines 767..768
            src/core/test/test_connector_pg.py on lines 769..770

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

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

                    self.assertEqual(
                        self.mock_execute_sql.call_args_list[2][0][1], drop_params)
            Severity: Major
            Found in src/core/test/test_connector_pg.py and 8 other locations - About 30 mins to fix
            src/core/test/test_connector_pg.py on lines 210..211
            src/core/test/test_connector_pg.py on lines 271..272
            src/core/test/test_connector_pg.py on lines 288..289
            src/core/test/test_connector_pg.py on lines 753..754
            src/core/test/test_connector_pg.py on lines 755..756
            src/core/test/test_connector_pg.py on lines 758..759
            src/core/test/test_connector_pg.py on lines 760..761
            src/core/test/test_connector_pg.py on lines 767..768

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

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

                    self.assertEqual(
                        self.mock_execute_sql.call_args[0][1][0], repo_name)
            Severity: Major
            Found in src/core/test/test_connector_pg.py and 8 other locations - About 30 mins to fix
            src/core/test/test_connector_pg.py on lines 210..211
            src/core/test/test_connector_pg.py on lines 288..289
            src/core/test/test_connector_pg.py on lines 753..754
            src/core/test/test_connector_pg.py on lines 755..756
            src/core/test/test_connector_pg.py on lines 758..759
            src/core/test/test_connector_pg.py on lines 760..761
            src/core/test/test_connector_pg.py on lines 767..768
            src/core/test/test_connector_pg.py on lines 769..770

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

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

                    self.assertEqual(
                        self.mock_execute_sql.call_args[0][1][0], repo_name)
            Severity: Major
            Found in src/core/test/test_connector_pg.py and 8 other locations - About 30 mins to fix
            src/core/test/test_connector_pg.py on lines 210..211
            src/core/test/test_connector_pg.py on lines 271..272
            src/core/test/test_connector_pg.py on lines 753..754
            src/core/test/test_connector_pg.py on lines 755..756
            src/core/test/test_connector_pg.py on lines 758..759
            src/core/test/test_connector_pg.py on lines 760..761
            src/core/test/test_connector_pg.py on lines 767..768
            src/core/test/test_connector_pg.py on lines 769..770

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

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

                    self.assertEqual(
                        self.mock_execute_sql.call_args_list[0][0][0], revoke_query)
            Severity: Major
            Found in src/core/test/test_connector_pg.py and 8 other locations - About 30 mins to fix
            src/core/test/test_connector_pg.py on lines 210..211
            src/core/test/test_connector_pg.py on lines 271..272
            src/core/test/test_connector_pg.py on lines 288..289
            src/core/test/test_connector_pg.py on lines 755..756
            src/core/test/test_connector_pg.py on lines 758..759
            src/core/test/test_connector_pg.py on lines 760..761
            src/core/test/test_connector_pg.py on lines 767..768
            src/core/test/test_connector_pg.py on lines 769..770

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

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

                    self.assertEqual(
                        self.mock_execute_sql.call_args_list[1][0][1], revoke_params_2)
            Severity: Major
            Found in src/core/test/test_connector_pg.py and 8 other locations - About 30 mins to fix
            src/core/test/test_connector_pg.py on lines 210..211
            src/core/test/test_connector_pg.py on lines 271..272
            src/core/test/test_connector_pg.py on lines 288..289
            src/core/test/test_connector_pg.py on lines 753..754
            src/core/test/test_connector_pg.py on lines 755..756
            src/core/test/test_connector_pg.py on lines 758..759
            src/core/test/test_connector_pg.py on lines 767..768
            src/core/test/test_connector_pg.py on lines 769..770

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

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

                    self.assertEqual(
                        self.mock_execute_sql.call_args_list[2][0][0], drop_query)
            Severity: Major
            Found in src/core/test/test_connector_pg.py and 8 other locations - About 30 mins to fix
            src/core/test/test_connector_pg.py on lines 210..211
            src/core/test/test_connector_pg.py on lines 271..272
            src/core/test/test_connector_pg.py on lines 288..289
            src/core/test/test_connector_pg.py on lines 753..754
            src/core/test/test_connector_pg.py on lines 755..756
            src/core/test/test_connector_pg.py on lines 758..759
            src/core/test/test_connector_pg.py on lines 760..761
            src/core/test/test_connector_pg.py on lines 769..770

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

            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

            api.table_url = function(repo, table) {
              return url_base + "table/" + repo + "/" + table + "/";
            }
            Severity: Minor
            Found in src/browser/static/datatables/js/dataTables.extra.js and 1 other location - About 30 mins to fix
            src/apps/datatables/client/js/api.js on lines 19..21

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

            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