Nhogs/popoto

View on GitHub

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
Severity: Minor
Found in src/tools/tools.js - About 25 mins to fix

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
        }
Severity: Minor
Found in src/logger/logger.js - About 25 mins to fix

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;
Severity: Minor
Found in src/graph/graph.js - About 25 mins to fix

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),
Severity: Minor
Found in src/query/query.js - About 25 mins to fix

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) {
Severity: Minor
Found in src/result/result.js - About 25 mins to fix

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?
Severity: Minor
Found in src/graph/node/node.js by fixme

TODO found
Open

// TODO introduce plugin mechanism to add tools
Severity: Minor
Found in src/tools/tools.js by fixme

TODO found
Open

textRenderer.TEXT_Y = 8; // TODO move this in dedicated config
Severity: Minor
Found in src/graph/node/textRenderer.js by fixme

TODO found
Open

    // TODO don't work on IE (nodes unstable) find another way to move node in foreground on mouse over?
Severity: Minor
Found in src/graph/node/node.js by fixme

TODO found
Open

 * TODO refactor node generation to allow future extensions (for example add plugin with new node types...)
Severity: Minor
Found in src/graph/node/node.js by fixme

TODO found
Open

        // .attr("viewBox", "0 0 800 600") TODO to avoid need of windows resize event
Severity: Minor
Found in src/graph/graph.js by fixme

TODO found
Open

    // TODO ZZZ move functions?
Severity: Minor
Found in src/graph/node/node.js by fixme

TODO found
Open

    // TODO can the listener be limited on the parent container only?
Severity: Minor
Found in src/graph/graph.js by fixme

TODO found
Open

// TODO ZZZ rename to create createForceSimulation
Severity: Minor
Found in src/graph/graph.js by fixme

TODO found
Open

// TODO add option nodes in generated query when no value is available
Severity: Minor
Found in src/queryviewer/queryviewer.js by fixme

TODO found
Open

 * TODO optimize with cached data?
Severity: Minor
Found in src/graph/node/node.js by fixme

TODO found
Open

    // TODO ZZZ extract variable?
Severity: Minor
Found in src/graph/node/node.js by fixme

TODO found
Open

 * TODO: clean or add comments to explain the code...
Severity: Minor
Found in src/graph/graph.js by fixme

TODO found
Open

 * TODO: clean mouseover text because this renderer change parent clip-path attribute
Severity: Minor
Found in src/graph/node/textRenderer.js by fixme

TODO found
Open

 * TODO: Clean getLines return and corresponding data.
Severity: Minor
Found in src/graph/node/fitTextRenderer.js by fixme
Severity
Category
Status
Source
Language