docconfig/template/publish.js
Function publish
has 200 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
exports.publish = function(taffyData, opts, tutorials) {
var docdash = env && env.conf && env.conf.docdash || {};
data = taffyData;
var conf = env.conf.templates || {};
File publish.js
has 487 lines of code (exceeds 250 allowed). Consider refactoring. Open
Open
/*global env: true */
'use strict';
var doop = require('jsdoc/util/doop');
var fs = require('jsdoc/fs');
Function publish
has a Cognitive Complexity of 14 (exceeds 5 allowed). Consider refactoring. Open
Open
exports.publish = function(taffyData, opts, tutorials) {
var docdash = env && env.conf && env.conf.docdash || {};
data = taffyData;
var conf = env.conf.templates || {};
- 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 buildMemberNav
has 40 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
function buildMemberNav(items, itemHeading, itemsSeen, linktoFn) {
var nav = '';
if (items && items.length) {
var itemsNav = '';
Function buildNav
has 27 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
function buildNav(members) {
var nav = '<h2><a href="index.html">Home</a></h2>';
var seen = {};
var seenTutorials = {};
Function needsSignature
has a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring. Open
Open
function needsSignature(doclet) {
var needsSig = false;
// function and class definitions always get a signature
if (doclet.kind === 'function' || doclet.kind === 'class') {
- 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 generate
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
function generate(type, title, docs, filename, resolveLinks) {