Showing 51 of 88 total issues
Function PhantomParser
has a Cognitive Complexity of 176 (exceeds 5 allowed). Consider refactoring. Open
var PhantomParser = function (utils, spawn, page, settings) {
/**
* The WebPage element.
*
* @property page
- Read upRead up
- Create a ticketCreate a ticket
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 PhantomParser
has 456 lines of code (exceeds 25 allowed). Consider refactoring. Open
var PhantomParser = function (utils, spawn, page, settings) {
/**
* The WebPage element.
*
* @property page
- Create a ticketCreate a ticket
Function Crawler
has 421 lines of code (exceeds 25 allowed). Consider refactoring. Open
var Crawler = function (config, spawn, test, client, winston, fs, optimist, utils) {
/**
* Number of tries before stop to execute the same request.
*
* @property tries
- Create a ticketCreate a ticket
Function EventContainer
has a Cognitive Complexity of 77 (exceeds 5 allowed). Consider refactoring. Open
var EventContainer = function () {
/**
* The Event Container.
*
* @property container
- Read upRead up
- Create a ticketCreate a ticket
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 Crawler
has a Cognitive Complexity of 75 (exceeds 5 allowed). Consider refactoring. Open
var Crawler = function (config, spawn, test, client, winston, fs, optimist, utils) {
/**
* Number of tries before stop to execute the same request.
*
* @property tries
- Read upRead up
- Create a ticketCreate a ticket
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 reporter
has a Cognitive Complexity of 74 (exceeds 5 allowed). Consider refactoring. Open
var reporter = function (utils) {
this.generateHTML = function (currentCrawler, reportName, report) {
var i, j, failed, html = '<!DOCTYPE html>\n';
html += '<html lang="en">\n';
- Read upRead up
- Create a ticketCreate a ticket
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 Utils
has a Cognitive Complexity of 56 (exceeds 5 allowed). Consider refactoring. Open
var Utils = function (crypto) {
/**
* Serialise an object as questring.
*
* @method serialise
- Read upRead up
- Create a ticketCreate a ticket
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 194 lines of code (exceeds 25 allowed). Consider refactoring. Open
module.exports = function(grunt) {
grunt.initConfig({
jasmine_node: {
coverage: {
report: [ 'lcov', 'html' ],
- Create a ticketCreate a ticket
File phantom.js
has 474 lines of code (exceeds 250 allowed). Consider refactoring. Open
/**
* __ _____ _______
* .-----.---.-.| |.--------.-----.-----._| | __|
* |__ --| _ || || | _ | | |__ |
* |_____|___._||__||__|__|__|_____|__|__|_______|_______|
- Create a ticketCreate a ticket
Function Utils
has 184 lines of code (exceeds 25 allowed). Consider refactoring. Open
var Utils = function (crypto) {
/**
* Serialise an object as questring.
*
* @method serialise
- Create a ticketCreate a ticket
Function reporter
has 156 lines of code (exceeds 25 allowed). Consider refactoring. Open
var reporter = function (utils) {
this.generateHTML = function (currentCrawler, reportName, report) {
var i, j, failed, html = '<!DOCTYPE html>\n';
html += '<html lang="en">\n';
- Create a ticketCreate a ticket
File crawler.js
has 424 lines of code (exceeds 250 allowed). Consider refactoring. Open
/**
* __ _____ _______
* .-----.---.-.| |.--------.-----.-----._| | __|
* |__ --| _ || || | _ | | |__ |
* |_____|___._||__||__|__|__|_____|__|__|_______|_______|
- Create a ticketCreate a ticket
Function generateHTML
has 154 lines of code (exceeds 25 allowed). Consider refactoring. Open
this.generateHTML = function (currentCrawler, reportName, report) {
var i, j, failed, html = '<!DOCTYPE html>\n';
html += '<html lang="en">\n';
html += ' <head>\n';
- Create a ticketCreate a ticket
Function EventContainer
has 141 lines of code (exceeds 25 allowed). Consider refactoring. Open
var EventContainer = function () {
/**
* The Event Container.
*
* @property container
- Create a ticketCreate a ticket
Function SalmonJS
has 119 lines of code (exceeds 25 allowed). Consider refactoring. Open
var SalmonJS = function (redis, argv) {
// TODO: convert to this.*
var IOC = require('./ioc'),
ioc = new IOC(),
logLevels = [ 'error', 'warn', 'info', 'debug' ],
- Create a ticketCreate a ticket
Function Test
has a Cognitive Complexity of 31 (exceeds 5 allowed). Consider refactoring. Open
var Test = function (fsWrapper, glob, mainDir, utils, cases_dir) {
/**
* Test case directory.
*
* @property TEST_CASE_DIRECTORY
- Read upRead up
- Create a ticketCreate a ticket
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 processPage
has 112 lines of code (exceeds 25 allowed). Consider refactoring. Open
this.processPage = function (content) {
currentCrawler.processing = true;
var result,
links,
- Create a ticketCreate a ticket
Function Test
has 85 lines of code (exceeds 25 allowed). Consider refactoring. Open
var Test = function (fsWrapper, glob, mainDir, utils, cases_dir) {
/**
* Test case directory.
*
* @property TEST_CASE_DIRECTORY
- Create a ticketCreate a ticket
Function FSWrapper
has a Cognitive Complexity of 23 (exceeds 5 allowed). Consider refactoring. Open
var FSWrapper = function (fs) {
if (fs === undefined) {
fs = require('fs');
}
- Read upRead up
- Create a ticketCreate a ticket
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 Parser
has 76 lines of code (exceeds 25 allowed). Consider refactoring. Open
module.exports = function Parser() {
/**
* URL.
*
* @property url
- Create a ticketCreate a ticket