Showing 8 of 13 total issues
Function main
has 167 lines of code (exceeds 25 allowed). Consider refactoring. Open
function main(configPath, overrideOptions) {
const app = express()
/*
========================================================
Function vbexp
has a Cognitive Complexity of 37 (exceeds 5 allowed). Consider refactoring. Open
const vbexp = function(configPath, overrideOptions) {
const app = createListener(configPath, overrideOptions)
app.start = function app_start(done)
- 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 main
has a Cognitive Complexity of 33 (exceeds 5 allowed). Consider refactoring. Open
function main(configPath, overrideOptions) {
const app = express()
/*
========================================================
- 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 vbexp
has 89 lines of code (exceeds 25 allowed). Consider refactoring. Open
const vbexp = function(configPath, overrideOptions) {
const app = createListener(configPath, overrideOptions)
app.start = function app_start(done)
Function app_start
has 84 lines of code (exceeds 25 allowed). Consider refactoring. Open
app.start = function app_start(done)
{
if (!done) {
done = function(err) {
if (err) {
Function registerHbsHelpers
has 40 lines of code (exceeds 25 allowed). Consider refactoring. Open
module.exports = function registerHbsHelpers(app) {
const customHelpers = {
// t(domain, key, ...args) {
Function loadConfig
has 27 lines of code (exceeds 25 allowed). Consider refactoring. Open
function loadConfig(configPath, overrideOptions) {
const _defsPath = path.resolve(path.join(__dirname, 'configuration.default.yml'))
const defs = yaml.load(fs.readFileSync(_defsPath, 'utf8'))
nconf.use('overrides', {
Function registerHbsHelpers
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
module.exports = function registerHbsHelpers(app) {
const customHelpers = {
// t(domain, key, ...args) {
- 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"