Showing 136 of 152 total issues
Function analyzeType
has a Cognitive Complexity of 23 (exceeds 5 allowed). Consider refactoring. Open
exports.analyzeType = function(obj) {
'use strict';
// Analyze the attribute type.
var inspect = obj.items || 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 exec
has 80 lines of code (exceeds 25 allowed). Consider refactoring. Open
exports.exec = function(settings, registry) {
'use strict';
return new Promise(function(resolve) {
File generateGraph.js
has 298 lines of code (exceeds 250 allowed). Consider refactoring. Open
//////////////////////////////////////////
// Requirements //
//////////////////////////////////////////
var fs = require('fs-extra');
Function enhanceWithForm
has 76 lines of code (exceeds 25 allowed). Consider refactoring. Open
exports.enhanceWithForm = function(objCollection, formSchema) {
if (formSchema && formSchema.$path) {
var newCollection = [];
Function generateForm
has 74 lines of code (exceeds 25 allowed). Consider refactoring. Open
exports.generateForm = function(settings, obj, name, registry) {
'use strict';
//////////////////////////////////////////
// GENERAL FORM ATTRIBUTES //
Function readFiles
has a Cognitive Complexity of 21 (exceeds 5 allowed). Consider refactoring. Open
exports.readFiles = function(files, type, callback) {
'use strict';
var content = {};
- 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
File handlebarsExtended.js
has 288 lines of code (exceeds 250 allowed). Consider refactoring. Open
// This module loads the handlebars template engine and adds custom extensions
// Those are mainly helper functions that make wikitext generation easier
var handlebars = require('handlebars');
Function exports
has 70 lines of code (exceeds 25 allowed). Consider refactoring. Open
module.exports = function(grunt) {
// Show elapsed time at the end
require('time-grunt')(grunt);
Function callParser
has a Cognitive Complexity of 20 (exceeds 5 allowed). Consider refactoring. Open
exports.callParser = function(settings, generator, data, registry, generated) {
'use strict';
for (var name in data) {
- 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 extend
has 68 lines of code (exceeds 25 allowed). Consider refactoring. Open
exports.extend = function(obj, $extend, registry) {
'use strict';
var ref = $extend || obj.$extend || false;
Function convertPropertyArray
has a Cognitive Complexity of 19 (exceeds 5 allowed). Consider refactoring. Open
exports.convertPropertyArray = function(items, objId) {
'use strict';
var propertyObject = {};
- 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 exec
has a Cognitive Complexity of 19 (exceeds 5 allowed). Consider refactoring. Open
exports.exec = function(customSettings) {
'use strict';
/** The projects custom settings.yaml */
- 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 printProperty
has 58 lines of code (exceeds 25 allowed). Consider refactoring. Open
exports.printProperty = function(attr) {
'use strict';
var result = '';
var inspect = attr.items || attr;
Function upload
has 58 lines of code (exceeds 25 allowed). Consider refactoring. Open
exports.upload = function(settings, uploadMap) {
if (Object.keys(uploadMap).length === 0) {
log('[i] No pages to upload');
Function exec
has 57 lines of code (exceeds 25 allowed). Consider refactoring. Open
exports.exec = function(settings, registry) {
'use strict';
exports.outlineTemplate = moboUtil.loadTemplate(exports, 'outline.wikitext', settings);
Function upgradeChangedProperties
has a Cognitive Complexity of 17 (exceeds 5 allowed). Consider refactoring. Open
exports.upgradeChangedProperties = function(obj, modelPartName) {
var messages = {}; // A message Set, that contains each message only once, the value beeing the counter
- 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 generateTemplate
has a Cognitive Complexity of 17 (exceeds 5 allowed). Consider refactoring. Open
exports.generateTemplate = function(settings, obj, name, registry) {
'use strict';
// If this is an abstract model, don't create a template for it
if (obj.$abstract) {
- 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 drilldownInfo
has 55 lines of code (exceeds 25 allowed). Consider refactoring. Open
exports.drilldownInfo = function(obj, registry) {
var drilldowninfo = [];
var fieldName;
var field;
Function exec
has 54 lines of code (exceeds 25 allowed). Consider refactoring. Open
exports.exec = function(settings, jobs) {
'use strict';
var i = 0;
Function postProcessing
has a Cognitive Complexity of 16 (exceeds 5 allowed). Consider refactoring. Open
exports.postProcessing = function(modelPart) {
'use strict';
for (var key in modelPart) {
- 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"