Showing 79 of 129 total issues
File enums.js
has 1667 lines of code (exceeds 250 allowed). Consider refactoring. Open
'use strict';
//> @imports
var enumCreator = require('../utils/enumCreator');
Function exports
has a Cognitive Complexity of 69 (exceeds 5 allowed). Consider refactoring. Open
module.exports = function() {
//> is an active instance of this already running.
var isActive = false;
//> listener tracking datas - list of elements and list of listeners
var _elements_ = [];
- 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 axsUtils.js
has 557 lines of code (exceeds 250 allowed). Consider refactoring. Open
// jshint ignore: start
/***************************************************************************************
* dependency injection for rules creation
* @param
* @return an object with exposed functions
Function exports
has 209 lines of code (exceeds 25 allowed). Consider refactoring. Open
module.exports = function(grunt) {
// loading the npm task
grunt.loadNpmTasks('grunt-contrib-jshint');
grunt.loadNpmTasks('grunt-jscs');
grunt.loadNpmTasks('grunt-jsonlint');
Function findTextAlternatives
has a Cognitive Complexity of 50 (exceeds 5 allowed). Consider refactoring. Open
findTextAlternatives: function(a, b, c, d) {
var e = c || !1;
c = this.asElement(a);
if (!c || !d && this.isElementOrAncestorHidden(c)) {
return null;
- 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 exports
has a Cognitive Complexity of 46 (exceeds 5 allowed). Consider refactoring. Open
module.exports = function() {
//> function that checks if an element is visible on page
//> Hook it to the Element.prototype so that its available for any object of type [Element]
window.Element.prototype.isVisible = function() {
- 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 getAriaPropertyValue
has a Cognitive Complexity of 28 (exceeds 5 allowed). Consider refactoring. Open
getAriaPropertyValue: function(a, b, c) {
var d = a.replace(/^aria-/, ''),
e = enums.ariaPropertiesEnum[d],
d = {
name: a,
- 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 findTextAlternatives
has 86 lines of code (exceeds 25 allowed). Consider refactoring. Open
findTextAlternatives: function(a, b, c, d) {
var e = c || !1;
c = this.asElement(a);
if (!c || !d && this.isElementOrAncestorHidden(c)) {
return null;
Function getTextFromHostLanguageAttributes
has a Cognitive Complexity of 23 (exceeds 5 allowed). Consider refactoring. Open
getTextFromHostLanguageAttributes: function(a, b, c, d) {
if (this.matchSelector(a, 'img') && a.hasAttribute('alt')) {
var e = {
type: 'string',
valid: !0
- 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 getAriaProperties
has a Cognitive Complexity of 22 (exceeds 5 allowed). Consider refactoring. Open
getAriaProperties: function(a) {
var b = {},
c = this.getGlobalAriaProperties(a),
d;
for (d in enums.ariaPropertiesEnum) {
- 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 exports
has 77 lines of code (exceeds 25 allowed). Consider refactoring. Open
module.exports = function() {
//> is an active instance of this already running.
var isActive = false;
//> listener tracking datas - list of elements and list of listeners
var _elements_ = [];
exports
has 26 functions (exceeds 20 allowed). Consider refactoring. Open
module.exports = {
getTextFromHostLanguageAttributes: function(a, b, c, d) {
if (this.matchSelector(a, 'img') && a.hasAttribute('alt')) {
var e = {
Function getAriaPropertyValue
has 67 lines of code (exceeds 25 allowed). Consider refactoring. Open
getAriaPropertyValue: function(a, b, c) {
var d = a.replace(/^aria-/, ''),
e = enums.ariaPropertiesEnum[d],
d = {
name: a,
Function exports
has 61 lines of code (exceeds 25 allowed). Consider refactoring. Open
module.exports = function() {
//> function that checks if an element is visible on page
//> Hook it to the Element.prototype so that its available for any object of type [Element]
window.Element.prototype.isVisible = function() {
Function isVisible
has 59 lines of code (exceeds 25 allowed). Consider refactoring. Open
window.Element.prototype.isVisible = function() {
//> this is the current element for which the
var _this = this; var rect;
Function interceptEventListeners
has 59 lines of code (exceeds 25 allowed). Consider refactoring. Open
var interceptEventListeners = function() {
//> original methods exposed by the browser. All HTMLElement is an instanceof Node
var _super_ = {
addEventListener: window.HTMLElement.prototype.addEventListener,
Function _ruleExector
has a Cognitive Complexity of 16 (exceeds 5 allowed). Consider refactoring. Open
function _ruleExector(elem) {
var _severityEnum = enums.severityEnum,
_validRoleArr = [],
_role, _flag, _isValid = false;
- 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
Consider simplifying this complex logical expression. Open
if (_author.length === 1 && !_checkIfIsEmpty(_author.attr('content')) && _description.length === 1 &&
!_checkIfIsEmpty(_description.attr('content')) && _keywords.length === 1 &&
!_checkIfIsEmpty(_keywords.attr('content')) && _copyright.length === 1 &&
!_checkIfIsEmpty(_copyright.attr('content')) && _hasCharset.length === 1 &&
!_checkIfIsEmpty(_hasCharset.attr('charset'))) {
Function _ruleExector
has 48 lines of code (exceeds 25 allowed). Consider refactoring. Open
function _ruleExector(elem) {
//> load the severityEnum to report for issues
var _severityEnum = enums.severityEnum;
Function getTextFromHostLanguageAttributes
has 47 lines of code (exceeds 25 allowed). Consider refactoring. Open
getTextFromHostLanguageAttributes: function(a, b, c, d) {
if (this.matchSelector(a, 'img') && a.hasAttribute('alt')) {
var e = {
type: 'string',
valid: !0