Showing 113 of 303 total issues
Avoid too many return
statements within this function. Open
return "ppt-span-group";
Avoid too many return
statements within this function. Open
return "ppt-span-group";
Avoid too many return
statements within this function. Open
return "ppt-span-value";
Function generateTaxonomyCountQuery
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
query.generateTaxonomyCountQuery = function (label) {
var constraintAttr = provider.node.getConstraintAttribute(label);
var whereElements = [];
- 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 loadSchemaNode
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
graph.loadSchemaNode = function (nodeSchema, parentNode, index, parentLinkTotalCount, parentRel, isReverse) {
var isGroupNode = provider.node.getIsGroup(nodeSchema);
var parentAngle = graph.computeParentAngle(parentNode);
var angleDeg;
- 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 reset
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
tools.reset = function () {
dataModel.nodes.length = 0;
dataModel.links.length = 0;
// Reinitialize internal label generator
- 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 computeLines
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
function computeLines(words, targetWidth) {
var line;
var lineWidth0 = Infinity;
var lines = [];
- 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 removeEmptyBranches
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
node.removeEmptyBranches = function (n) {
var hasValues = n.hasOwnProperty("value") && n.value.length > 0;
var childrenLinks = dataModel.links.filter(function (l) {
return l.source === n;
- 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 getTrunkNode
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
node.getTrunkNode = function (n) {
for (var i = 0; i < dataModel.links.length; i++) {
var l = dataModel.links[i];
if (l.target === n) {
- 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 updateResults
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
result.updateResults = function () {
if (result.hasChanged) {
var resultsIndex = {};
var index = 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 generateNodeCountQuery
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
query.generateNodeCountQuery = function (countedNode) {
var negativeElements = query.generateNegativeQueryElements();
var queryElements = query.generateQueryElements(dataModel.getRootNode(), countedNode, query.getRelevantLinks(dataModel.getRootNode(), countedNode, dataModel.links), true, true);
var queryMatchElements = queryElements.matchElements,
queryWhereElements = queryElements.whereElements.concat(negativeElements.whereElements),
- 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 parseGraphResultData
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
result.parseGraphResultData = function (data) {
var nodes = {}, edges = {};
data.results[1].data.forEach(function (row) {
- 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 log
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
logger.log = function (logLevel, message) {
if (console && logLevel >= logger.LEVEL) {
if (logger.TRACE) {
message = message + "\n" + new Error().stack
}
- 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"