Showing 303 of 303 total issues
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 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"
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 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
TODO found Open
// TODO Introduce an SVG tooltip instead?
- Exclude checks
TODO found Open
// TODO introduce plugin mechanism to add tools
- Exclude checks
TODO found Open
textRenderer.TEXT_Y = 8; // TODO move this in dedicated config
- Exclude checks
TODO found Open
// TODO don't work on IE (nodes unstable) find another way to move node in foreground on mouse over?
- Exclude checks
TODO found Open
* TODO refactor node generation to allow future extensions (for example add plugin with new node types...)
- Exclude checks
TODO found Open
// .attr("viewBox", "0 0 800 600") TODO to avoid need of windows resize event
- Exclude checks
TODO found Open
// TODO ZZZ move functions?
- Exclude checks
TODO found Open
// TODO can the listener be limited on the parent container only?
- Exclude checks
TODO found Open
// TODO ZZZ rename to create createForceSimulation
- Exclude checks
TODO found Open
// TODO add option nodes in generated query when no value is available
- Exclude checks
TODO found Open
* TODO optimize with cached data?
- Exclude checks
TODO found Open
// TODO ZZZ extract variable?
- Exclude checks
TODO found Open
* TODO: clean or add comments to explain the code...
- Exclude checks
TODO found Open
* TODO: clean mouseover text because this renderer change parent clip-path attribute
- Exclude checks
TODO found Open
* TODO: Clean getLines return and corresponding data.
- Exclude checks