Showing 552 of 552 total issues
Function hsvToRGB
has 27 lines of code (exceeds 25 allowed). Consider refactoring. Open
Dygraph.hsvToRGB = function (hue, saturation, value) {
var red;
var green;
var blue;
if (saturation === 0) {
Function findClosestPoint
has 27 lines of code (exceeds 25 allowed). Consider refactoring. Open
Dygraph.prototype.findClosestPoint = function(domX, domY) {
var minDist = Infinity;
var idx = -1;
var points = this.layout_.points;
var dist, dx, dy, point, closestPoint, closestSeries;
Function updateDeep
has 27 lines of code (exceeds 25 allowed). Consider refactoring. Open
Dygraph.updateDeep = function (self, o) {
// Taken from http://stackoverflow.com/questions/384286/javascript-isdom-how-do-you-check-if-a-javascript-object-is-a-dom-object
function isNode(o) {
return (
typeof Node === "object" ? o instanceof Node :
Function updatetitles
has 27 lines of code (exceeds 25 allowed). Consider refactoring. Open
updatetitles(hashstruct) {
//this.currentlink
console.log('top nav hash:', hashstruct);
if (window.markdownnav) {
let currentlink = '#' + (hashstruct[0].length > 0 ? hashstruct[0] : this.index);
Function createZoomHandles_
has 27 lines of code (exceeds 25 allowed). Consider refactoring. Open
DygraphRangeSelector.prototype.createZoomHandles_ = function() {
var img = new Image();
img.className = 'dygraph-rangesel-zoomhandle';
img.style.position = 'absolute';
img.style.zIndex = 10;
Function bind
has 27 lines of code (exceeds 25 allowed). Consider refactoring. Open
bind() {
this.isOneshot = this.mode === 'oneshot';
this.isOnestep = this.mode === 'onestep';
if (this.isOnestep) {
this.showcontrols = false;
Similar blocks of code found in 2 locations. Consider refactoring. Open
this.navtitle = (currentlinkindex > 0) && (currentlinkindex < window.markdownnav.links.length)
? window.markdownnav.links[currentlinkindex].title
: '';
- 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 56.
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
this.navtitle = (currentlinkindex > 0) && (currentlinkindex < window.markdownnav.links.length)
? window.markdownnav.links[currentlinkindex].title
: '';
- 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 56.
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
Identical blocks of code found in 2 locations. Consider refactoring. Open
if (window.ani.stage) {
//TODO call removeEventListener and refactor adding listener when animation should start
if (!window.ani.animationstarted) window.ani.enableAnimation();//window.createjs.Ticker.addEventListener('tick', window.ani.stage);
window.ani.stage.play();
} else {
- 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 56.
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
Identical blocks of code found in 2 locations. Consider refactoring. Open
if (window.ani.stage) {
//TODO call removeEventListener and refactor adding listener when animation should start
if (!window.ani.animationstarted) window.ani.enableAnimation();//window.createjs.Ticker.addEventListener('tick', window.ani.stage);
window.ani.stage.play();
} else {
- 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 56.
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 get
has 26 lines of code (exceeds 25 allowed). Consider refactoring. Open
get() {
//sends GET request to
let myheaders = new Headers();
//localStorage.setItem('bdl-fhir-url',this.remoteurl);
if (this.remoteheadervalue && this.remoteheadervalue.length > 0) {
Function attached
has 26 lines of code (exceeds 25 allowed). Consider refactoring. Open
attached() {
//console.log('bdlmarkdownaurelia attached() src:', this.src);
// eslint-disable-next-line new-cap
//optionally, register customevent handler for 'contentupdate' when fromid is defined
// eslint-disable-next-line new-cap
Function bind
has 26 lines of code (exceeds 25 allowed). Consider refactoring. Open
bind() {
super.bind();
//done in super
//this.chlabels = this.labels.split(','); //labels for each dataset
Function toc_body
has 26 lines of code (exceeds 25 allowed). Consider refactoring. Open
md.renderer.rules.toc_body = function(tokens, index) {
let results = [];
let previousLevel = 0;
for (let i = 0; i < headingInfos.length; i++) {
Function handleValueChange
has 26 lines of code (exceeds 25 allowed). Consider refactoring. Open
this.handleValueChange = e => {
let datapoint = [];
if (!this.xy) datapoint.push(e.detail.time);
//e.detail do not reallocate - using same buffer, thus slicing to append to data array
let edata = e.detail.data.slice();
Function DrawPolygon_
has 8 arguments (exceeds 4 allowed). Consider refactoring. Open
Dygraph.DrawPolygon_ = function(sides, rotationRadians, ctx, cx, cy, color, radius, delta) {
Function _drawSeries
has 8 arguments (exceeds 4 allowed). Consider refactoring. Open
ctx, iter, strokeWidth, pointSize, drawPoints, drawGapPoints,
stepPlot, strategy) {
Function drawZoomRect_
has 8 arguments (exceeds 4 allowed). Consider refactoring. Open
Dygraph.prototype.drawZoomRect_ = function(direction, startX, endX, startY,
endY, prevDirection, prevEndX,
prevEndY) {
Similar blocks of code found in 2 locations. Consider refactoring. Open
if (this.attr_('y2label') && this.dygraph_.numAxes() == 2) {
div = createRotatedDiv(2, 'dygraph-label dygraph-y2label',
this.attr_('y2label'));
this.container.appendChild(div);
this.chartLabels.y2label = div;
- 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 55.
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
if (this.attr_('ylabel')) {
div = createRotatedDiv(1, 'dygraph-label dygraph-ylabel',
this.attr_('ylabel'));
this.container.appendChild(div);
this.chartLabels.ylabel = div;
- 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 55.
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