Showing 28 of 73 total issues
Function needsSignature
has a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring. 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 processExpressionObject
has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring. Open
function processExpressionObject( val, key ) {
var operator;
if ( sys.isObject( val ) ) {
var opKeys = Object.keys( val );
var op = opKeys[ 0 ];
- 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 configureClient
has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring. Open
export function configureClient(params: ClientParams): httpTransport.HttpTransportClient {
const transport = configureRequest(params);
const builder = httpTransport
.createBuilder(transport)
.retries(getRetries(params))
- 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
function generate(type, title, docs, filename, resolveLinks) {
Avoid too many return
statements within this function. Open
return parent[lastPart].push( newValue );
Avoid too many return
statements within this function. Open
return parent[lastPart];
Avoid too many return
statements within this function. Open
return parent[lastPart].shift();
Function $elemMatch
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
$elemMatch : function ( qu, value ) {
var expression, test, _i, _len;
if ( sys.isArray( value ) ) {
var _ref = qu.operands;
- 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"