Showing 45 of 85 total issues
Function exports
has 118 lines of code (exceeds 25 allowed). Consider refactoring. Open
module.exports = function (self) {
return {
_id: clerobee.generate(),
firestarter: self,
notifyTos: { },
File Inflicter.js
has 359 lines of code (exceeds 250 allowed). Consider refactoring. Open
let Communication = require('../lib/Communication')
let Barrel = require('../lib/Barrel')
let Blower = require('../lib/Blower')
let Firestormstarter = require('../lib/Firestormstarter')
let Flamestarter = require('../lib/Flamestarter')
Function exports
has a Cognitive Complexity of 24 (exceeds 5 allowed). Consider refactoring. Open
module.exports = function (self) {
return {
_id: clerobee.generate(),
firestarter: self,
notifyTos: { },
- 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 init
has 79 lines of code (exceeds 25 allowed). Consider refactoring. Open
inflicter.init = async function () {
let self = this
self.logger.harconlog( null, 'Harcon initiating...', { }, 'info' )
Function purify
has a Cognitive Complexity of 21 (exceeds 5 allowed). Consider refactoring. Open
function purify ( obj, config, level ) {
if (!obj) return obj
if ( _.isDate(obj) || _.isBoolean(obj) || _.isNumber(obj) || _.isString(obj) || _.isRegExp(obj) )
return obj
if ( _.isFunction(obj) )
- 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 burn
has 50 lines of code (exceeds 25 allowed). Consider refactoring. Open
firestarter.burn = async function ( comm ) {
let self = this
return new Promise( async (resolve, reject) => {
if ( !self.concealed )
self.logger.harconlog(null, 'Burning', comm.shallow(), 'trace' )
Function exec
has a Cognitive Complexity of 15 (exceeds 5 allowed). Consider refactoring. Open
exec: async function ( division, event, parameters, terms ) {
let self = this
division = division || self.division
var divEvent = division + SEPARATOR + event
- 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 newCommunication
has 15 arguments (exceeds 4 allowed). Consider refactoring. Open
exports.newCommunication = function ( mode, originalId, flowId, externalId, sourceDivision, source, sourceNodeID, division, event, params, callback, responder, responderNodeID, error, response ) {
Function Communication
has 15 arguments (exceeds 4 allowed). Consider refactoring. Open
function Communication (mode, originalId, flowId, externalId, sourceDivision, source, sourceNodeID, division, event, params, callback, responder, responderNodeID, error, response) {
Function appease
has a Cognitive Complexity of 14 (exceeds 5 allowed). Consider refactoring. Open
barrel.appease = async function ( comm, err, responseComms ) {
if ( err || responseComms ) {
let answers = []
for (let c of responseComms ) {
c.arrivalDate = Date.now()
- 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 deploy
has a Cognitive Complexity of 13 (exceeds 5 allowed). Consider refactoring. Open
inflicter.deploy = async function ( object, options ) {
if (options && _.isString(options))
return this.deployFunction( ...arguments )
let self = this
- 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 deploy
has 36 lines of code (exceeds 25 allowed). Consider refactoring. Open
inflicter.deploy = async function ( object, options ) {
if (options && _.isString(options))
return this.deployFunction( ...arguments )
let self = this
Function appease
has a Cognitive Complexity of 12 (exceeds 5 allowed). Consider refactoring. Open
firestarter.appease = async function ( error, comm, responseComms ) {
let self = this
let bcomm = self.blower.comm( comm.id )
if ( bcomm ) {
- 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 innerMatches
has a Cognitive Complexity of 12 (exceeds 5 allowed). Consider refactoring. Open
flamestarter.innerMatches = function ( eventName ) {
if ( this.event === '*' )
return true
if ( this.isRegex )
- 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 Inflicter
has a Cognitive Complexity of 12 (exceeds 5 allowed). Consider refactoring. Open
function Inflicter ( options ) {
let self = this
self.options = assigner.assign( {}, require('./DefaultConfig'), options || {} )
- 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 readFlows
has a Cognitive Complexity of 11 (exceeds 5 allowed). Consider refactoring. Open
readFlows: function ( folder, matcher = '.flow', defs = [] ) {
let files = fs.readdirSync(folder )
for ( let i in files ) {
let file = path.join(folder, files[i] )
if ( fs.statSync( file ).isDirectory() ) this.readFlows( file, matcher, defs )
- 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 Firestormstarter
has 31 lines of code (exceeds 25 allowed). Consider refactoring. Open
function Firestormstarter ( config, barrel, object, blower, logger ) {
this.config = config || {}
this.division = object.division || config.division || ''
Function innerIgnite
has 31 lines of code (exceeds 25 allowed). Consider refactoring. Open
firestarter.innerIgnite = async function ( ...parameters ) {
let self = this
let mode = parameters[ 0 ]
let externalId = parameters[ 1 ]
let flowId = parameters[ 2 ]
Function firstRead
has 31 lines of code (exceeds 25 allowed). Consider refactoring. Open
mortar.firstRead = async function () {
let self = this
if ( self.options.waitFor && self.options.waitFor.entity && !self.inflicterContext._barrel.firestarter( self.options.waitFor.entity ) ) {
return setTimeout( () => {
Function igniteFiles
has 29 lines of code (exceeds 25 allowed). Consider refactoring. Open
mortar.igniteFiles = async function ( ) {
let self = this
let newFiles = self.files.slice()
self.files.length = 0