Showing 21 of 54 total issues
Method to_dataHashObject
has a Cognitive Complexity of 166 (exceeds 5 allowed). Consider refactoring. Open
def to_dataHashObject(bundle_filepath)
nodes = []
links = []
- 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 sankey
has 437 lines of code (exceeds 25 allowed). Consider refactoring. Open
d3.sankey = function() {
var sankey = {},
nodeWidth = 24,
nodePadding = 8,
size = [1, 1],
Method to_dataHashObject
has 248 lines of code (exceeds 25 allowed). Consider refactoring. Open
def to_dataHashObject(bundle_filepath)
nodes = []
links = []
Function vertical_sankey
has 239 lines of code (exceeds 25 allowed). Consider refactoring. Open
d3.vertical_sankey = function() {
var sankey = {},
nodeWidth = 24,
nodePadding = 8,
size = [1, 1],
Function sankey
has a Cognitive Complexity of 51 (exceeds 5 allowed). Consider refactoring. Open
d3.sankey = function() {
var sankey = {},
nodeWidth = 24,
nodePadding = 8,
size = [1, 1],
- 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
File sankey.js
has 439 lines of code (exceeds 250 allowed). Consider refactoring. Open
// Copyright (c) 2012-2015, Michael Bostock,
// Nathan Malkin, Kunal Bhalla, Claudiu Stefan Padurariu
// All rights reserved.
//
// Redistribution and use in source and binary forms, with or without
File provenance.rb
has 434 lines of code (exceeds 250 allowed). Consider refactoring. Open
require 'sparql' # query the graph
require 'uri' # used to decode urls
class Provenance
Function computeNodeBreadths
has 86 lines of code (exceeds 25 allowed). Consider refactoring. Open
function computeNodeBreadths() {
layerComponents();
components.forEach(function(component, i){
Function computeNodeDepths
has 82 lines of code (exceeds 25 allowed). Consider refactoring. Open
function computeNodeDepths(iterations) {
var nodesByBreadth = d3.nest()
.key(function(d) { return d.x; })
.sortKeys(d3.ascending)
.entries(nodes)
Function computeNodeDepths
has 82 lines of code (exceeds 25 allowed). Consider refactoring. Open
function computeNodeDepths(iterations) {
var nodesByBreadth = d3.nest()
.key(function(d) { return d.x; })
.sortKeys(d3.ascending)
.entries(nodes)
Function reversibleLink
has 80 lines of code (exceeds 25 allowed). Consider refactoring. Open
sankey.reversibleLink = function() {
var curvature = .5;
// Used when source is behind target, the first and last paths are simple
// lines at the start and end node while the second path is the spline
Method getAllArtifacts
has 68 lines of code (exceeds 25 allowed). Consider refactoring. Open
def getAllArtifacts
# create the query
sparql_query = SPARQL.parse("#{Provenance.prefixes}
SELECT *
WHERE
Function vertical_sankey
has a Cognitive Complexity of 17 (exceeds 5 allowed). Consider refactoring. Open
d3.vertical_sankey = function() {
var sankey = {},
nodeWidth = 24,
nodePadding = 8,
size = [1, 1],
- 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 backwardLink
has 45 lines of code (exceeds 25 allowed). Consider refactoring. Open
function backwardLink(part, d) {
var curveExtension = 30;
var curveDepth = 15;
Function computeNodeStructure
has 42 lines of code (exceeds 25 allowed). Consider refactoring. Open
function computeNodeStructure() {
var nodeStack = [],
index = 0;
nodes.forEach(function(node) {
Method to_dataHashObject
has 31 lines of code (exceeds 25 allowed). Consider refactoring. Open
def to_dataHashObject
paths = []
workflow.datalinks.each do |link|
paths << write_link(link, workflow)
Method getAllProcessRuns
has 29 lines of code (exceeds 25 allowed). Consider refactoring. Open
def getAllProcessRuns
sparql_query = SPARQL.parse("#{Provenance.prefixes}
SELECT *
WHERE
{
Function connect
has 27 lines of code (exceeds 25 allowed). Consider refactoring. Open
function connect(node) {
node.index = index++;
node.lowIndex = node.index;
node.onStack = true;
nodeStack.push(node);
Method getAllWorkflowRuns
has 27 lines of code (exceeds 25 allowed). Consider refactoring. Open
def getAllWorkflowRuns
# create the query
sparql_query = SPARQL.parse("#{Provenance.prefixes}
SELECT *
WHERE
Method to_dataHashObject
has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring. Open
def to_dataHashObject
paths = []
workflow.datalinks.each do |link|
paths << write_link(link, workflow)
- 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"