Showing 79 of 129 total issues
Avoid too many return
statements within this function. Open
return d;
Avoid too many return
statements within this function. Open
return d;
Avoid too many return
statements within this function. Open
return false;
Avoid too many return
statements within this function. Open
return true; //> element is visible and so return TRUE
Avoid too many return
statements within this function. Open
return b;
Avoid too many return
statements within this function. Open
return _par; //> return the parent
Avoid too many return
statements within this function. Open
return (elem.length > 0) ? this.getParentNodeType(elem[elem.length - 1]) : null;
Avoid too many return
statements within this function. Open
return d;
Avoid too many return
statements within this function. Open
return _res;
Avoid too many return
statements within this function. Open
return 0 < a.length ? this.composedParentNode(a[a.length - 1]) : null;
Avoid too many return
statements within this function. Open
return {
TYPE: _severityEnum.INFO,
RESULT: true,
MSG: 'Passed! element is visible and focusable'
};
Avoid too many return
statements within this function. Open
return d.reason = c.reason, d;
Avoid too many return
statements within this function. Open
return {
TYPE: _severityEnum.INFO,
RESULT: true,
MSG: 'Passed!'
};
Avoid too many return
statements within this function. Open
return d;
Function hasClickEvents
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
hasClickEvents: function(elem) {
var _hasClicks = false; //> boolean to hold if any event of type click or double click exists
/*jshint -W030 */
if (window.getEventListeners) {
//> if window.getEventListeners exists. In most browsers it wont
- 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 isElementHidden
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
isElementHidden: function(a) {
if (!(a instanceof a.ownerDocument.defaultView.HTMLElement)) {
return !1;
}
if (a.hasAttribute('chromevoxignoreariahidden')) {
- 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 complianceChecker
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
complianceChecker: function(ruleComplianceValue, auditConfigCompliance) {
var _result = false;
/*jshint -W030 */
(typeof auditConfigCompliance === 'string') ? (_result = (ruleComplianceValue === auditConfigCompliance)) : ((auditConfigCompliance instanceof Array) ? ((auditConfigCompliance.length > 0) ? _result = this.complianceLooper(ruleComplianceValue, auditConfigCompliance) : _result = true) : _result = true);
return _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 isAHiddenElem
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
isAHiddenElem: function(elem) {
//> check if the element is part of the current document and not in some iframe etc.,
if (!(elem instanceof elem.ownerDocument.defaultView.HTMLElement)) {
return true; //> No! it is not part of the current document and is hidden.
- 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 _ruleExector
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
function _ruleExector(elem) {
var _severityEnum = enums.severityEnum,
_id;
- 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"