File task-filter.js
has 294 lines of code (exceeds 250 allowed). Consider refactoring. Open
var CarrouselTask = function (sec, rows, columns) {
// sec = Name of data section, this is for identify div.
// rows = This is for the number of rows that will be displayed, if this number is less than the number of items, it will activate the navigation controls
this.children = []
Function showchildren
has 30 lines of code (exceeds 25 allowed). Consider refactoring. Open
CarrouselTask.prototype.showchildren = function (childIndex) {
var count = 0
if (typeof childIndex !== 'undefined') {
if (childIndex > this.active.length - this.maxCards) {
Function showchildren
has a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring. Open
CarrouselTask.prototype.showchildren = function (childIndex) {
var count = 0
if (typeof childIndex !== 'undefined') {
if (childIndex > this.active.length - this.maxCards) {
- 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 handleEvents
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
CarrouselTask.prototype.handleEvents = function (that) {
$(this.sectionTag + ' .navigation').on('click', 'a', function () {
if ($(this).attr('data-arrow') == 'down') {
that.arrayTasks.forEach(function (element) {
if ($(this).attr('data-arrow') == 'down') {
- 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 checkChildFilter
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
CarrouselTask.prototype.checkChildFilter = function (childTag) {
let find = 0
let isTrue = 0
for (let key in this.filters) {
- 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"