datahuborg/datahub

View on GitHub

Showing 283 of 1,132 total issues

Function onResult has 54 lines of code (exceeds 25 allowed). Consider refactoring.
Open

    onResult: function(resp) {
      var _this = this;
      $(".scorpion-wait").hide();
      if (this.statusview) {
        this.statusview.state.running = false;
Severity: Major
Found in src/apps/dbwipes/static/js/summary/scorpionview.js - About 2 hrs to fix

    Function exports has 54 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

    module.exports = function(container, cd, dt) {
      var that = {};
    
      jqueryContainer = container;
      colDefs = cd;
    Severity: Major
    Found in src/apps/datatables/client/js/filter-bar.js - About 2 hrs to fix

      Function exports has 54 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

      module.exports = function(container, cd, dt) {
        var that = {};
      
        jqueryContainer = container;
        colDefs = cd;
      Severity: Major
      Found in src/browser/static/datatables/js/dataTables.extra.js - About 2 hrs to fix

        Function build_query has 54 lines of code (exceeds 25 allowed). Consider refactoring.
        Open

          window.DataQ.build_query = function(query) {
        
            // The list of columns to select.
            var select_list = [];
        
        
        Severity: Major
        Found in src/apps/dataq/client_src/js/dq-query-builder.js - About 2 hrs to fix

          Function onResult has 54 lines of code (exceeds 25 allowed). Consider refactoring.
          Open

              onResult: function(resp) {
                var _this = this;
                $(".scorpion-wait").hide();
                if (this.statusview) {
                  this.statusview.state.running = false;
          Severity: Major
          Found in src/browser/static/dbwipes/js/summary/scorpionview.js - About 2 hrs to fix

            File rlsmanager.py has 254 lines of code (exceeds 250 allowed). Consider refactoring.
            Open

            from collections import namedtuple
            
            from config import settings
            import os
            import core.db.connection
            Severity: Minor
            Found in src/core/db/rlsmanager.py - About 2 hrs to fix

              Function e has a Cognitive Complexity of 16 (exceeds 5 allowed). Consider refactoring.
              Open

              (function e(t,n,r){function s(o,u){if(!n[o]){if(!t[o]){var a=typeof require=="function"&&require;if(!u&&a)return a(o,!0);if(i)return i(o,!0);var f=new Error("Cannot find module '"+o+"'");throw f.code="MODULE_NOT_FOUND",f}var l=n[o]={exports:{}};t[o][0].call(l.exports,function(e){var n=t[o][1][e];return s(n?n:e)},l,l.exports,e,t,n,r)}return n[o].exports}var i=typeof require=="function"&&require;for(var o=0;o<r.length;o++)s(r[o]);return s})({1:[function(require,module,exports){
              Severity: Minor
              Found in src/browser/static/datatables/js/dataTables.extra.js - About 2 hrs 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 14 has a Cognitive Complexity of 16 (exceeds 5 allowed). Consider refactoring.
              Open

              },{"./handlebars/base":14,"./handlebars/exception":15,"./handlebars/runtime":16,"./handlebars/safe-string":17,"./handlebars/utils":18}],14:[function(require,module,exports){
              "use strict";
              var Utils = require("./utils");
              var Exception = require("./exception")["default"];
              
              
              Severity: Minor
              Found in src/browser/static/datatables/js/dataTables.extra.js - About 2 hrs 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 setOptions has 52 lines of code (exceeds 25 allowed). Consider refactoring.
              Open

                  _Tether.prototype.setOptions = function(options, position) {
                    var defaults, key, _i, _len, _ref1, _ref2;
                    this.options = options;
                    if (position == null) {
                      position = true;
              Severity: Major
              Found in src/browser/static/dbwipes/js/lib/tether.js - About 2 hrs to fix

                Function setOptions has 52 lines of code (exceeds 25 allowed). Consider refactoring.
                Open

                    _Tether.prototype.setOptions = function(options, position) {
                      var defaults, key, _i, _len, _ref1, _ref2;
                      this.options = options;
                      if (position == null) {
                        position = true;
                Severity: Major
                Found in src/apps/dbwipes/static/js/lib/tether.js - About 2 hrs to fix

                  Function renderBrush has 51 lines of code (exceeds 25 allowed). Consider refactoring.
                  Open

                      renderBrush: function(el) {
                        if (el.select('.brush').size() > 0) {
                          console.log(['qv.renderBrush', 'exists, skip']);
                          return;
                        }
                  Severity: Major
                  Found in src/apps/dbwipes/static/js/summary/queryview.js - About 2 hrs to fix

                    Function renderBrush has 51 lines of code (exceeds 25 allowed). Consider refactoring.
                    Open

                        renderBrush: function(el) {
                          if (el.select('.brush').size() > 0) {
                            console.log(['qv.renderBrush', 'exists, skip']);
                            return;
                          }
                    Severity: Major
                    Found in src/browser/static/dbwipes/js/summary/queryview.js - About 2 hrs to fix

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

                          Step.prototype.render = function() {
                            var button, buttons, cfg, content, footer, header, link, paragraph, paragraphs, text, _i, _j, _len, _len1, _ref1, _ref2, _ref3;
                            if (this.el != null) {
                              this.destroy();
                            }
                      Severity: Minor
                      Found in src/apps/dbwipes/static/js/lib/shepherd.js - About 2 hrs to fix

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

                            render: function() {
                              this.$el.html(this.template(this.model.toDataJSON()));
                              return this;
                              var q = this.model.get('query'),
                                  xcol = q.get('x').col,
                        Severity: Minor
                        Found in src/apps/dbwipes/static/js/summary/tupleview.js - About 2 hrs to fix

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

                              render: function() {
                                this.$el.html(this.template(this.model.toDataJSON()));
                                return this;
                                var q = this.model.get('query'),
                                    xcol = q.get('x').col,
                          Severity: Minor
                          Found in src/browser/static/dbwipes/js/summary/tupleview.js - About 2 hrs to fix

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

                                Step.prototype.render = function() {
                                  var button, buttons, cfg, content, footer, header, link, paragraph, paragraphs, text, _i, _j, _len, _len1, _ref1, _ref2, _ref3;
                                  if (this.el != null) {
                                    this.destroy();
                                  }
                            Severity: Minor
                            Found in src/browser/static/dbwipes/js/lib/shepherd.js - About 2 hrs to fix

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

                                  position: function(_arg) {
                                    var abutted, addClasses, allClasses, bottom, height, left, right, side, sides, targetPos, top, width, _i, _j, _k, _l, _len, _len1, _len2, _len3, _ref1, _ref2, _ref3, _ref4, _ref5,
                                      _this = this;
                                    top = _arg.top, left = _arg.left;
                                    _ref1 = this.cache('element-bounds', function() {
                              Severity: Minor
                              Found in src/apps/dbwipes/static/js/lib/tether.js - About 1 hr to fix

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

                                    position: function(_arg) {
                                      var abutted, addClasses, allClasses, bottom, height, left, right, side, sides, targetPos, top, width, _i, _j, _k, _l, _len, _len1, _len2, _len3, _ref1, _ref2, _ref3, _ref4, _ref5,
                                        _this = this;
                                      top = _arg.top, left = _arg.left;
                                      _ref1 = this.cache('element-bounds', function() {
                                Severity: Minor
                                Found in src/browser/static/dbwipes/js/lib/tether.js - About 1 hr to fix

                                  Function setSelection has 48 lines of code (exceeds 25 allowed). Consider refactoring.
                                  Open

                                      setSelection: function(clause) {
                                        function withinClause(clause, val) {
                                          if (clause == null) return false;
                                          if (util.isStr(clause.type)) {
                                            return _.contains(clause.vals, val);
                                  Severity: Minor
                                  Found in src/browser/static/dbwipes/js/summary/cstatview.js - About 1 hr to fix

                                    Function setSelection has 48 lines of code (exceeds 25 allowed). Consider refactoring.
                                    Open

                                        setSelection: function(clause) {
                                          function withinClause(clause, val) {
                                            if (clause == null) return false;
                                            if (util.isStr(clause.type)) {
                                              return _.contains(clause.vals, val);
                                    Severity: Minor
                                    Found in src/apps/dbwipes/static/js/summary/cstatview.js - About 1 hr to fix
                                      Severity
                                      Category
                                      Status
                                      Source
                                      Language