Showing 10 of 12 total issues
Function Redmon
has 460 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
var Redmon = (function() {
var config
, events = $({});
/**
Function Redmon
has a Cognitive Complexity of 51 (exceeds 5 allowed). Consider refactoring. Open
Open
var Redmon = (function() {
var config
, events = $({});
/**
- 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 redmon.js
has 462 lines of code (exceeds 250 allowed). Consider refactoring. Open
Open
var Redmon = (function() {
var config
, events = $({});
/**
Function cli
has 148 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
var cli = (function() {
var terminal;
function init() {
var prompt = [
Function keyspaceWidget
has 62 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
var keyspaceWidget = (function() {
var chart
, dataset = {
hits: {key: 'Hits' , values: []},
misses: {key: 'Misses' , values: []},
Function toolbar
has 49 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
var toolbar = (function() {
var mapping = {}
, current = {};
function init() {
Function memoryWidget
has 43 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
var memoryWidget = (function() {
var chart
, dataset = [];
function render(data) {
Function configWidget
has 31 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
var configWidget = (function() {
var selects = {
'appendonly' : 'yes,no',
'no-appendfsync-on-rewrite' : 'yes,no',
'slave-serve-stale-data' : 'yes,no',
Function infoWidget
has 27 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
var infoWidget = (function() {
function render(data) {
if (data && data.length)
updateTable(data[data.length-1]);
}
Avoid too many return
statements within this function. Open
Open
else { return y }