Showing 845 of 1,621 total issues
Function _fnFeatureHtmlTable
has 113 lines of code (exceeds 25 allowed). Consider refactoring. Open
function _fnFeatureHtmlTable ( oSettings )
{
/* Check if scrolling is enabled or not - if not then leave the DOM unaltered */
if ( oSettings.oScroll.sX === "" && oSettings.oScroll.sY === "" )
{
Function _parseAndSetRecurrencePattern
has 112 lines of code (exceeds 25 allowed). Consider refactoring. Open
_parseAndSetRecurrencePattern: function( recurrencePattern, startTime ) {
var recur = {};
var i = 0;
var item = '';
var commaPatternSplit;
Function _fnAddOptionsHtml
has 111 lines of code (exceeds 25 allowed). Consider refactoring. Open
function _fnAddOptionsHtml ( oSettings )
{
/*
* Create a temporary, empty, div which we can later on replace with what we have generated
* we do it this way to rendering the 'options' html offline - speed :-)
Function server_status
has a Cognitive Complexity of 30 (exceeds 5 allowed). Consider refactoring. Open
def server_status(context, request):
# Delete a non existent server?
server_name = request.GET.get('delete', None)
if server_name:
request.db.servers.delete_one({"name": server_name})
- 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 _nested_lookup
has a Cognitive Complexity of 30 (exceeds 5 allowed). Consider refactoring. Open
def _nested_lookup(key, document):
"""Lookup a key in a nested document, yield a value"""
from six import iteritems
if isinstance(document, list):
- 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 renderMonth
has 109 lines of code (exceeds 25 allowed). Consider refactoring. Open
renderMonth: function( date ) {
date = date || new Date();
var firstDay = new Date( date.getFullYear(), date.getMonth(), 1 ).getDay();
var lastDate = new Date( date.getFullYear(), date.getMonth() + 1, 0 ).getDate();
Function Behaviors
has 109 lines of code (exceeds 25 allowed). Consider refactoring. Open
Marionette.Behaviors = (function(Marionette, _) {
function Behaviors(view) {
this.behaviors = Behaviors.parseBehaviors(view, view.behaviors);
BasicTests
has 34 functions (exceeds 20 allowed). Consider refactoring. Open
class BasicTests(BaseGecosTestCase):
def test_01_home(self):
'''
Test 1: Check the home works
Function Repeater
has 107 lines of code (exceeds 25 allowed). Consider refactoring. Open
var Repeater = function Repeater( element, options ) {
var self = this;
var $btn;
var currentView;
Function has_changed_user_policy
has a Cognitive Complexity of 28 (exceeds 5 allowed). Consider refactoring. Open
def has_changed_user_policy(self, node, obj_ui, objold_ui, field_chef, priority_obj):
'''
This method checks whether the "field_chef" policy field changed for the current object.
Args:
- 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 convert
has a Cognitive Complexity of 28 (exceeds 5 allowed). Consider refactoring. Open
def convert(self, xmlgpo):
if self.policy is None:
return None
result = [{
- 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 getValue
has 101 lines of code (exceeds 25 allowed). Consider refactoring. Open
getValue: function getValue() {
// FREQ = frequency (secondly, minutely, hourly, daily, weekdays, weekly, monthly, yearly)
// BYDAY = when picking days (MO,TU,WE,etc)
// BYMONTH = when picking months (Jan,Feb,March) - note the values should be 1,2,3...
// BYMONTHDAY = when picking days of the month (1,2,3...)
Function _fnSortingClasses
has 100 lines of code (exceeds 25 allowed). Consider refactoring. Open
function _fnSortingClasses( oSettings )
{
var i, iLen, j, jLen, iFound;
var aaSort, sClass;
var iColumns = oSettings.aoColumns.length;
AdvancedTests
has 32 functions (exceeds 20 allowed). Consider refactoring. Open
class AdvancedTests(BaseGecosTestCase):
@mock.patch('gecoscc.forms.create_chef_admin_user')
@mock.patch('gecoscc.forms._')
@mock.patch('gecoscc.utils.isinstance')
Function onInsert
has 98 lines of code (exceeds 25 allowed). Consider refactoring. Open
'onInsert': function (evt, node) {
var $nodeid = $(node.el).find('#' + escapeSelector(node.id));
var boundaries = node.getArrayBoundaries();
node.resetDeleteEvents();
Function server_log
has a Cognitive Complexity of 27 (exceeds 5 allowed). Consider refactoring. Open
def server_log(context, request):
# Get the name of the server
server_name = request.GET.get('server', None)
if server_name is None:
logger.error("server_log: server name is mandatory")
- 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 command
has a Cognitive Complexity of 27 (exceeds 5 allowed). Consider refactoring. Open
def command(self):
db = self.pyramid.db
ou = db.nodes.find_one({'_id': ObjectId(self.options.ou_id)})
if not ou:
print('Error OU does not exists')
- 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 test_03_admins
has 96 lines of code (exceeds 25 allowed). Consider refactoring. Open
def test_03_admins(self, adminuservariablesmodel,
permissionsmodel, adminusermodel, gettext,
gettext_forms, gettext_models, gettext_i18n,
get_chef_api_method, get_chef_api_models_method):
'''
Function Wreqr
has a Cognitive Complexity of 26 (exceeds 5 allowed). Consider refactoring. Open
Backbone.Wreqr = (function(Backbone, Marionette, _){
"use strict";
var Wreqr = {};
// Handlers
- 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 init
has 93 lines of code (exceeds 25 allowed). Consider refactoring. Open
function init (converter) {
function api (key, value, attributes) {
var result;
if (typeof document === 'undefined') {
return;