File HttpMaster.js
has 296 lines of code (exceeds 250 allowed). Consider refactoring. Open
var async = require('async');
var EventEmitter = require('eventemitter3');
var path = require('path');
var CertScanner = require('./certScanner');
Function reload
has 51 lines of code (exceeds 25 allowed). Consider refactoring. Open
HttpMaster.prototype.reload = function(config, reloadDone) {
var self = this;
this.emit('reload');
function actualReload(config) {
Function init
has 50 lines of code (exceeds 25 allowed). Consider refactoring. Open
HttpMaster.prototype.init = function(config, initDone) {
var self = this;
var workers = this.workers;
function actualInit(config) {
Function actualReload
has 46 lines of code (exceeds 25 allowed). Consider refactoring. Open
function actualReload(config) {
self.config = config;
var workers = self.workers;
setupDi.call(self);
Function actualInit
has 45 lines of code (exceeds 25 allowed). Consider refactoring. Open
function actualInit(config) {
self.config = config;
setupDi.call(self);
Function preprocessPortConfig
has 43 lines of code (exceeds 25 allowed). Consider refactoring. Open
function preprocessPortConfig(config, cb) {
var self = this;
if (config.ssl) {
var loadsToDo = [];
Function initWorker
has 42 lines of code (exceeds 25 allowed). Consider refactoring. Open
function initWorker(cb) {
var self = this;
var worker = this.cluster.fork();
worker.sendMessage = function(type, data) {
worker.send(JSONfn.stringify({
Function setupDi
has 37 lines of code (exceeds 25 allowed). Consider refactoring. Open
function setupDi() {
var self = this;
var di = this.di = new DI();
di.onMissing = function(name) {
var m;
Function reload
has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring. Open
HttpMaster.prototype.reload = function(config, reloadDone) {
var self = this;
this.emit('reload');
function actualReload(config) {
- 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 preprocessPortConfig
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
function preprocessPortConfig(config, cb) {
var self = this;
if (config.ssl) {
var loadsToDo = [];
- 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 setupDi
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
function setupDi() {
var self = this;
var di = this.di = new DI();
di.onMissing = function(name) {
var m;
- 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 a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
HttpMaster.prototype.init = function(config, initDone) {
var self = this;
var workers = this.workers;
function actualInit(config) {
- 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"