Showing 283 of 1,132 total issues
Function initComplete
has 37 lines of code (exceeds 25 allowed). Consider refactoring. Open
"initComplete": function(settings, json) {
filterBar = FilterBar(jqueryObject.parent().parent().parent(), columnDefs, datatable);
aggregator = Aggregator(jqueryObject.parent().parent().parent(), columnDefs, repo, table);
datatable.forEachRowInColumn = function(colName, func) {
Function initComplete
has 37 lines of code (exceeds 25 allowed). Consider refactoring. Open
"initComplete": function(settings, json) {
filterBar = FilterBar(jqueryObject.parent().parent().parent(), columnDefs, datatable);
aggregator = Aggregator(jqueryObject.parent().parent().parent(), columnDefs, repo, table);
datatable.forEachRowInColumn = function(colName, func) {
Function test_apply_row_level_security_base
has 37 lines of code (exceeds 25 allowed). Consider refactoring. Open
def test_apply_row_level_security_base(self):
mock_find_table_policies = self.create_patch(
'core.db.query_rewriter.SQLQueryRewriter.find_table_policies')
mock_find_table_policies.return_value = ["tester='Alice'"]
Function 7
has a Cognitive Complexity of 12 (exceeds 5 allowed). Consider refactoring. Open
},{}],7:[function(require,module,exports){
// hbsfy compiled Handlebars template
var HandlebarsCompiler = require('hbsfy/runtime');
module.exports = HandlebarsCompiler.template({"1":function(depth0,helpers,partials,data) {
var helper;
- 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 __call__
has a Cognitive Complexity of 12 (exceeds 5 allowed). Consider refactoring. Open
def __call__(self, fn):
def wrapped(this):
now = time.time()
last_updated = None
cached_value = None
- 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 3
has 35 lines of code (exceeds 25 allowed). Consider refactoring. Open
},{"./api.js":3,"./postgres-types.js":5,"./templates/aggregate-col-list-item.hbs":7,"./templates/grouped-aggregate-dropdown.hbs":11}],3:[function(require,module,exports){
/**
* This file contains the code for interacting with the API
* for server side processing of datatables.
*/
Function parse
has 35 lines of code (exceeds 25 allowed). Consider refactoring. Open
parse: function(resp) {
var data = resp.data;
var type = data.type,
stats = data.stats,
_this = this;
Function parse
has 35 lines of code (exceeds 25 allowed). Consider refactoring. Open
parse: function(resp) {
var data = resp.data;
var type = data.type,
stats = data.stats,
_this = this;
Function render
has 34 lines of code (exceeds 25 allowed). Consider refactoring. Open
render: function() {
if (!this.model.isValid()) {
this.$svg.hide();
return this;
}
Function onSubmit
has 34 lines of code (exceeds 25 allowed). Consider refactoring. Open
onSubmit: function() {
if (!this.model.isValid()) {
this.$("#errmsg").html(this.model.validationError);
return false;
}
Function render
has 34 lines of code (exceeds 25 allowed). Consider refactoring. Open
render: function() {
if (!this.model.isValid()) {
this.$svg.hide();
return this;
}
Function onSubmit
has 34 lines of code (exceeds 25 allowed). Consider refactoring. Open
onSubmit: function() {
if (!this.model.isValid()) {
this.$("#errmsg").html(this.model.validationError);
return false;
}
Method main
has 33 lines of code (exceeds 25 allowed). Consider refactoring. Open
public static void main(String [] args) {
try {
// This will initially thrown an exception since
// You will need to register an application and assign
// the variables below.
Function 13
has 32 lines of code (exceeds 25 allowed). Consider refactoring. Open
},{"hbsfy/runtime":20}],13:[function(require,module,exports){
(function (global){
"use strict";
/*globals Handlebars: true */
var base = require("./handlebars/base");
Function setupButtons
has 32 lines of code (exceeds 25 allowed). Consider refactoring. Open
var setupButtons = function(q, qv) {
$("[data-toggle=tooltip]").tooltip();
var st_on_text = "Visualization shows what data matching your filter" ,
st_off_text = "Visualization removes data matching your filter";
Function setupButtons
has 32 lines of code (exceeds 25 allowed). Consider refactoring. Open
var setupButtons = function(q, qv) {
$("[data-toggle=tooltip]").tooltip();
var st_on_text = "Visualization shows what data matching your filter" ,
st_off_text = "Visualization removes data matching your filter";
Function 13
has a Cognitive Complexity of 11 (exceeds 5 allowed). Consider refactoring. Open
},{"hbsfy/runtime":20}],13:[function(require,module,exports){
(function (global){
"use strict";
/*globals Handlebars: true */
var base = require("./handlebars/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 position
has 31 lines of code (exceeds 25 allowed). Consider refactoring. Open
position: function(_arg) {
var left, result, shift, shiftLeft, shiftTop, top, _ref;
top = _arg.top, left = _arg.left;
if (!this.options.shift) {
return;
Function position
has 31 lines of code (exceeds 25 allowed). Consider refactoring. Open
position: function(_arg) {
var left, result, shift, shiftLeft, shiftTop, top, _ref;
top = _arg.top, left = _arg.left;
if (!this.options.shift) {
return;
Function test_connect_to_new_user
has 31 lines of code (exceeds 25 allowed). Consider refactoring. Open
def test_connect_to_new_user(self):
# names
users = ['delete_me_one', 'delete_me_two', 'i_dont_exist']
repo_shared = 'one_two'
repo_user1_only = 'one'