Showing 390 of 665 total issues

Similar blocks of code found in 2 locations. Consider refactoring.
Open

    set lut(targetLUT) {
      this._color = this._luts[targetLUT];
      this._lut = targetLUT;

      this.paintCanvas();
Severity: Minor
Found in src/helpers/helpers.lut.js and 1 other location - About 40 mins to fix
src/helpers/helpers.lut.js on lines 163..168

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 49.

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

Further Reading

Similar blocks of code found in 11 locations. Consider refactoring.
Open

      this._line2.style.transform = `translate3D(${line2Data.transformX}px, ${
        line2Data.transformY
      }px, 0)
                rotate(${line2Data.transformAngle}rad)`;
Severity: Major
Found in src/widgets/widgets.biruler.js and 10 other locations - About 40 mins to fix
src/widgets/widgets.angle.js on lines 302..305
src/widgets/widgets.angle.js on lines 314..317
src/widgets/widgets.annotation.js on lines 304..307
src/widgets/widgets.annotation.js on lines 338..341
src/widgets/widgets.biruler.js on lines 245..248
src/widgets/widgets.biruler.js on lines 277..280
src/widgets/widgets.crossRuler.js on lines 299..302
src/widgets/widgets.crossRuler.js on lines 311..314
src/widgets/widgets.pressureHalfTime.js on lines 346..349
src/widgets/widgets.ruler.js on lines 262..265

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 48.

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

Further Reading

Similar blocks of code found in 11 locations. Consider refactoring.
Open

      this._dashline.style.transform = `translate3D(${minLine.transformX}px, ${
        minLine.transformY
      }px, 0)
        rotate(${minLine.transformAngle}rad)`;
Severity: Major
Found in src/widgets/widgets.annotation.js and 10 other locations - About 40 mins to fix
src/widgets/widgets.angle.js on lines 302..305
src/widgets/widgets.angle.js on lines 314..317
src/widgets/widgets.annotation.js on lines 304..307
src/widgets/widgets.biruler.js on lines 245..248
src/widgets/widgets.biruler.js on lines 257..260
src/widgets/widgets.biruler.js on lines 277..280
src/widgets/widgets.crossRuler.js on lines 299..302
src/widgets/widgets.crossRuler.js on lines 311..314
src/widgets/widgets.pressureHalfTime.js on lines 346..349
src/widgets/widgets.ruler.js on lines 262..265

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 48.

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

Further Reading

Similar blocks of code found in 11 locations. Consider refactoring.
Open

      this._line2.style.transform = `translate3D(${line2Data.transformX}px, ${
        line2Data.transformY
      }px, 0)
            rotate(${line2Data.transformAngle}rad)`;
Severity: Major
Found in src/widgets/widgets.angle.js and 10 other locations - About 40 mins to fix
src/widgets/widgets.angle.js on lines 302..305
src/widgets/widgets.annotation.js on lines 304..307
src/widgets/widgets.annotation.js on lines 338..341
src/widgets/widgets.biruler.js on lines 245..248
src/widgets/widgets.biruler.js on lines 257..260
src/widgets/widgets.biruler.js on lines 277..280
src/widgets/widgets.crossRuler.js on lines 299..302
src/widgets/widgets.crossRuler.js on lines 311..314
src/widgets/widgets.pressureHalfTime.js on lines 346..349
src/widgets/widgets.ruler.js on lines 262..265

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 48.

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

Further Reading

Similar blocks of code found in 11 locations. Consider refactoring.
Open

      this._line.style.transform = `translate3D(${lineData.transformX}px, ${
        lineData.transformY
      }px, 0)
            rotate(${lineData.transformAngle}rad)`;
Severity: Major
Found in src/widgets/widgets.angle.js and 10 other locations - About 40 mins to fix
src/widgets/widgets.angle.js on lines 314..317
src/widgets/widgets.annotation.js on lines 304..307
src/widgets/widgets.annotation.js on lines 338..341
src/widgets/widgets.biruler.js on lines 245..248
src/widgets/widgets.biruler.js on lines 257..260
src/widgets/widgets.biruler.js on lines 277..280
src/widgets/widgets.crossRuler.js on lines 299..302
src/widgets/widgets.crossRuler.js on lines 311..314
src/widgets/widgets.pressureHalfTime.js on lines 346..349
src/widgets/widgets.ruler.js on lines 262..265

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 48.

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

Further Reading

Identical blocks of code found in 2 locations. Consider refactoring.
Open

    xhr.addEventListener(
      'error',
      function() {
        scope.dispatchEvent({
          type: 'error',
Severity: Minor
Found in src/loaders/loaders.freesurfer.js and 1 other location - About 40 mins to fix
src/loaders/loaders.trk.js on lines 47..56

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 48.

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

Further Reading

Similar blocks of code found in 11 locations. Consider refactoring.
Open

      this._line.style.transform = `translate3D(${lineData.transformX}px, ${
        lineData.transformY
      }px, 0)
      rotate(${lineData.transformAngle}rad)`;
Severity: Major
Found in src/widgets/widgets.ruler.js and 10 other locations - About 40 mins to fix
src/widgets/widgets.angle.js on lines 302..305
src/widgets/widgets.angle.js on lines 314..317
src/widgets/widgets.annotation.js on lines 304..307
src/widgets/widgets.annotation.js on lines 338..341
src/widgets/widgets.biruler.js on lines 245..248
src/widgets/widgets.biruler.js on lines 257..260
src/widgets/widgets.biruler.js on lines 277..280
src/widgets/widgets.crossRuler.js on lines 299..302
src/widgets/widgets.crossRuler.js on lines 311..314
src/widgets/widgets.pressureHalfTime.js on lines 346..349

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 48.

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

Further Reading

Similar blocks of code found in 11 locations. Consider refactoring.
Open

      this._line.style.transform = `translate3D(${lineData.transformX}px, ${
        lineData.transformY
      }px, 0)
            rotate(${lineData.transformAngle}rad)`;
Severity: Major
Found in src/widgets/widgets.crossRuler.js and 10 other locations - About 40 mins to fix
src/widgets/widgets.angle.js on lines 302..305
src/widgets/widgets.angle.js on lines 314..317
src/widgets/widgets.annotation.js on lines 304..307
src/widgets/widgets.annotation.js on lines 338..341
src/widgets/widgets.biruler.js on lines 245..248
src/widgets/widgets.biruler.js on lines 257..260
src/widgets/widgets.biruler.js on lines 277..280
src/widgets/widgets.crossRuler.js on lines 311..314
src/widgets/widgets.pressureHalfTime.js on lines 346..349
src/widgets/widgets.ruler.js on lines 262..265

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 48.

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

Further Reading

Similar blocks of code found in 11 locations. Consider refactoring.
Open

      this._line.style.transform = `translate3D(${lineData.transformX}px, ${
        lineData.transformY
      }px, 0)
                rotate(${lineData.transformAngle}rad)`;
Severity: Major
Found in src/widgets/widgets.pressureHalfTime.js and 10 other locations - About 40 mins to fix
src/widgets/widgets.angle.js on lines 302..305
src/widgets/widgets.angle.js on lines 314..317
src/widgets/widgets.annotation.js on lines 304..307
src/widgets/widgets.annotation.js on lines 338..341
src/widgets/widgets.biruler.js on lines 245..248
src/widgets/widgets.biruler.js on lines 257..260
src/widgets/widgets.biruler.js on lines 277..280
src/widgets/widgets.crossRuler.js on lines 299..302
src/widgets/widgets.crossRuler.js on lines 311..314
src/widgets/widgets.ruler.js on lines 262..265

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 48.

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

Further Reading

Similar blocks of code found in 11 locations. Consider refactoring.
Open

      this._line.style.transform = `translate3D(${lineData.transformX}px, ${
        lineData.transformY
      }px, 0)
                rotate(${lineData.transformAngle}rad)`;
Severity: Major
Found in src/widgets/widgets.biruler.js and 10 other locations - About 40 mins to fix
src/widgets/widgets.angle.js on lines 302..305
src/widgets/widgets.angle.js on lines 314..317
src/widgets/widgets.annotation.js on lines 304..307
src/widgets/widgets.annotation.js on lines 338..341
src/widgets/widgets.biruler.js on lines 257..260
src/widgets/widgets.biruler.js on lines 277..280
src/widgets/widgets.crossRuler.js on lines 299..302
src/widgets/widgets.crossRuler.js on lines 311..314
src/widgets/widgets.pressureHalfTime.js on lines 346..349
src/widgets/widgets.ruler.js on lines 262..265

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 48.

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

Further Reading

Similar blocks of code found in 11 locations. Consider refactoring.
Open

      this._dashline.style.transform = `translate3D(${dashLineData.transformX}px, ${
        dashLineData.transformY
      }px, 0)
                rotate(${dashLineData.transformAngle}rad)`;
Severity: Major
Found in src/widgets/widgets.biruler.js and 10 other locations - About 40 mins to fix
src/widgets/widgets.angle.js on lines 302..305
src/widgets/widgets.angle.js on lines 314..317
src/widgets/widgets.annotation.js on lines 304..307
src/widgets/widgets.annotation.js on lines 338..341
src/widgets/widgets.biruler.js on lines 245..248
src/widgets/widgets.biruler.js on lines 257..260
src/widgets/widgets.crossRuler.js on lines 299..302
src/widgets/widgets.crossRuler.js on lines 311..314
src/widgets/widgets.pressureHalfTime.js on lines 346..349
src/widgets/widgets.ruler.js on lines 262..265

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 48.

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

Further Reading

Similar blocks of code found in 11 locations. Consider refactoring.
Open

      this._line.style.transform = `translate3D(${lineData.transformX}px, ${
        lineData.transformY
      }px, 0)
        rotate(${lineData.transformAngle}rad)`;
Severity: Major
Found in src/widgets/widgets.annotation.js and 10 other locations - About 40 mins to fix
src/widgets/widgets.angle.js on lines 302..305
src/widgets/widgets.angle.js on lines 314..317
src/widgets/widgets.annotation.js on lines 338..341
src/widgets/widgets.biruler.js on lines 245..248
src/widgets/widgets.biruler.js on lines 257..260
src/widgets/widgets.biruler.js on lines 277..280
src/widgets/widgets.crossRuler.js on lines 299..302
src/widgets/widgets.crossRuler.js on lines 311..314
src/widgets/widgets.pressureHalfTime.js on lines 346..349
src/widgets/widgets.ruler.js on lines 262..265

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 48.

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

Further Reading

Similar blocks of code found in 11 locations. Consider refactoring.
Open

      this._line2.style.transform = `translate3D(${line2Data.transformX}px, ${
        line2Data.transformY
      }px, 0)
            rotate(${line2Data.transformAngle}rad)`;
Severity: Major
Found in src/widgets/widgets.crossRuler.js and 10 other locations - About 40 mins to fix
src/widgets/widgets.angle.js on lines 302..305
src/widgets/widgets.angle.js on lines 314..317
src/widgets/widgets.annotation.js on lines 304..307
src/widgets/widgets.annotation.js on lines 338..341
src/widgets/widgets.biruler.js on lines 245..248
src/widgets/widgets.biruler.js on lines 257..260
src/widgets/widgets.biruler.js on lines 277..280
src/widgets/widgets.crossRuler.js on lines 299..302
src/widgets/widgets.pressureHalfTime.js on lines 346..349
src/widgets/widgets.ruler.js on lines 262..265

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 48.

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

Further Reading

Identical blocks of code found in 2 locations. Consider refactoring.
Open

    xhr.addEventListener(
      'error',
      function() {
        scope.dispatchEvent({
          type: 'error',
Severity: Minor
Found in src/loaders/loaders.trk.js and 1 other location - About 40 mins to fix
src/loaders/loaders.freesurfer.js on lines 44..53

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 48.

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

Further Reading

Similar blocks of code found in 5 locations. Consider refactoring.
Open

      this._handles.forEach(elem => {
        elem.onStart(evt);
        active = active || elem.active;
      });
Severity: Major
Found in src/widgets/widgets.velocityTimeIntegral.js and 4 other locations - About 35 mins to fix
src/widgets/widgets.freehand.js on lines 105..108
src/widgets/widgets.freehand.js on lines 157..160
src/widgets/widgets.polygon.js on lines 108..111
src/widgets/widgets.polygon.js on lines 166..169

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 47.

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

Further Reading

Similar blocks of code found in 3 locations. Consider refactoring.
Open

      const distanceData = this.getDistanceData(
        this._handles[0].worldPosition,
        this._handles[1].worldPosition,
        this._calibrationFactor
      );
Severity: Minor
Found in src/widgets/widgets.biruler.js and 2 other locations - About 35 mins to fix
src/widgets/widgets.crossRuler.js on lines 318..322
src/widgets/widgets.ruler.js on lines 224..228

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 47.

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

Further Reading

Similar blocks of code found in 5 locations. Consider refactoring.
Open

      this._handles.forEach(elem => {
        elem.onStart(evt);
        active = active || elem.active;
      });
Severity: Major
Found in src/widgets/widgets.polygon.js and 4 other locations - About 35 mins to fix
src/widgets/widgets.freehand.js on lines 105..108
src/widgets/widgets.freehand.js on lines 157..160
src/widgets/widgets.polygon.js on lines 166..169
src/widgets/widgets.velocityTimeIntegral.js on lines 117..120

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 47.

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

Further Reading

Similar blocks of code found in 5 locations. Consider refactoring.
Open

      this._handles.forEach(elem => {
        elem.onStart(evt);
        active = active || elem.active;
      });
Severity: Major
Found in src/widgets/widgets.freehand.js and 4 other locations - About 35 mins to fix
src/widgets/widgets.freehand.js on lines 157..160
src/widgets/widgets.polygon.js on lines 108..111
src/widgets/widgets.polygon.js on lines 166..169
src/widgets/widgets.velocityTimeIntegral.js on lines 117..120

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 47.

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

Further Reading

Similar blocks of code found in 5 locations. Consider refactoring.
Open

      this._handles.forEach(elem => {
        elem.onMove(evt);
        hovered = hovered || elem.hovered;
      });
Severity: Major
Found in src/widgets/widgets.freehand.js and 4 other locations - About 35 mins to fix
src/widgets/widgets.freehand.js on lines 105..108
src/widgets/widgets.polygon.js on lines 108..111
src/widgets/widgets.polygon.js on lines 166..169
src/widgets/widgets.velocityTimeIntegral.js on lines 117..120

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 47.

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

Further Reading

Similar blocks of code found in 3 locations. Consider refactoring.
Open

      const distanceData = this.getDistanceData(
        this._handles[0].worldPosition,
        this._handles[1].worldPosition,
        this._calibrationFactor
      );
Severity: Minor
Found in src/widgets/widgets.ruler.js and 2 other locations - About 35 mins to fix
src/widgets/widgets.biruler.js on lines 284..288
src/widgets/widgets.crossRuler.js on lines 318..322

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 47.

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

Further Reading

Severity
Category
Status
Source
Language