Showing 283 of 1,132 total issues
File tether.js
has 1363 lines of code (exceeds 250 allowed). Consider refactoring. Open
Open
/*! tether 0.6.5 */
(function(root, factory) {
if (typeof define === 'function' && define.amd) {
File tether.js
has 1363 lines of code (exceeds 250 allowed). Consider refactoring. Open
Open
/*! tether 0.6.5 */
(function(root, factory) {
if (typeof define === 'function' && define.amd) {
File manager.py
has 1019 lines of code (exceeds 250 allowed). Consider refactoring. Open
Open
import six
import hashlib
import os
import errno
import re
File views.py
has 1015 lines of code (exceeds 250 allowed). Consider refactoring. Open
Open
import json
import urllib
import uuid
import hashlib
File dataTables.extra.js
has 975 lines of code (exceeds 250 allowed). Consider refactoring. Open
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");
File pg.py
has 951 lines of code (exceeds 250 allowed). Consider refactoring. Open
Open
import re
import os
import errno
import shutil
import hashlib
Function 16
has a Cognitive Complexity of 111 (exceeds 5 allowed). Consider refactoring. Open
Open
},{}],16:[function(require,module,exports){
"use strict";
var Utils = require("./utils");
var Exception = require("./exception")["default"];
var COMPILER_REVISION = require("./base").COMPILER_REVISION;
- Read upRead up
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
Open
from mock import Mock, \
MagicMock, \
patch, \
mock_open
import itertools
File views.py
has 769 lines of code (exceeds 250 allowed). Consider refactoring. Open
Open
import ast
import json
from django.http import HttpResponseRedirect
from django.core.urlresolvers import reverse
PGBackend
has 71 functions (exceeds 20 allowed). Consider refactoring. Open
Open
class PGBackend:
def __init__(self, user, password, host=HOST, port=PORT, repo_base=None):
self.user = user
self.password = password
Function position
has 259 lines of code (exceeds 25 allowed). Consider refactoring. Open
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) {
Function position
has 259 lines of code (exceeds 25 allowed). Consider refactoring. Open
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) {
DataHubManager
has 69 functions (exceeds 20 allowed). Consider refactoring. Open
Open
class DataHubManager:
def __init__(self, user=settings.ANONYMOUS_ROLE, repo_base=None,
is_app=False):
DataHubConnection
has 66 functions (exceeds 20 allowed). Consider refactoring. Open
Open
class DataHubConnection:
def __init__(self, user, password, repo_base=None):
self.backend = PGBackend(user, password, repo_base=repo_base)
File queryview.js
has 509 lines of code (exceeds 250 allowed). Consider refactoring. Open
Open
define(function(require) {
var Backbone = require('backbone'),
Handlebars = require('handlebars'),
$ = require('jquery'),
d3 = require('d3'),
File queryview.js
has 509 lines of code (exceeds 250 allowed). Consider refactoring. Open
Open
define(function(require) {
var Backbone = require('backbone'),
Handlebars = require('handlebars'),
$ = require('jquery'),
d3 = require('d3'),
File cstatview.js
has 502 lines of code (exceeds 250 allowed). Consider refactoring. Open
Open
// CSTatView
define(function(require) {
var Handlebars = require('handlebars'),
Backbone = require('backbone'),
d3 = require('d3'),
File cstatview.js
has 502 lines of code (exceeds 250 allowed). Consider refactoring. Open
Open
// CSTatView
define(function(require) {
var Handlebars = require('handlebars'),
Backbone = require('backbone'),
d3 = require('d3'),
Function 14
has 195 lines of code (exceeds 25 allowed). Consider refactoring. Open
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"];
File shepherd.js
has 476 lines of code (exceeds 250 allowed). Consider refactoring. Open
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; };