Showing 28 of 46 total issues
Function 9
has 39 lines of code (exceeds 25 allowed). Consider refactoring. Open
},{}],9:[function(require,module,exports){
var toggleFieldMask = require('./toggle-field-mask');
var select = require('../utils/select');
/**
Function 16
has 34 lines of code (exceeds 25 allowed). Consider refactoring. Open
},{"../components/header/mobile":6,"../components/header/search":7,"../utils/when-dom-ready":25}],16:[function(require,module,exports){
var verifyjQuery = require('../utils/verify-jquery');
// jQuery Plugin
Function 5
has a Cognitive Complexity of 11 (exceeds 5 allowed). Consider refactoring. Open
},{"../utils/add-class":20,"../utils/dispatch":21,"../utils/remove-class":22,"../utils/select":23}],5:[function(require,module,exports){
var select = require('../utils/select');
var addClass = require('../utils/add-class');
var removeClass = require('../utils/remove-class');
var dispatch = require('../utils/dispatch');
- 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 6
has 28 lines of code (exceeds 25 allowed). Consider refactoring. Open
},{"../utils/add-class":20,"../utils/dispatch":21,"../utils/remove-class":22,"../utils/select":23}],6:[function(require,module,exports){
var select = require('../../utils/select');
var addClass = require('../../utils/add-class');
var removeClass = require('../../utils/remove-class');
var dispatch = require('../../utils/dispatch');
Function _divideIntoArray
has 26 lines of code (exceeds 25 allowed). Consider refactoring. Open
Politespace.prototype._divideIntoArray = function( value ) {
var split = ( '' + this.groupLength ).split( ',' ),
isUniformSplit = split.length === 1,
dividedValue = [],
loopIndex = 0,
Function 7
has a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring. Open
},{"../../utils/add-class":20,"../../utils/dispatch":21,"../../utils/remove-class":22,"../../utils/select":23}],7:[function(require,module,exports){
var select = require('../../utils/select');
var addClass = require('../../utils/add-class');
var removeClass = require('../../utils/remove-class');
var dispatch = require('../../utils/dispatch');
- 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 submit
has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring. Open
def submit(request, id=None,
template_name='specialuseform/submit.html'):
if id:
permit = get_object_or_404(NonCommercialUsePermit, id=id)
submit_button_text = 'Save Changes'
- 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 23
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
},{}],23:[function(require,module,exports){
/**
* @name select
* @desc selects elements from the DOM by class selector or ID selector.
* @param {string} selector - The selector to traverse the DOM with.
- 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"