Showing 246 of 804 total issues
Function create
has 57 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
create: function() {
var
html = module.get.html(),
title = module.get.title(),
content = module.get.content()
Function item
has 57 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
item: function(value, strict) {
var
$selectedItem = false,
shouldSearch,
isMultiple
Function category
has 56 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
category: function(response, fields) {
var
html = '',
escape = $.fn.search.settings.templates.escape
;
Function show
has 55 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
show: function(callback) {
callback = $.isFunction(callback)
? callback
: function(){}
;
Function invoke
has 54 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
invoke: function(query, passedArguments, context) {
var
object = instance,
maxDepth,
found,
Function nextPosition
has 53 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
nextPosition: function(position) {
var
positions = position.split(' '),
verticalPosition = positions[0],
horizontalPosition = positions[1],
Function value
has 53 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
value: function(value, text, $selected) {
var
escapedValue = module.escape.value(value),
hasInput = ($input.length > 0),
currentValue = module.get.values(),
Function positions
has 53 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
positions: function() {
var
scrollContext = {
height : $scroll.height()
},
Function parser
has a Cognitive Complexity of 16 (exceeds 5 allowed). Consider refactoring. Open
Open
function parser(file, callback) {
// file exit conditions
if(file.isNull()) {
return callback(null, file); // pass along
}
- 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 invoke
has 52 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
invoke: function(query, passedArguments, context) {
var
object = instance,
maxDepth,
found,
Function invoke
has 52 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
invoke: function(query, passedArguments, context) {
var
object = instance,
maxDepth,
found,
Function values
has 52 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
values: function (fields) {
if($.isEmptyObject(fields)) {
return;
}
$.each(fields, function(key, value) {
Function invoke
has 52 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
invoke: function(query, passedArguments, context) {
var
object = instance,
maxDepth,
found,
Function invoke
has 52 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
invoke: function(query, passedArguments, context) {
var
object = instance,
maxDepth,
found,
Function invoke
has 52 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
invoke: function(query, passedArguments, context) {
var
object = instance,
maxDepth,
found,
Function invoke
has 52 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
invoke: function(query, passedArguments, context) {
var
object = instance,
maxDepth,
found,
Function invoke
has 52 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
invoke: function(query, passedArguments, context) {
var
object = instance,
maxDepth,
found,
Function invoke
has 52 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
invoke: function(query, passedArguments, context) {
var
object = instance,
maxDepth,
found,
Function invoke
has 52 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
invoke: function(query, passedArguments, context) {
var
object = instance,
maxDepth,
found,
Function invoke
has 52 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
invoke: function(query, passedArguments, context) {
var
object = instance,
maxDepth,
found,