datahuborg/datahub

View on GitHub

Showing 1,132 of 1,132 total issues

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

function cmn(q, a, b, x, s, t) {
a = add32(add32(a, q), add32(x, t));
return add32((a << s) | (a >>> (32 - s)), b);
}
Severity: Major
Found in src/apps/dbwipes/static/js/lib/md5.js and 1 other location - About 1 hr to fix
src/browser/static/dbwipes/js/lib/md5.js on lines 79..82

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

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

  $(document).on("click", ".dq-sort-modal-quit", 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 150..154

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

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

function cmn(q, a, b, x, s, t) {
a = add32(add32(a, q), add32(x, t));
return add32((a << s) | (a >>> (32 - s)), b);
}
Severity: Major
Found in src/browser/static/dbwipes/js/lib/md5.js and 1 other location - About 1 hr to fix
src/apps/dbwipes/static/js/lib/md5.js on lines 79..82

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

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

    if issubclass(type(exc), PGError):
        result['pgcode'] = exc.pgcode
        result['severity'] = exc.diag.severity
Severity: Major
Found in src/api/views.py and 1 other location - About 1 hr to fix
src/browser/middleware.py on lines 50..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 41.

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

        if issubclass(type(exception), PGError):
            context['pgcode'] = exception.pgcode
            context['severity'] = exception.diag.severity
Severity: Major
Found in src/browser/middleware.py and 1 other location - About 1 hr to fix
src/api/views.py on lines 962..964

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

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

            with self._assertRaisesOrNone(LookupError):
                tables = m.list_tables('missing_repo')
                self.assertEquals(set(tables), set(['table1']))
Severity: Major
Found in src/integration_tests/test_manager.py and 1 other location - About 1 hr to fix
src/integration_tests/test_manager.py on lines 459..461

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

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

            with self._assertRaisesOrNone(ValueError):
                tables = m.list_tables('1invalid repo')
                self.assertEquals(set(tables), set(['table1']))
Severity: Major
Found in src/integration_tests/test_manager.py and 1 other location - About 1 hr to fix
src/integration_tests/test_manager.py on lines 456..458

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

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

    position: function(_arg) {
      var left, result, shift, shiftLeft, shiftTop, top, _ref;
      top = _arg.top, left = _arg.left;
      if (!this.options.shift) {
        return;
Severity: Minor
Found in src/browser/static/dbwipes/js/lib/tether.js - About 1 hr to fix

    Function position has 31 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

        position: function(_arg) {
          var left, result, shift, shiftLeft, shiftTop, top, _ref;
          top = _arg.top, left = _arg.left;
          if (!this.options.shift) {
            return;
    Severity: Minor
    Found in src/apps/dbwipes/static/js/lib/tether.js - About 1 hr to fix

      Function test_connect_to_new_user has 31 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

          def test_connect_to_new_user(self):
              # names
              users = ['delete_me_one', 'delete_me_two', 'i_dont_exist']
              repo_shared = 'one_two'
              repo_user1_only = 'one'
      Severity: Minor
      Found in src/functional_tests/test_console.py - About 1 hr to fix

        Function renderModifiedData has 30 lines of code (exceeds 25 allowed). Consider refactoring.
        Open

            renderModifiedData: function(data) {
              var _this = this;
              this.$(".updated").remove();
              this.c.selectAll('g.data-container')
                .classed('background', false)
        Severity: Minor
        Found in src/browser/static/dbwipes/js/summary/queryview.js - About 1 hr to fix

          Function validate has 30 lines of code (exceeds 25 allowed). Consider refactoring.
          Open

              validate: function() {
                var errs = [],
                    yaliases = _.keys(this.get('badselection')),
                    drawing = this.get('drawing');
          
          
          Severity: Minor
          Found in src/browser/static/dbwipes/js/summary/scorpionquery.js - About 1 hr to fix

            Function validate has 30 lines of code (exceeds 25 allowed). Consider refactoring.
            Open

                validate: function() {
                  var errs = [],
                      yaliases = _.keys(this.get('badselection')),
                      drawing = this.get('drawing');
            
            
            Severity: Minor
            Found in src/apps/dbwipes/static/js/summary/scorpionquery.js - About 1 hr to fix

              Function renderModifiedData has 30 lines of code (exceeds 25 allowed). Consider refactoring.
              Open

                  renderModifiedData: function(data) {
                    var _this = this;
                    this.$(".updated").remove();
                    this.c.selectAll('g.data-container')
                      .classed('background', false)
              Severity: Minor
              Found in src/apps/dbwipes/static/js/summary/queryview.js - About 1 hr to fix

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

                    def export_table(self, table_name, file_path, file_format='CSV',
                                     delimiter=',', header=True):
                        return self.backend.export_table(
                Severity: Major
                Found in src/core/db/connection.py and 2 other locations - About 1 hr to fix
                src/core/db/connection.py on lines 201..203
                src/core/db/connection.py on lines 210..212

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

                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

                    def test_get_file(self):
                        mock_manager_get_file = self.mock_manager.return_value.get_file
                        self.serializer.get_file('repo', 'file')
                        self.assertTrue(mock_manager_get_file.called)
                Severity: Major
                Found in src/api/test/test_file_serializer.py and 2 other locations - About 1 hr to fix
                src/api/test/test_file_serializer.py on lines 33..36
                src/api/test/test_file_serializer.py on lines 38..41

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

                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

                    def test_upload_file(self):
                        mock_manager_save_file = self.mock_manager.return_value.save_file
                        self.serializer.upload_file('repo', 'file')
                        self.assertTrue(mock_manager_save_file.called)
                Severity: Major
                Found in src/api/test/test_file_serializer.py and 2 other locations - About 1 hr to fix
                src/api/test/test_file_serializer.py on lines 38..41
                src/api/test/test_file_serializer.py on lines 43..46

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

                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

                    def test_delete_file(self):
                        mock_manager_delete_file = self.mock_manager.return_value.delete_file
                        self.serializer.delete_file('repo', 'file')
                        self.assertTrue(mock_manager_delete_file.called)
                Severity: Major
                Found in src/api/test/test_file_serializer.py and 2 other locations - About 1 hr to fix
                src/api/test/test_file_serializer.py on lines 33..36
                src/api/test/test_file_serializer.py on lines 43..46

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

                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

                        self.wait_for_console(
                            users[1] + "@" + users[1] + ">", "//div[@class='cmd']/span[1]")
                Severity: Major
                Found in src/functional_tests/test_console.py and 1 other location - About 1 hr to fix
                src/functional_tests/test_console.py on lines 249..250

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

                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

                    def export_view(self, view_name, file_path, file_format='CSV',
                                    delimiter=',', header=True):
                        return self.backend.export_view(
                Severity: Major
                Found in src/core/db/connection.py and 2 other locations - About 1 hr to fix
                src/core/db/connection.py on lines 192..194
                src/core/db/connection.py on lines 210..212

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

                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