datahuborg/datahub

View on GitHub

Showing 283 of 1,132 total issues

Function initComplete has 37 lines of code (exceeds 25 allowed). Consider refactoring.
Open

      "initComplete": function(settings, json) {
        filterBar = FilterBar(jqueryObject.parent().parent().parent(), columnDefs, datatable);
        aggregator = Aggregator(jqueryObject.parent().parent().parent(), columnDefs, repo, table);

        datatable.forEachRowInColumn = function(colName, func) {
Severity: Minor
Found in src/browser/static/datatables/js/dataTables.extra.js - About 1 hr to fix

    Function initComplete has 37 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

          "initComplete": function(settings, json) {
            filterBar = FilterBar(jqueryObject.parent().parent().parent(), columnDefs, datatable);
            aggregator = Aggregator(jqueryObject.parent().parent().parent(), columnDefs, repo, table);
    
            datatable.forEachRowInColumn = function(colName, func) {
    Severity: Minor
    Found in src/apps/datatables/client/js/dataTables.extra.js - About 1 hr to fix

      Function test_apply_row_level_security_base has 37 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

          def test_apply_row_level_security_base(self):
              mock_find_table_policies = self.create_patch(
                  'core.db.query_rewriter.SQLQueryRewriter.find_table_policies')
              mock_find_table_policies.return_value = ["tester='Alice'"]
      
      
      Severity: Minor
      Found in src/core/test/test_query_rewriter.py - About 1 hr to fix

        Function 7 has a Cognitive Complexity of 12 (exceeds 5 allowed). Consider refactoring.
        Open

        },{}],7:[function(require,module,exports){
        // hbsfy compiled Handlebars template
        var HandlebarsCompiler = require('hbsfy/runtime');
        module.exports = HandlebarsCompiler.template({"1":function(depth0,helpers,partials,data) {
            var helper;
        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

        Function __call__ has a Cognitive Complexity of 12 (exceeds 5 allowed). Consider refactoring.
        Open

            def __call__(self, fn):
                def wrapped(this):
                    now = time.time()
                    last_updated = None
                    cached_value = None
        Severity: Minor
        Found in src/account/backends/oidc.py - 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

        Function 3 has 35 lines of code (exceeds 25 allowed). Consider refactoring.
        Open

        },{"./api.js":3,"./postgres-types.js":5,"./templates/aggregate-col-list-item.hbs":7,"./templates/grouped-aggregate-dropdown.hbs":11}],3:[function(require,module,exports){
        /**
         * This file contains the code for interacting with the API
         * for server side processing of datatables.
         */
        Severity: Minor
        Found in src/browser/static/datatables/js/dataTables.extra.js - About 1 hr to fix

          Function parse has 35 lines of code (exceeds 25 allowed). Consider refactoring.
          Open

              parse: function(resp) {
                var data = resp.data;
                var type = data.type,
                    stats = data.stats,
                    _this = this;
          Severity: Minor
          Found in src/apps/dbwipes/static/js/summary/cstat.js - About 1 hr to fix

            Function parse has 35 lines of code (exceeds 25 allowed). Consider refactoring.
            Open

                parse: function(resp) {
                  var data = resp.data;
                  var type = data.type,
                      stats = data.stats,
                      _this = this;
            Severity: Minor
            Found in src/browser/static/dbwipes/js/summary/cstat.js - About 1 hr to fix

              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

                  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/apps/dbwipes/static/js/summary/queryview.js - About 1 hr to fix

                    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/browser/static/dbwipes/js/summary/scorpionview.js - About 1 hr to fix

                      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

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

                              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
                                    Severity
                                    Category
                                    Status
                                    Source
                                    Language