Showing 92 of 92 total issues
Avoid too many return
statements within this function. Open
return true;
Avoid too many return
statements within this function. Open
return null;
Avoid too many return
statements within this function. Open
if(config.type === 'youtube') { return jsondash.handlers.handleYoutube(container, config); }
Avoid too many return
statements within this function. Open
if(config.type === 'custom') { return jsondash.handlers.handleCustom(container, config); }
Avoid too many return
statements within this function. Open
return redirect(view_url)
Avoid too many return
statements within this function. Open
if(config.type === 'circlepack') { return jsondash.handlers.handleCirclePack(container, config); }
Function handleC3
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
jsondash.handlers.handleC3 = function(container, config) {
var _width = isNaN(config.width) ? jsondash.getDynamicWidth(container, config) : config.width;
'use strict';
var init_config = {
bindto: '[data-guid="' + config.guid + '"] .chart-container',
- 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 url2wordcloud
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
def url2wordcloud(url, requests_kwargs={},
exclude_punct=True,
normalized=True,
limit=None,
size=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 paginator
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
def paginator(page=0, per_page=None, count=None):
"""Get pagination calculations in a compact format."""
if count is None:
count = adapter.count()
if page is None:
- 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 dashboard
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
def dashboard():
"""Load all views."""
opts = dict()
views = []
# Allow query parameter overrides.
- 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 handleBasic
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
jsondash.handlers.handleBasic = function(container, config) {
'use strict';
if(config.type === 'numbergroup') { return jsondash.handlers.handleNumbersGroup(container, config); }
if(config.type === 'number') { return jsondash.handlers.handleSingleNum(container, config); }
if(config.type === 'iframe') { return jsondash.handlers.handleIframe(container, config); }
- 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 handleSingleNum
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
jsondash.handlers.handleSingleNum = function(container, config) {
'use strict';
jsondash.getJSON(container, config, function(error, res){
var data = res.data.data ? res.data.data : res.data;
var num = container
- 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"