datahuborg/datahub

View on GitHub

Showing 283 of 1,132 total issues

File tether.js has 1363 lines of code (exceeds 250 allowed). Consider refactoring.
Open

/*! tether 0.6.5 */


(function(root, factory) {
  if (typeof define === 'function' && define.amd) {
Severity: Major
Found in src/browser/static/dbwipes/js/lib/tether.js - About 3 days to fix

    File tether.js has 1363 lines of code (exceeds 250 allowed). Consider refactoring.
    Open

    /*! tether 0.6.5 */
    
    
    (function(root, factory) {
      if (typeof define === 'function' && define.amd) {
    Severity: Major
    Found in src/apps/dbwipes/static/js/lib/tether.js - About 3 days to fix

      File manager.py has 1019 lines of code (exceeds 250 allowed). Consider refactoring.
      Open

      import six
      import hashlib
      import os
      import errno
      import re
      Severity: Major
      Found in src/core/db/manager.py - About 2 days to fix

        File views.py has 1015 lines of code (exceeds 250 allowed). Consider refactoring.
        Open

        import json
        import urllib
        import uuid
        import hashlib
        
        
        Severity: Major
        Found in src/browser/views.py - About 2 days to fix

          File dataTables.extra.js has 975 lines of code (exceeds 250 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){
          var api = require("./api.js");
          var FilterBar = require("./filter-bar.js");
          var Aggregator = require("./aggregator.js");
          var table_header_template = require("./templates/table_header.hbs");
          Severity: Major
          Found in src/browser/static/datatables/js/dataTables.extra.js - About 2 days to fix

            File pg.py has 951 lines of code (exceeds 250 allowed). Consider refactoring.
            Open

            import re
            import os
            import errno
            import shutil
            import hashlib
            Severity: Major
            Found in src/core/db/backend/pg.py - About 2 days to fix

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

              },{}],16:[function(require,module,exports){
              "use strict";
              var Utils = require("./utils");
              var Exception = require("./exception")["default"];
              var COMPILER_REVISION = require("./base").COMPILER_REVISION;
              Severity: Minor
              Found in src/browser/static/datatables/js/dataTables.extra.js - About 2 days 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

              File test_connector_pg.py has 876 lines of code (exceeds 250 allowed). Consider refactoring.
              Open

              from mock import Mock, \
                               MagicMock, \
                               patch, \
                               mock_open
              import itertools
              Severity: Major
              Found in src/core/test/test_connector_pg.py - About 2 days to fix

                File views.py has 769 lines of code (exceeds 250 allowed). Consider refactoring.
                Open

                import ast
                import json
                
                from django.http import HttpResponseRedirect
                from django.core.urlresolvers import reverse
                Severity: Major
                Found in src/api/views.py - About 1 day to fix

                  PGBackend has 71 functions (exceeds 20 allowed). Consider refactoring.
                  Open

                  class PGBackend:
                  
                      def __init__(self, user, password, host=HOST, port=PORT, repo_base=None):
                          self.user = user
                          self.password = password
                  Severity: Major
                  Found in src/core/db/backend/pg.py - About 1 day to fix

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

                        position: function(_arg) {
                          var addClasses, allClasses, attachment, bounds, changeAttachX, changeAttachY, cls, constraint, eAttachment, height, left, oob, oobClass, p, pin, pinned, pinnedClass, removeClass, side, tAttachment, targetAttachment, targetHeight, targetSize, targetWidth, to, top, width, _i, _j, _k, _l, _len, _len1, _len2, _len3, _len4, _len5, _m, _n, _ref1, _ref2, _ref3, _ref4, _ref5, _ref6, _ref7, _ref8,
                            _this = this;
                          top = _arg.top, left = _arg.left, targetAttachment = _arg.targetAttachment;
                          if (!this.options.constraints) {
                    Severity: Major
                    Found in src/browser/static/dbwipes/js/lib/tether.js - About 1 day to fix

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

                          position: function(_arg) {
                            var addClasses, allClasses, attachment, bounds, changeAttachX, changeAttachY, cls, constraint, eAttachment, height, left, oob, oobClass, p, pin, pinned, pinnedClass, removeClass, side, tAttachment, targetAttachment, targetHeight, targetSize, targetWidth, to, top, width, _i, _j, _k, _l, _len, _len1, _len2, _len3, _len4, _len5, _m, _n, _ref1, _ref2, _ref3, _ref4, _ref5, _ref6, _ref7, _ref8,
                              _this = this;
                            top = _arg.top, left = _arg.left, targetAttachment = _arg.targetAttachment;
                            if (!this.options.constraints) {
                      Severity: Major
                      Found in src/apps/dbwipes/static/js/lib/tether.js - About 1 day to fix

                        DataHubManager has 69 functions (exceeds 20 allowed). Consider refactoring.
                        Open

                        class DataHubManager:
                        
                            def __init__(self, user=settings.ANONYMOUS_ROLE, repo_base=None,
                                         is_app=False):
                        
                        
                        Severity: Major
                        Found in src/core/db/manager.py - About 1 day to fix

                          DataHubConnection has 66 functions (exceeds 20 allowed). Consider refactoring.
                          Open

                          class DataHubConnection:
                          
                              def __init__(self, user, password, repo_base=None):
                                  self.backend = PGBackend(user, password, repo_base=repo_base)
                          
                          
                          Severity: Major
                          Found in src/core/db/connection.py - About 1 day to fix

                            File queryview.js has 509 lines of code (exceeds 250 allowed). Consider refactoring.
                            Open

                            define(function(require) {
                              var Backbone = require('backbone'),
                                  Handlebars = require('handlebars'),
                                  $ = require('jquery'),
                                  d3 = require('d3'),
                            Severity: Major
                            Found in src/apps/dbwipes/static/js/summary/queryview.js - About 1 day to fix

                              File queryview.js has 509 lines of code (exceeds 250 allowed). Consider refactoring.
                              Open

                              define(function(require) {
                                var Backbone = require('backbone'),
                                    Handlebars = require('handlebars'),
                                    $ = require('jquery'),
                                    d3 = require('d3'),
                              Severity: Major
                              Found in src/browser/static/dbwipes/js/summary/queryview.js - About 1 day to fix

                                File cstatview.js has 502 lines of code (exceeds 250 allowed). Consider refactoring.
                                Open

                                // CSTatView
                                define(function(require) {
                                  var Handlebars = require('handlebars'),
                                      Backbone = require('backbone'),
                                      d3 = require('d3'),
                                Severity: Major
                                Found in src/apps/dbwipes/static/js/summary/cstatview.js - About 1 day to fix

                                  File cstatview.js has 502 lines of code (exceeds 250 allowed). Consider refactoring.
                                  Open

                                  // CSTatView
                                  define(function(require) {
                                    var Handlebars = require('handlebars'),
                                        Backbone = require('backbone'),
                                        d3 = require('d3'),
                                  Severity: Major
                                  Found in src/browser/static/dbwipes/js/summary/cstatview.js - About 1 day to fix

                                    Function 14 has 195 lines of code (exceeds 25 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: Major
                                    Found in src/browser/static/datatables/js/dataTables.extra.js - About 7 hrs to fix

                                      File shepherd.js has 476 lines of code (exceeds 250 allowed). Consider refactoring.
                                      Open

                                      (function() {
                                        var ATTACHMENT, Evented, Shepherd, Step, Tour, addClass, createFromHTML, extend, getBounds, hasClass, matchesSelector, parseShorthand, removeClass, uniqueId, _ref,
                                          __bind = function(fn, me){ return function(){ return fn.apply(me, arguments); }; },
                                          __hasProp = {}.hasOwnProperty,
                                          __extends = function(child, parent) { for (var key in parent) { if (__hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; };
                                      Severity: Minor
                                      Found in src/apps/dbwipes/static/js/lib/shepherd.js - About 7 hrs to fix
                                        Severity
                                        Category
                                        Status
                                        Source
                                        Language