Showing 246 of 804 total issues
Function display
has 26 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
display: function() {
var
title = settings.name + ':',
totalTime = 0
;
Function display
has 26 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
display: function() {
var
title = settings.name + ':',
totalTime = 0
;
Function display
has 26 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
display: function() {
var
title = settings.name + ':',
totalTime = 0
;
Function display
has 26 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
display: function() {
var
title = settings.name + ':',
totalTime = 0
;
Function display
has 26 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
display: function() {
var
title = settings.name + ':',
totalTime = 0
;
Function labels
has 26 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
labels: function($labels) {
$labels = $labels || $module.find(selector.label);
module.verbose('Removing labels', $labels);
$labels
.each(function(){
Function display
has 26 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
display: function() {
var
title = settings.name + ':',
totalTime = 0
;
Function display
has 26 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
display: function() {
var
title = settings.name + ':',
totalTime = 0
;
Function display
has 26 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
display: function() {
var
title = settings.name + ':',
totalTime = 0
;
Function containerSize
has 26 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
containerSize: function() {
var
tagName = $container.get(0).tagName
;
if(tagName === 'HTML' || tagName == 'body') {
Function display
has 26 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
display: function() {
var
title = settings.name + ':',
totalTime = 0
;
Function errorHandler
has 26 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
errorHandler: function(error) {
var
regExp = {
variable : /@(\S.*?)\s/,
theme : /themes[\/\\]+(.*?)[\/\\].*/,
Function api
has 26 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
api: function(searchTerm, callback) {
var
apiSettings = {
debug : settings.debug,
on : false,
Function behind
has 26 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
behind: function() {
var
height = {
active : $activeSide.outerWidth(true),
next : $nextSide.outerWidth(true)
Function createJSON
has a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring. Open
Open
createJSON: function(answers) {
var
json = {
paths: {
source: {},
- 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 errorHandler
has a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring. Open
Open
errorHandler: function(error) {
var
regExp = {
variable : /@(\S.*?)\s/,
theme : /themes[\/\\]+(.*?)[\/\\].*/,
- 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
Avoid deeply nested control flow statements. Open
Open
if(settings.selectOnKeydown && module.is.single()) {
module.set.selectedItem($nextItem);
}
Avoid deeply nested control flow statements. Open
Open
if(isSubMenuItem) {
module.verbose('Left key pressed, closing sub-menu');
module.animate.hide(false, $parentMenu);
$selectedItem
.removeClass(className.selected)
Avoid deeply nested control flow statements. Open
Open
if(hasSubMenu) {
module.verbose('Right key pressed, opening sub-menu');
module.animate.show(false, $subMenu);
$selectedItem
.removeClass(className.selected)
Avoid deeply nested control flow statements. Open
Open
if(isLastLabel) {
if(isSearch) {
if(!isFocusedOnSearch) {
module.focusSearch();
}