Showing 81 of 81 total issues
Function CustomGraphController
has 374 lines of code (exceeds 25 allowed). Consider refactoring. Open
function CustomGraphController($scope, $window, $timeout, $http, d3Service, NcwmsService, Messagebus, UserAgent) {
this.mobile = UserAgent.mobile;
this.selectedLabel = '';
this.selectedUnits = '';
Function exports
has 362 lines of code (exceeds 25 allowed). Consider refactoring. Open
module.exports = function (grunt) {
// Load grunt tasks automatically
require('load-grunt-tasks')(grunt);
Function init
has 299 lines of code (exceeds 25 allowed). Consider refactoring. Open
this.init = function(element, attrs) {
this.dragging = false;
var container = element.children[0].children[1];
var hoverContainer, hoverLine, hoverLineXOffset, hoverLineYOffset, hoverLineGroup,
Function NcwmsService
has 273 lines of code (exceeds 25 allowed). Consider refactoring. Open
function NcwmsService($q, $http, Messagebus) {
this.ncWMSURL = 'http://localhost:8080/ncWMS-2.0-rc1-maartenvm/wms?';
var deferred = $q.defer();
this.ready = deferred.promise;
Function render
has 259 lines of code (exceeds 25 allowed). Consider refactoring. Open
this.render = function(data) {
// remove all previous items before render
d3.select(container).selectAll('*').remove();
if (!this.activated) {
Similar blocks of code found in 2 locations. Consider refactoring. Open
(function() {
'use strict';
function TerrainController($scope, Messagebus, UserAgent) {
this.mobile = UserAgent.mobile;
- Read upRead up
Duplicated Code
Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:
Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.
When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).
Tuning
This issue has a mass of 173.
We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.
The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.
If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.
See codeclimate-duplication
's documentation for more information about tuning the mass threshold in your .codeclimate.yml
.
Refactorings
- Extract Method
- Extract Class
- Form Template Method
- Introduce Null Object
- Pull Up Method
- Pull Up Field
- Substitute Algorithm
Further Reading
- Don't Repeat Yourself on the C2 Wiki
- Duplicated Code on SourceMaking
- Refactoring: Improving the Design of Existing Code by Martin Fowler. Duplicated Code, p76
Similar blocks of code found in 2 locations. Consider refactoring. Open
(function() {
'use strict';
function LogarithmicController($scope, Messagebus, UserAgent) {
this.mobile = UserAgent.mobile;
- Read upRead up
Duplicated Code
Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:
Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.
When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).
Tuning
This issue has a mass of 173.
We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.
The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.
If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.
See codeclimate-duplication
's documentation for more information about tuning the mass threshold in your .codeclimate.yml
.
Refactorings
- Extract Method
- Extract Class
- Form Template Method
- Introduce Null Object
- Pull Up Method
- Pull Up Field
- Substitute Algorithm
Further Reading
- Don't Repeat Yourself on the C2 Wiki
- Duplicated Code on SourceMaking
- Refactoring: Improving the Design of Existing Code by Martin Fowler. Duplicated Code, p76
File customgraph.controller.js
has 380 lines of code (exceeds 250 allowed). Consider refactoring. Open
(function() {
'use strict';
/*
source: D3 example @ http://bl.ocks.org/rkirsling/33a9e350516da54a5d4f
*/
Function CesiumNcwmsLayerController
has 122 lines of code (exceeds 25 allowed). Consider refactoring. Open
function CesiumNcwmsLayerController($q, $http, Cesium, CesiumViewerService, NcwmsService, Messagebus) {
this.selectedTime = new Date(Date.UTC(1960, 0, 31, 0, 0, 0));
Messagebus.subscribe('ncwmsTimeSelected', function(event, value) {
if (this.selectedTime !== value) {
this.selectedTime = value;
File Gruntfile.js
has 365 lines of code (exceeds 250 allowed). Consider refactoring. Open
// Generated on 2015-02-10 using generator-angular 0.11.0
'use strict';
// # Globbing
// for performance reasons we're only matching one level down:
Function CesiumViewerController
has 94 lines of code (exceeds 25 allowed). Consider refactoring. Open
function CesiumViewerController($scope, $http, Cesium, CesiumViewerService, Messagebus) {
this.lastClicked = {
'latitude': '',
'longitude': '',
'meanValue': '',
Function getFeatureInfoSeries
has 94 lines of code (exceeds 25 allowed). Consider refactoring. Open
this.getFeatureInfoSeries = function(selectedDataset, selectedPalette, boundingRect, callbackSuccess, callbackFailure) {
if (this.datasets.length === 0) {
return;
}
Similar blocks of code found in 4 locations. Consider refactoring. Open
var lowerOuterArea = d3.svg.area()
.interpolate('basis')
.x(function(d) {
return x(d.date) || 1;
})
- Read upRead up
Duplicated Code
Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:
Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.
When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).
Tuning
This issue has a mass of 105.
We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.
The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.
If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.
See codeclimate-duplication
's documentation for more information about tuning the mass threshold in your .codeclimate.yml
.
Refactorings
- Extract Method
- Extract Class
- Form Template Method
- Introduce Null Object
- Pull Up Method
- Pull Up Field
- Substitute Algorithm
Further Reading
- Don't Repeat Yourself on the C2 Wiki
- Duplicated Code on SourceMaking
- Refactoring: Improving the Design of Existing Code by Martin Fowler. Duplicated Code, p76
Similar blocks of code found in 4 locations. Consider refactoring. Open
var upperOuterArea = d3.svg.area()
.interpolate('basis')
.x(function(d) {
return x(d.date) || 1;
}).y0(function(d) {
- Read upRead up
Duplicated Code
Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:
Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.
When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).
Tuning
This issue has a mass of 105.
We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.
The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.
If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.
See codeclimate-duplication
's documentation for more information about tuning the mass threshold in your .codeclimate.yml
.
Refactorings
- Extract Method
- Extract Class
- Form Template Method
- Introduce Null Object
- Pull Up Method
- Pull Up Field
- Substitute Algorithm
Further Reading
- Don't Repeat Yourself on the C2 Wiki
- Duplicated Code on SourceMaking
- Refactoring: Improving the Design of Existing Code by Martin Fowler. Duplicated Code, p76
Similar blocks of code found in 4 locations. Consider refactoring. Open
var upperInnerArea = d3.svg.area()
.interpolate('basis')
.x(function(d) {
return x(d.date) || 1;
})
- Read upRead up
Duplicated Code
Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:
Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.
When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).
Tuning
This issue has a mass of 105.
We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.
The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.
If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.
See codeclimate-duplication
's documentation for more information about tuning the mass threshold in your .codeclimate.yml
.
Refactorings
- Extract Method
- Extract Class
- Form Template Method
- Introduce Null Object
- Pull Up Method
- Pull Up Field
- Substitute Algorithm
Further Reading
- Don't Repeat Yourself on the C2 Wiki
- Duplicated Code on SourceMaking
- Refactoring: Improving the Design of Existing Code by Martin Fowler. Duplicated Code, p76
Similar blocks of code found in 4 locations. Consider refactoring. Open
var lowerInnerArea = d3.svg.area()
.interpolate('basis')
.x(function(d) {
return x(d.date) || 1;
})
- Read upRead up
Duplicated Code
Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:
Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.
When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).
Tuning
This issue has a mass of 105.
We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.
The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.
If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.
See codeclimate-duplication
's documentation for more information about tuning the mass threshold in your .codeclimate.yml
.
Refactorings
- Extract Method
- Extract Class
- Form Template Method
- Introduce Null Object
- Pull Up Method
- Pull Up Field
- Substitute Algorithm
Further Reading
- Don't Repeat Yourself on the C2 Wiki
- Duplicated Code on SourceMaking
- Refactoring: Improving the Design of Existing Code by Martin Fowler. Duplicated Code, p76
Function drawPaths
has 86 lines of code (exceeds 25 allowed). Consider refactoring. Open
this.drawPaths = function(svg, data, x, y, chartWidth, chartHeight) {
var pathContainer = svg.append('g');
var upperOuterArea = d3.svg.area()
.interpolate('basis')
Function makeChart
has 85 lines of code (exceeds 25 allowed). Consider refactoring. Open
this.makeChart = function(data) {
var svgWidth = width;
var svgHeight = width / 2;
var margin = {
top: 20,
Function init
has 77 lines of code (exceeds 25 allowed). Consider refactoring. Open
this.init = function() {
// load JSON data
$http.get('serverconfig.json').then(function(res) {
if (res.data.id === 'ncWMS') {
this.ncWMSURL = res.data.url;
Similar blocks of code found in 2 locations. Consider refactoring. Open
img.onload = function() {
ctx.canvas.width = 150;
ctx.canvas.height = 10;
ctx.translate(150, 0);
- Read upRead up
Duplicated Code
Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:
Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.
When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).
Tuning
This issue has a mass of 92.
We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.
The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.
If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.
See codeclimate-duplication
's documentation for more information about tuning the mass threshold in your .codeclimate.yml
.
Refactorings
- Extract Method
- Extract Class
- Form Template Method
- Introduce Null Object
- Pull Up Method
- Pull Up Field
- Substitute Algorithm
Further Reading
- Don't Repeat Yourself on the C2 Wiki
- Duplicated Code on SourceMaking
- Refactoring: Improving the Design of Existing Code by Martin Fowler. Duplicated Code, p76