BabylonJS/Spector.js

View on GitHub

Showing 306 of 572 total issues

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

function drawScene() {
  // Clear the canvas before we start drawing on it.
  gl.clearColor(0, 0, 0, 1);
  gl.clearDepth(1.0);
  gl.clear(gl.COLOR_BUFFER_BIT | gl.DEPTH_BUFFER_BIT);
Severity: Major
Found in sample/js/uniformCommand.js and 1 other location - About 2 days to fix
sample/js/customShaderName.js on lines 228..301

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

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 4 locations. Consider refactoring.
Open

function initShaders() {
  var fragmentShader = getShader(gl, fragmentShaderSource, false);
  var vertexShader = getShader(gl, vertexShaderSource, true);

  // Create the shader program
Severity: Major
Found in sample/js/simple.js and 3 other locations - About 1 day to fix
sample/js/scissorClear.js on lines 316..340
sample/js/setTimeout.js on lines 316..340
sample/js/stencilBits.js on lines 308..332

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

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 4 locations. Consider refactoring.
Open

function initShaders() {
  var fragmentShader = getShader(gl, fragmentShaderSource, false);
  var vertexShader = getShader(gl, vertexShaderSource, true);

  // Create the shader program
Severity: Major
Found in sample/js/scissorClear.js and 3 other locations - About 1 day to fix
sample/js/setTimeout.js on lines 316..340
sample/js/simple.js on lines 317..341
sample/js/stencilBits.js on lines 308..332

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

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 4 locations. Consider refactoring.
Open

function initShaders() {
  var fragmentShader = getShader(gl, fragmentShaderSource, false);
  var vertexShader = getShader(gl, vertexShaderSource, true);

  // Create the shader program
Severity: Major
Found in sample/js/stencilBits.js and 3 other locations - About 1 day to fix
sample/js/scissorClear.js on lines 316..340
sample/js/setTimeout.js on lines 316..340
sample/js/simple.js on lines 317..341

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

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 4 locations. Consider refactoring.
Open

function initShaders() {
  var fragmentShader = getShader(gl, fragmentShaderSource, false);
  var vertexShader = getShader(gl, vertexShaderSource, true);

  // Create the shader program
Severity: Major
Found in sample/js/setTimeout.js and 3 other locations - About 1 day to fix
sample/js/scissorClear.js on lines 316..340
sample/js/simple.js on lines 317..341
sample/js/stencilBits.js on lines 308..332

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

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 7 locations. Consider refactoring.
Open

function initShaders() {
  var fragmentShader = getShader(gl, fragmentShaderSource, false);
  var vertexShader = getShader(gl, vertexShaderSource, true);

  // Create the shader program
Severity: Major
Found in sample/js/uniformCommand.js and 6 other locations - About 1 day to fix
sample/js/customLog.js on lines 310..334
sample/js/customMarker.js on lines 311..335
sample/js/customShaderName.js on lines 308..332
sample/js/depthRange.js on lines 315..339
sample/js/simpleNoCommand.js on lines 304..328
sample/js/transient.js on lines 315..339

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

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 7 locations. Consider refactoring.
Open

function initShaders() {
  var fragmentShader = getShader(gl, fragmentShaderSource, false);
  var vertexShader = getShader(gl, vertexShaderSource, true);

  // Create the shader program
Severity: Major
Found in sample/js/simpleNoCommand.js and 6 other locations - About 1 day to fix
sample/js/customLog.js on lines 310..334
sample/js/customMarker.js on lines 311..335
sample/js/customShaderName.js on lines 308..332
sample/js/depthRange.js on lines 315..339
sample/js/transient.js on lines 315..339
sample/js/uniformCommand.js on lines 307..331

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

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 7 locations. Consider refactoring.
Open

function initShaders() {
  var fragmentShader = getShader(gl, fragmentShaderSource, false);
  var vertexShader = getShader(gl, vertexShaderSource, true);

  // Create the shader program
Severity: Major
Found in sample/js/customShaderName.js and 6 other locations - About 1 day to fix
sample/js/customLog.js on lines 310..334
sample/js/customMarker.js on lines 311..335
sample/js/depthRange.js on lines 315..339
sample/js/simpleNoCommand.js on lines 304..328
sample/js/transient.js on lines 315..339
sample/js/uniformCommand.js on lines 307..331

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

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 7 locations. Consider refactoring.
Open

function initShaders() {
  var fragmentShader = getShader(gl, fragmentShaderSource, false);
  var vertexShader = getShader(gl, vertexShaderSource, true);

  // Create the shader program
Severity: Major
Found in sample/js/transient.js and 6 other locations - About 1 day to fix
sample/js/customLog.js on lines 310..334
sample/js/customMarker.js on lines 311..335
sample/js/customShaderName.js on lines 308..332
sample/js/depthRange.js on lines 315..339
sample/js/simpleNoCommand.js on lines 304..328
sample/js/uniformCommand.js on lines 307..331

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

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 7 locations. Consider refactoring.
Open

function initShaders() {
  var fragmentShader = getShader(gl, fragmentShaderSource, false);
  var vertexShader = getShader(gl, vertexShaderSource, true);

  // Create the shader program
Severity: Major
Found in sample/js/depthRange.js and 6 other locations - About 1 day to fix
sample/js/customLog.js on lines 310..334
sample/js/customMarker.js on lines 311..335
sample/js/customShaderName.js on lines 308..332
sample/js/simpleNoCommand.js on lines 304..328
sample/js/transient.js on lines 315..339
sample/js/uniformCommand.js on lines 307..331

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

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 7 locations. Consider refactoring.
Open

function initShaders() {
  var fragmentShader = getShader(gl, fragmentShaderSource, false);
  var vertexShader = getShader(gl, vertexShaderSource, true);

  // Create the shader program
Severity: Major
Found in sample/js/customLog.js and 6 other locations - About 1 day to fix
sample/js/customMarker.js on lines 311..335
sample/js/customShaderName.js on lines 308..332
sample/js/depthRange.js on lines 315..339
sample/js/simpleNoCommand.js on lines 304..328
sample/js/transient.js on lines 315..339
sample/js/uniformCommand.js on lines 307..331

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

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 7 locations. Consider refactoring.
Open

function initShaders() {
  var fragmentShader = getShader(gl, fragmentShaderSource, false);
  var vertexShader = getShader(gl, vertexShaderSource, true);

  // Create the shader program
Severity: Major
Found in sample/js/customMarker.js and 6 other locations - About 1 day to fix
sample/js/customLog.js on lines 310..334
sample/js/customShaderName.js on lines 308..332
sample/js/depthRange.js on lines 315..339
sample/js/simpleNoCommand.js on lines 304..328
sample/js/transient.js on lines 315..339
sample/js/uniformCommand.js on lines 307..331

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

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 2 locations. Consider refactoring.
Open

    constructor() {
        super();
        this.onTranslatedVertexSourceClicked = this.createEvent("onTranslatedVertexSourceClicked");
        this.onTranslatedFragmentSourceClicked = this.createEvent("onTranslatedFragmentSourceClicked");
        this.onVertexSourceClicked = this.createEvent("onVertexSourceClicked");
src/embeddedFrontend/resultView/menu/resultViewMenuComponent.ts on lines 27..37

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

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 2 locations. Consider refactoring.
Open

    constructor() {
        super();
        this.onCapturesClicked = this.createEvent("onCapturesClicked");
        this.onCommandsClicked = this.createEvent("onCommandsClicked");
        this.onInformationClicked = this.createEvent("onInformationClicked");
src/embeddedFrontend/resultView/sourceCode/sourceCodeComponent.ts on lines 53..63

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

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 2 locations. Consider refactoring.
Open

export class DrawElementsInstanced extends BaseCommand {
    public static readonly commandName = "drawElementsInstanced";

    protected get spiedCommandName(): string {
        return DrawElementsInstanced.commandName;
Severity: Major
Found in src/backend/commands/drawElementsInstanced.ts and 1 other location - About 6 hrs to fix
src/backend/commands/drawElementsInstancedAngle.ts on lines 4..21

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

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 2 locations. Consider refactoring.
Open

export class DrawElementsInstancedAngle extends BaseCommand {
    public static readonly commandName = "drawElementsInstancedANGLE";

    protected get spiedCommandName(): string {
        return DrawElementsInstancedAngle.commandName;
Severity: Major
Found in src/backend/commands/drawElementsInstancedAngle.ts and 1 other location - About 6 hrs to fix
src/backend/commands/drawElementsInstanced.ts on lines 4..21

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

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 12 locations. Consider refactoring.
Open

function start() {
  canvas = document.getElementById("renderCanvas");

  initWebGL(canvas);      // Initialize the GL context

Severity: Major
Found in sample/js/customShaderName.js and 11 other locations - About 6 hrs to fix
sample/js/customLog.js on lines 52..78
sample/js/customMarker.js on lines 52..78
sample/js/customMetadata.js on lines 50..76
sample/js/depthRange.js on lines 50..76
sample/js/scissorClear.js on lines 54..80
sample/js/setTimeout.js on lines 54..80
sample/js/simple.js on lines 63..89
sample/js/simpleNoCommand.js on lines 50..76
sample/js/stencilBits.js on lines 54..80
sample/js/uniformArray.js on lines 46..72
sample/js/uniformCommand.js on lines 52..78

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

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 12 locations. Consider refactoring.
Open

function start() {
  canvas = document.getElementById("renderCanvas");

  initWebGL(canvas);      // Initialize the GL context

Severity: Major
Found in sample/js/simpleNoCommand.js and 11 other locations - About 6 hrs to fix
sample/js/customLog.js on lines 52..78
sample/js/customMarker.js on lines 52..78
sample/js/customMetadata.js on lines 50..76
sample/js/customShaderName.js on lines 54..80
sample/js/depthRange.js on lines 50..76
sample/js/scissorClear.js on lines 54..80
sample/js/setTimeout.js on lines 54..80
sample/js/simple.js on lines 63..89
sample/js/stencilBits.js on lines 54..80
sample/js/uniformArray.js on lines 46..72
sample/js/uniformCommand.js on lines 52..78

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

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 12 locations. Consider refactoring.
Open

function start() {
  canvas = document.getElementById("renderCanvas");

  initWebGL(canvas);      // Initialize the GL context

Severity: Major
Found in sample/js/customMarker.js and 11 other locations - About 6 hrs to fix
sample/js/customLog.js on lines 52..78
sample/js/customMetadata.js on lines 50..76
sample/js/customShaderName.js on lines 54..80
sample/js/depthRange.js on lines 50..76
sample/js/scissorClear.js on lines 54..80
sample/js/setTimeout.js on lines 54..80
sample/js/simple.js on lines 63..89
sample/js/simpleNoCommand.js on lines 50..76
sample/js/stencilBits.js on lines 54..80
sample/js/uniformArray.js on lines 46..72
sample/js/uniformCommand.js on lines 52..78

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

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 12 locations. Consider refactoring.
Open

function start() {
  canvas = document.getElementById("renderCanvas");

  initWebGL(canvas);      // Initialize the GL context

Severity: Major
Found in sample/js/customMetadata.js and 11 other locations - About 6 hrs to fix
sample/js/customLog.js on lines 52..78
sample/js/customMarker.js on lines 52..78
sample/js/customShaderName.js on lines 54..80
sample/js/depthRange.js on lines 50..76
sample/js/scissorClear.js on lines 54..80
sample/js/setTimeout.js on lines 54..80
sample/js/simple.js on lines 63..89
sample/js/simpleNoCommand.js on lines 50..76
sample/js/stencilBits.js on lines 54..80
sample/js/uniformArray.js on lines 46..72
sample/js/uniformCommand.js on lines 52..78

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

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