Showing 623 of 1,229 total issues
Function generateTests
has a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring. Open
Timbit.prototype.generateTests = function(alltests) {
// create combination of required parameters
var required = [];
for (var name in this.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 leave
has a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring. Open
leave: function(n, p, c) {
if (n.modifier) {
if (n.modifier.target === 'signature') {
return bld.signatureModifier(n.name);
- 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 setOptions
has a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring. Open
function setOptions(options) {
if (!options.encryptionSecret) {
throw new Error('No `encryptionSecret` provided to heroku-bouncer');
}
- 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 toGraphviz
has a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring. Open
function toGraphviz() {
var _output = [
'digraph G {\n',
' graph [ fontname="HelveticaNeue-Thin", fontcolor=black, fontsize=20 ];',
' node [ fontname="HelveticaNeue-Thin", fontcolor=black, fontsize=20, penwidth=0.5 shape=circle, fixedsize=true, width=1.2, height=1.2 ];',
- 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 plot
has a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring. Open
function plot(options) {
if (options && options.label) {
this._label = options.label;
options.label = undefined;
}
- 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 plot
has a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring. Open
function plot(options) {
if (options && options.label) {
this._label = options.label;
options.label = undefined;
}
- 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 state_machine_with_loop
has a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring. Open
var state_machine_with_loop = function(){
while(true){
switch(state){
case 1: {
if(state_cpt >= LENGTH-3){
- 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 access
has 7 arguments (exceeds 4 allowed). Consider refactoring. Open
access: function( elems, fn, key, value, chainable, emptyGet, raw ) {
Function addEdge
has 7 arguments (exceeds 4 allowed). Consider refactoring. Open
addEdge: function(edge, source, target, data, i, prefix, settings) {
Function addEdge
has 7 arguments (exceeds 4 allowed). Consider refactoring. Open
addEdge: function(edge, source, target, data, i, prefix, settings) {
Function addEdge
has 7 arguments (exceeds 4 allowed). Consider refactoring. Open
addEdge: function(edge, source, target, data, i, prefix, settings) {
Avoid deeply nested control flow statements. Open
while (++i < n) if (!value.contains(name[i])) return false;
Avoid deeply nested control flow statements. Open
while (++i < n) if (!d3_selection_classedRe(name[i]).test(value)) return false;
Function decypherPath
has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring. Open
function decypherPath(path, _dirname) {
var filepath = pth.resolve(_dirname, path);
if (fs.existsSync(filepath)) {
- 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
Avoid deeply nested control flow statements. Open
if (subnode = subnodes[k]) d3_transitionNode(subnode, k, id, transition);
Avoid deeply nested control flow statements. Open
if (ids[0] === property.key.name) {
if(ids.length === 1)
return true;
// else
// checkProp(ids.slice(1), property)
Avoid deeply nested control flow statements. Open
if (angle(λ, λ1) > angle(λ0, λ1)) λ0 = λ;
Function d3_geom_quadtreeVisit
has 6 arguments (exceeds 4 allowed). Consider refactoring. Open
function d3_geom_quadtreeVisit(f, node, x1, y1, x2, y2) {
Avoid deeply nested control flow statements. Open
for (var i = points.length - 1; i >= 0; --i) listener.point((point = points[i])[0], point[1]);
Avoid deeply nested control flow statements. Open
if (angle(λ0, λ) > angle(λ0, λ1)) λ1 = λ;