Showing 283 of 1,132 total issues
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; };
Function 16
has 182 lines of code (exceeds 25 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;
File test_manager.py
has 468 lines of code (exceeds 250 allowed). Consider refactoring. Open
from core.db.manager import DataHubManager
from core.db.errors import PermissionDenied
from psycopg2 import InternalError, ProgrammingError
from contextlib import contextmanager
SchemaListCreateDeleteShare
has 46 functions (exceeds 20 allowed). Consider refactoring. Open
class SchemaListCreateDeleteShare(MockingMixin, TestCase):
"""
Tests that items reach the execute_sql method in pg.py.
Does not test execute_sql itself.
Function setupBasic
has 145 lines of code (exceeds 25 allowed). Consider refactoring. Open
var setupBasic = function() {
var q = new Query();
var qv = new QueryView({ model: q })
$("#right").prepend(qv.render().$el);
Function setupBasic
has 145 lines of code (exceeds 25 allowed). Consider refactoring. Open
var setupBasic = function() {
var q = new Query();
var qv = new QueryView({ model: q })
$("#right").prepend(qv.render().$el);
Function where_clause
has a Cognitive Complexity of 38 (exceeds 5 allowed). Consider refactoring. Open
def where_clause(self):
# Figure out the types of the columns so we'll know whether to use
# numeric operations or string operations.
schema = self.manager.get_schema(self.repo, self.table)
type_for_col = {}
- 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 serializer.py
has 383 lines of code (exceeds 250 allowed). Consider refactoring. Open
from rest_framework import serializers
from django.contrib.auth.models import User
from django.core.urlresolvers import reverse
Function 4
has 129 lines of code (exceeds 25 allowed). Consider refactoring. Open
},{}],4:[function(require,module,exports){
var filter_buttons_template = require("./templates/filter_buttons.hbs");
var filter_template = require("./templates/filter.hbs");
var delete_button_col = require("./templates/delete-button-col.hbs");
Function apply_row_level_security_base
has a Cognitive Complexity of 34 (exceeds 5 allowed). Consider refactoring. Open
def apply_row_level_security_base(self, query):
'''
Takes in a SQL query and applies row level security to it. All table
references in the query are replaced with a subquery that only extracts
rows from the table for which the user is allowed to see.
- 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
Function position
has 126 lines of code (exceeds 25 allowed). Consider refactoring. Open
_Tether.prototype.position = function(flushChanges) {
var elementPos, elementStyle, height, left, manualOffset, manualTargetOffset, module, next, offset, offsetBorder, offsetParent, offsetParentSize, offsetParentStyle, offsetPosition, ret, scrollLeft, scrollTop, scrollbarSize, side, targetAttachment, targetOffset, targetPos, targetSize, top, width, _i, _j, _len, _len1, _ref1, _ref2, _ref3, _ref4, _ref5, _ref6,
_this = this;
if (flushChanges == null) {
flushChanges = true;
Function position
has 126 lines of code (exceeds 25 allowed). Consider refactoring. Open
_Tether.prototype.position = function(flushChanges) {
var elementPos, elementStyle, height, left, manualOffset, manualTargetOffset, module, next, offset, offsetBorder, offsetParent, offsetParentSize, offsetParentStyle, offsetPosition, ret, scrollLeft, scrollTop, scrollbarSize, side, targetAttachment, targetOffset, targetPos, targetSize, top, width, _i, _j, _len, _len1, _ref1, _ref2, _ref3, _ref4, _ref5, _ref6,
_this = this;
if (flushChanges == null) {
flushChanges = true;
Function 18
has a Cognitive Complexity of 33 (exceeds 5 allowed). Consider refactoring. Open
},{}],18:[function(require,module,exports){
"use strict";
/*jshint -W004 */
var escape = {
"&": "&",
- 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
Function template
has 119 lines of code (exceeds 25 allowed). Consider refactoring. Open
function template(templateSpec, env) {
/* istanbul ignore next */
if (!env) {
throw new Exception("No environment passed to template");
}
Function registerDefaultHelpers
has 118 lines of code (exceeds 25 allowed). Consider refactoring. Open
function registerDefaultHelpers(instance) {
instance.registerHelper('helperMissing', function(/* [args, ]options */) {
if(arguments.length === 1) {
// A missing field in a {{foo}} constuct.
return undefined;
Function renderZoom
has 118 lines of code (exceeds 25 allowed). Consider refactoring. Open
renderZoom: function(el) {
var _this = this,
xscales = this.state.xscales,
xaxis = this.state.xaxis,
width = this.state.rectwidth,
Function renderZoom
has 118 lines of code (exceeds 25 allowed). Consider refactoring. Open
renderZoom: function(el) {
var _this = this,
xscales = this.state.xscales,
xaxis = this.state.xaxis,
width = this.state.rectwidth,
Function Query
has 115 lines of code (exceeds 25 allowed). Consider refactoring. Open
DataQ.Query = function() {
// Create the object and initialize the objects.
var that = {};
that._schema_for_table_name = {};
Function move
has 113 lines of code (exceeds 25 allowed). Consider refactoring. Open
_Tether.prototype.move = function(position) {
var css, elVal, found, key, moved, offsetParent, point, same, transcribe, type, val, write, writeCSS, _i, _len, _ref1, _ref2,
_this = this;
if (this.element.parentNode == null) {
return;
Function move
has 113 lines of code (exceeds 25 allowed). Consider refactoring. Open
_Tether.prototype.move = function(position) {
var css, elVal, found, key, moved, offsetParent, point, same, transcribe, type, val, write, writeCSS, _i, _len, _ref1, _ref2,
_this = this;
if (this.element.parentNode == null) {
return;