Showing 136 of 152 total issues
Avoid too many return
statements within this function. Open
return 'Date';
Avoid too many return
statements within this function. Open
return 'Text';
Avoid too many return
statements within this function. Open
return 'Record';
Avoid too many return
statements within this function. Open
return 'Quantity';
Avoid too many return
statements within this function. Open
return 'r="125" g="235" b="143"';
Avoid too many return
statements within this function. Open
return 'r="149" g="91" b="244"';
Avoid too many return
statements within this function. Open
return 'r="209" g="110" b="244"';
Avoid too many return
statements within this function. Open
return 'Temperature';
Avoid too many return
statements within this function. Open
return 'r="244" g="91" b="91"';
Avoid too many return
statements within this function. Open
return 'Telephone number';
Avoid too many return
statements within this function. Open
return 'Page';
Function objToFunction
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
exports.objToFunction = function(name, obj) {
var wikitext = '{{' + name + ':\n';
for (var propertyName in 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 writeFile
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
module.exports.writeFile = function(generated, dir, extension) {
'use strict';
return new Promise(function(resolve) {
- 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 webserver
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
var webserver = require('http').createServer(function(request, response) {
request.addListener('end', function() {
// If the webapp requests a file from the /_processed/ directory
- 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 loadTemplate
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
exports.loadTemplate = function(scope, templateFileName, settings, internalTemplate) {
handlebars.setMoboSettings(settings);
var templateName = templateFileName.substr(0, templateFileName.lastIndexOf('.'));
- 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 upgradeFormLinks
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
exports.upgradeFormLinks = function(obj) {
var inspect = obj.items || obj;
if (inspect.format && inspect.format.indexOf('/form/') > -1) {
- 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"