Showing 283 of 1,132 total issues
Function app_allow_access
has a Cognitive Complexity of 15 (exceeds 5 allowed). Consider refactoring. Open
def app_allow_access(request, app_id, repo_name):
username = request.user.get_username()
try:
app = None
try:
- 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 find_and_insert
has 47 lines of code (exceeds 25 allowed). Consider refactoring. Open
function find_and_insert(path, x, y) {
var prev = null;
var insertidx = null;
var dir = (path.length == 1)? null : ((path[0][0] < path[path.length-1][0])? 'inc' : 'dec');
for (var idx = 0; idx < path.length; idx++) {
Function find_and_insert
has 47 lines of code (exceeds 25 allowed). Consider refactoring. Open
function find_and_insert(path, x, y) {
var prev = null;
var insertidx = null;
var dir = (path.length == 1)? null : ((path[0][0] < path[path.length-1][0])? 'inc' : 'dec');
for (var idx = 0; idx < path.length; idx++) {
Function show
has 45 lines of code (exceeds 25 allowed). Consider refactoring. Open
Step.prototype.show = function() {
var _this = this;
if (this.el == null) {
this.render();
if (this.options.style) {
Function show
has 45 lines of code (exceeds 25 allowed). Consider refactoring. Open
Step.prototype.show = function() {
var _this = this;
if (this.el == null) {
this.render();
if (this.options.style) {
Function onSubmit
has 45 lines of code (exceeds 25 allowed). Consider refactoring. Open
onSubmit: function() {
var db = this.$('input[name=q-db]').val(),
table = this.$('input[name=q-table]').val(),
xexpr = this.$('input[name=q-x-expr]').val(),
xcol = this.$('input[name=q-x-col]').val(),
Function onSubmit
has 45 lines of code (exceeds 25 allowed). Consider refactoring. Open
onSubmit: function() {
var db = this.$('input[name=q-db]').val(),
table = this.$('input[name=q-table]').val(),
xexpr = this.$('input[name=q-x-expr]').val(),
xcol = this.$('input[name=q-x-col]').val(),
Function display_query
has 44 lines of code (exceeds 25 allowed). Consider refactoring. Open
var display_query = function() {
/**********************************/
/*** 1: Selected Tables/Columns ***/
/**********************************/
Function 8
has a Cognitive Complexity of 14 (exceeds 5 allowed). Consider refactoring. Open
},{"hbsfy/runtime":20}],8:[function(require,module,exports){
// hbsfy compiled Handlebars template
var HandlebarsCompiler = require('hbsfy/runtime');
module.exports = HandlebarsCompiler.template({"compiler":[6,">= 2.0.0-beta.1"],"main":function(depth0,helpers,partials,data) {
var helper, alias1=helpers.helperMissing, alias2="function", alias3=this.escapeExpression;
- 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 apply_row_level_security_update
has a Cognitive Complexity of 14 (exceeds 5 allowed). Consider refactoring. Open
def apply_row_level_security_update(self, query):
'''
Takes in an update SQL query and applies security policies related to
the update access type to it.
'''
- 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 apply_row_level_security_insert
has a Cognitive Complexity of 14 (exceeds 5 allowed). Consider refactoring. Open
def apply_row_level_security_insert(self, query):
'''
Takes in an insert SQL query and applies security policies related to
the insert access type to it. Currently, we only support one type
of insert permission -- which is that the user making the insert call
- 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 updateAttachClasses
has 42 lines of code (exceeds 25 allowed). Consider refactoring. Open
_Tether.prototype.updateAttachClasses = function(elementAttach, targetAttach) {
var add, all, side, sides, _i, _j, _len, _len1, _ref1,
_this = this;
if (elementAttach == null) {
elementAttach = this.attachment;
Function updateAttachClasses
has 42 lines of code (exceeds 25 allowed). Consider refactoring. Open
_Tether.prototype.updateAttachClasses = function(elementAttach, targetAttach) {
var add, all, side, sides, _i, _j, _len, _len1, _ref1,
_this = this;
if (elementAttach == null) {
elementAttach = this.attachment;
Function renderAxes
has 42 lines of code (exceeds 25 allowed). Consider refactoring. Open
renderAxes: function(el) {
if(el.select('.xaxis').size() == 0) {
var xel = el.append('g')
.attr('class', 'axis x xaxis')
.attr('transform', "translate(0,"+this.state.h+")");
Function renderAxes
has 42 lines of code (exceeds 25 allowed). Consider refactoring. Open
renderAxes: function(el) {
if(el.select('.xaxis').size() == 0) {
var xel = el.append('g')
.attr('class', 'axis x xaxis')
.attr('transform', "translate(0,"+this.state.h+")");
Function renderData
has 41 lines of code (exceeds 25 allowed). Consider refactoring. Open
renderData: function(el, data, xalias, yalias) {
var _this = this,
h = this.state.h,
w = this.state.w;
var data = _.map(data, function(d) {
Function renderData
has 41 lines of code (exceeds 25 allowed). Consider refactoring. Open
renderData: function(el, data, xalias, yalias) {
var _this = this,
h = this.state.h,
w = this.state.w;
var data = _.map(data, function(d) {
Function index
has a Cognitive Complexity of 13 (exceeds 5 allowed). Consider refactoring. Open
def index(request, repo_base, repo, table):
""" Main page for dbWipes """
username = request.user.get_username()
cache_exists = does_cache_exist(repo_base)
- 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 getXDomain
has 39 lines of code (exceeds 25 allowed). Consider refactoring. Open
function getXDomain(points, type, getx) {
var xdomain = null;
if (isStr(type)) {
xdomain = {};
Function getXDomain
has 39 lines of code (exceeds 25 allowed). Consider refactoring. Open
function getXDomain(points, type, getx) {
var xdomain = null;
if (isStr(type)) {
xdomain = {};