Showing 627 of 1,220 total issues
Function refreshChartControlLabels
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
var refreshChartControlLabels = function(theNavData) {
// This is a chart callback function
// When data is loaded onto chart, calls this function
// for update window labels
- 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 buildCanvas
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
var buildCanvas=function(host, artefact, metricname,time){
var name = host +"-"+ artefact;
var element="";
for(var chart in charts){
if($(jqEscape(name+"_chart_"+charts[chart])).length==0){
- 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 retrieveChartPanel
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
var retrieveChartPanel = function() {
var url = createChartUrl(lastObsUrl);
var placeholder = "#plot";
var valuePlaceholder = '#sensorLastObsValue';
- 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 getData
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
var getData = function() {
for (var c in chartNames){
var newTime=addTimeValue(chartNames[c]);
if(newTime != window.chartNames[c].data.labels[window.chartNames[c].data.labels.length -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 MarkerClusterer
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
function MarkerClusterer(map, opt_markers, opt_options) {
// MarkerClusterer implements google.maps.OverlayView interface. We use the
// extend function to extend MarkerClusterer with google.maps.OverlayView
// because it might not always be available when the code is defined so we
// look for it at the last possible moment. If it doesn't exist now then
- 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 retrieveActivity
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
var retrieveActivity = function(placeholder, url, label) {
if (selectedSensor.dataType === 'LINK' ||
selectedSensor.dataType === 'AUDIO_LINK' ||
selectedSensor.dataType === 'IMAGE_LINK' ||
selectedSensor.dataType === 'VIDEO_LINK' ||
- 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 showLastObservations
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
function showLastObservations(componentId, sensorId, panel) {
var sensor = sensorsLastObsMap[sensorId];
if (!sensor || sensor === null || sensor === undefined) {
- 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"