Showing 6 of 13 total issues
Function netJsonGraph
has 336 lines of code (exceeds 25 allowed). Consider refactoring. Open
d3.netJsonGraph = function(url, opts) {
/**
* Default options
*
* @param {string} el "body" The container element el: "body" [description]
File netjsongraph.js
has 374 lines of code (exceeds 250 allowed). Consider refactoring. Open
// version 0.1
(function () {
/**
* vanilla JS implementation of jQuery.extend()
*/
Function getlist
has a Cognitive Complexity of 11 (exceeds 5 allowed). Consider refactoring. Open
def getlist():
""" get tcp4 network links """
tcs = psutil.net_connections('tcp4')
logging.debug('Get tcp4 connections :' + str(tcs))
for i in tcs:
- 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 getbar2
has a Cognitive Complexity of 11 (exceeds 5 allowed). Consider refactoring. Open
def getbar2():
tca = TcpConnListAPI()
tc = tca.getval()
tcl = tc['tcp_conn_list']
tcv = tc['tcp_conn_value']
- 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 getjson
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
def getjson():
tcl = TcpConnListAPI().get()['tcp_conn_list']
d_netjson = {'type': 'test', 'label': 'test', 'protocol': 'tcp', 'version': '0.0.1', 'metric': 'test', 'nodes': [], 'links': [] }
nodes = [] # netjsongraph node list
links = [] # netjsongraph link list
- 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 getmatrix
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
def getmatrix():
tca = TcpConnListAPI()
tc = tca.getval()
tcl = tc['tcp_conn_list']
tcv = tc['tcp_conn_value']
- 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"