CircuitVerse/CircuitVerse

View on GitHub

Showing 15,369 of 15,369 total issues

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

ctx.prototype.__addTransform = function (t) {
    //if the current element has siblings, add another group
    var parent = this.__closestGroupOrSvg();
    if (parent.childNodes.length > 0) {
        if (this.__currentElement.nodeName === "path") {
Severity: Major
Found in simulator/src/canvas2svg.js and 1 other location - About 1 day to fix
simulator/vendor/canvas2svg.js on lines 494..517

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

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

Function resolve has a Cognitive Complexity of 66 (exceeds 5 allowed). Consider refactoring.
Open

    resolve() {
        if (this.type == NODE_OUTPUT) {
            // Since output node forces its value on its neighbours, remove its contentions.
            // An existing contention will now trickle to the other output node that was causing
            // the contention.
Severity: Minor
Found in simulator/src/node.js - About 1 day to fix

Cognitive Complexity

Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.

A method's cognitive complexity is based on a few simple rules:

  • Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
  • Code is considered more complex for each "break in the linear flow of the code"
  • Code is considered more complex when "flow breaking structures are nested"

Further reading

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

    customDraw() {
        var ctx = simulationArea.context;
        ctx.strokeStyle = colors["stroke_alt"];
        ctx.lineWidth = correctWidth(3);
        const xx = this.x;
Severity: Major
Found in simulator/src/modules/Buffer.js and 1 other location - About 1 day to fix
simulator/src/modules/TriState.js on lines 91..111

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

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

    customDraw() {
        var ctx = simulationArea.context;
        ctx.strokeStyle = colors["stroke"];
        ctx.lineWidth = correctWidth(3);
        const xx = this.x;
Severity: Major
Found in simulator/src/modules/TriState.js and 1 other location - About 1 day to fix
simulator/src/modules/Buffer.js on lines 91..111

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

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

Function customResolve has a Cognitive Complexity of 65 (exceeds 5 allowed). Consider refactoring.
Open

function customResolve(clockInp, dInp, qOutput, en, masterState, 
    slaveState, prevClockState, clock_polarity, enable_polarity, numIterations) {
        
    for(var i = 0; i < numIterations; i++) {
        if(clock_polarity[i] != undefined) {
Severity: Minor
Found in simulator/src/sequential/verilogRAM.js - About 1 day to fix

Cognitive Complexity

Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.

A method's cognitive complexity is based on a few simple rules:

  • Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
  • Code is considered more complex for each "break in the linear flow of the code"
  • Code is considered more complex when "flow breaking structures are nested"

Further reading

File subcircuit.js has 586 lines of code (exceeds 250 allowed). Consider refactoring.
Open

/* eslint-disable import/no-cycle */
import Scope, { scopeList, switchCircuit } from "./circuit";
import CircuitElement from "./circuitElement";
import simulationArea from "./simulationArea";
import { scheduleBackup, checkIfBackup } from "./data/backupCircuit";
Severity: Major
Found in simulator/src/subcircuit.js - About 1 day to fix

    File circuitElement.js has 585 lines of code (exceeds 250 allowed). Consider refactoring.
    Open

    /* eslint-disable no-multi-assign */
    /* eslint-disable no-bitwise */
    /* eslint-disable */
    import { scheduleUpdate } from './engine';
    import simulationArea from './simulationArea';
    Severity: Major
    Found in simulator/src/circuitElement.js - About 1 day to fix

      File node.js has 581 lines of code (exceeds 250 allowed). Consider refactoring.
      Open

      /* eslint-disable import/no-cycle */
      import { drawCircle, drawLine, arc } from './canvasApi';
      import simulationArea from './simulationArea';
      import { distance, showError } from './utils';
      import {
      Severity: Major
      Found in simulator/src/node.js - About 1 day to fix

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

        class verilogReduceNorGate extends verilogUnaryGate {
            constructor(deviceJSON) {
                super(deviceJSON);
                
                this.bitWidthSplit = [];
        Severity: Major
        Found in simulator/src/VerilogClasses.js and 5 other locations - About 1 day to fix
        simulator/src/VerilogClasses.js on lines 180..199
        simulator/src/VerilogClasses.js on lines 201..220
        simulator/src/VerilogClasses.js on lines 222..241
        simulator/src/VerilogClasses.js on lines 264..283
        simulator/src/VerilogClasses.js on lines 285..304

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

        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

        class verilogBusUngroup {
            constructor(deviceJSON) {
                this.bitWidth = 0;
                this.bitWidthSplit = deviceJSON["groups"];
        
        
        Severity: Major
        Found in simulator/src/VerilogClasses.js and 1 other location - About 1 day to fix
        simulator/src/VerilogClasses.js on lines 956..981

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

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

        class verilogReduceOrGate extends verilogUnaryGate {
            constructor(deviceJSON) {
                super(deviceJSON);
                
                this.bitWidthSplit = [];
        Severity: Major
        Found in simulator/src/VerilogClasses.js and 5 other locations - About 1 day to fix
        simulator/src/VerilogClasses.js on lines 180..199
        simulator/src/VerilogClasses.js on lines 201..220
        simulator/src/VerilogClasses.js on lines 243..262
        simulator/src/VerilogClasses.js on lines 264..283
        simulator/src/VerilogClasses.js on lines 285..304

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

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

        class verilogReduceXorGate extends verilogUnaryGate {
            constructor(deviceJSON) {
                super(deviceJSON);
                
                this.bitWidthSplit = [];
        Severity: Major
        Found in simulator/src/VerilogClasses.js and 5 other locations - About 1 day to fix
        simulator/src/VerilogClasses.js on lines 180..199
        simulator/src/VerilogClasses.js on lines 201..220
        simulator/src/VerilogClasses.js on lines 222..241
        simulator/src/VerilogClasses.js on lines 243..262
        simulator/src/VerilogClasses.js on lines 285..304

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

        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

        class verilogBusGroup {
            constructor(deviceJSON) {
                this.bitWidth = 0;
                this.bitWidthSplit = deviceJSON["groups"];
        
        
        Severity: Major
        Found in simulator/src/VerilogClasses.js and 1 other location - About 1 day to fix
        simulator/src/VerilogClasses.js on lines 983..1008

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

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

        class verilogReduceXnorGate extends verilogUnaryGate {
            constructor(deviceJSON) {
                super(deviceJSON);
                
                this.bitWidthSplit = [];
        Severity: Major
        Found in simulator/src/VerilogClasses.js and 5 other locations - About 1 day to fix
        simulator/src/VerilogClasses.js on lines 180..199
        simulator/src/VerilogClasses.js on lines 201..220
        simulator/src/VerilogClasses.js on lines 222..241
        simulator/src/VerilogClasses.js on lines 243..262
        simulator/src/VerilogClasses.js on lines 264..283

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

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

        class verilogReduceNandGate extends verilogUnaryGate {
            constructor(deviceJSON) {
                super(deviceJSON);
                
                this.bitWidthSplit = [];
        Severity: Major
        Found in simulator/src/VerilogClasses.js and 5 other locations - About 1 day to fix
        simulator/src/VerilogClasses.js on lines 180..199
        simulator/src/VerilogClasses.js on lines 222..241
        simulator/src/VerilogClasses.js on lines 243..262
        simulator/src/VerilogClasses.js on lines 264..283
        simulator/src/VerilogClasses.js on lines 285..304

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

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

        class verilogReduceAndGate extends verilogUnaryGate {
            constructor(deviceJSON) {
                super(deviceJSON);
                
                this.bitWidthSplit = [];
        Severity: Major
        Found in simulator/src/VerilogClasses.js and 5 other locations - About 1 day to fix
        simulator/src/VerilogClasses.js on lines 201..220
        simulator/src/VerilogClasses.js on lines 222..241
        simulator/src/VerilogClasses.js on lines 243..262
        simulator/src/VerilogClasses.js on lines 264..283
        simulator/src/VerilogClasses.js on lines 285..304

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

        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

            if (height > scope.layout.height) {
                const oldHeight = scope.layout.height;
                scope.layout.height = height;
                for (let i = 0; i < scope.Input.length; i++) {
                    if (scope.Input[i].layoutProperties.y === oldHeight) {
        Severity: Major
        Found in simulator/src/modules/Power.js and 1 other location - About 1 day to fix
        simulator/src/modules.js on lines 15..24

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

        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

            if (height > scope.layout.height) {
                const oldHeight = scope.layout.height;
                scope.layout.height = height;
                for (let i = 0; i < scope.Input.length; i++) {
                    if (scope.Input[i].layoutProperties.y === oldHeight) { scope.Input[i].layoutProperties.y = scope.layout.height; }
        Severity: Major
        Found in simulator/src/modules.js and 1 other location - About 1 day to fix
        simulator/src/modules/Power.js on lines 130..143

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

        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

        ctx.prototype.getSerializedSvg = function (fixNamedEntities) {
            var serialized = new XMLSerializer().serializeToString(this.__root),
                keys, i, key, value, regexp, xmlns;
        
            //IE search for a duplicate xmnls because they didn't implement setAttributeNS correctly
        Severity: Major
        Found in simulator/src/canvas2svg.js and 1 other location - About 1 day to fix
        simulator/vendor/canvas2svg.js on lines 431..455

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

        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

            ctx.prototype.getSerializedSvg = function (fixNamedEntities) {
                var serialized = new XMLSerializer().serializeToString(this.__root),
                    keys, i, key, value, regexp, xmlns;
        
                //IE search for a duplicate xmnls because they didn't implement setAttributeNS correctly
        Severity: Major
        Found in simulator/vendor/canvas2svg.js and 1 other location - About 1 day to fix
        simulator/src/canvas2svg.js on lines 435..459

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

        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