ForestAdmin/toolbelt

View on GitHub

Showing 166 of 172 total issues

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

  constructor(argv, config, plan) {
    super(argv, config, plan);
    const { assertPresent, chalk, env, environmentRenderer } = this.context;
    assertPresent({ chalk, env });
    this.chalk = chalk;
Severity: Major
Found in src/commands/environments/get.js and 1 other location - About 3 hrs to fix
src/commands/branch.js on lines 9..16

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

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(argv, config, plan) {
    super(argv, config, plan);
    const { assertPresent, env, inquirer, branchesRenderer } = this.context;
    assertPresent({ env, inquirer });
    this.env = env;
Severity: Major
Found in src/commands/branch.js and 1 other location - About 3 hrs to fix
src/commands/environments/get.js on lines 6..13

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

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

  this.getProject = async () => {
    const authToken = authenticator.getAuthToken();

    return agent
      .get(`${env.FOREST_SERVER_URL}/api/projects/${config.projectId}`)
Severity: Major
Found in src/services/project-manager.js and 1 other location - About 3 hrs to fix
src/services/project-manager.js on lines 62..70

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

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 ApimapSorter has 79 lines of code (exceeds 25 allowed). Consider refactoring.
Open

function ApimapSorter(apimap) {
  const { assertPresent, logger, lodash } = inject();
  assertPresent({ logger, lodash });

  function sortArrayOfObjects(array) {
Severity: Major
Found in src/services/apimap-sorter.js - About 3 hrs to fix

    File sequelize-table-constraints-getter.js has 296 lines of code (exceeds 250 allowed). Consider refactoring.
    Open

    const MysqlTableConstraintsGetter = require('./mysql-table-constraints-getter');
    
    function TableConstraintsGetter(databaseConnection, schema) {
      const queryInterface = databaseConnection.getQueryInterface();
    
    

      Function analyzeSequelizeTables has 71 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

      async function analyzeSequelizeTables(connection, config, allowWarning) {
        const { assertPresent, lodash } = inject();
        assertPresent({ lodash });
      
        // User provided a schema, check if it exists
      Severity: Major
      Found in src/services/schema/update/analyzer/sequelize-tables-analyzer.js - About 2 hrs to fix

        Function perform has 67 lines of code (exceeds 25 allowed). Consider refactoring.
        Open

          this.perform = async (columnInfo, columnName, tableName) => {
            const { logger } = Context.inject();
            const { type } = columnInfo;
        
            switch (type) {
        Severity: Major
        Found in src/services/schema/update/analyzer/sequelize-column-type-getter.js - About 2 hrs to fix

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

          const detectHasMany = (databaseConnection, fields, collectionName) => {
            const objectIdFields = fields.filter(field => field.type === OBJECT_ID_ARRAY);
            return P.mapSeries(objectIdFields, objectIdField =>
              detectReference(databaseConnection, objectIdField, collectionName),
            ).then(references => references.filter(reference => reference));
          src/services/schema/update/analyzer/mongo-references-analyzer.js on lines 37..42

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

          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

          const detectReferences = (databaseConnection, fields, collectionName) => {
            const objectIdFields = fields.filter(field => field.type === OBJECT_ID);
            return P.mapSeries(objectIdFields, objectIdField =>
              detectReference(databaseConnection, objectIdField, collectionName),
            ).then(references => references.filter(reference => reference));
          src/services/schema/update/analyzer/mongo-hasmany-analyzer.js on lines 40..45

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

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

            constructor(argv, config, plan) {
              super(argv, config, plan);
              const { assertPresent, env, projectsRenderer } = this.context;
              assertPresent({ env, projectsRenderer });
              this.env = env;
          Severity: Major
          Found in src/commands/projects.js and 6 other locations - About 2 hrs to fix
          src/commands/environments.js on lines 8..14
          src/commands/environments/create.js on lines 7..13
          src/commands/environments/reset.js on lines 10..16
          src/commands/push.js on lines 8..14
          src/commands/set-origin.js on lines 9..15
          src/commands/switch.js on lines 8..14

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

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

            constructor(argv, config, plan) {
              super(argv, config, plan);
              const { assertPresent, env, inquirer } = this.context;
              assertPresent({ env, inquirer });
              this.env = env;
          Severity: Major
          Found in src/commands/push.js and 6 other locations - About 2 hrs to fix
          src/commands/environments.js on lines 8..14
          src/commands/environments/create.js on lines 7..13
          src/commands/environments/reset.js on lines 10..16
          src/commands/projects.js on lines 6..12
          src/commands/set-origin.js on lines 9..15
          src/commands/switch.js on lines 8..14

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

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

            constructor(argv, config, plan) {
              super(argv, config, plan);
              const { assertPresent, env, inquirer } = this.context;
              assertPresent({ env, inquirer });
              this.env = env;
          Severity: Major
          Found in src/commands/switch.js and 6 other locations - About 2 hrs to fix
          src/commands/environments.js on lines 8..14
          src/commands/environments/create.js on lines 7..13
          src/commands/environments/reset.js on lines 10..16
          src/commands/projects.js on lines 6..12
          src/commands/push.js on lines 8..14
          src/commands/set-origin.js on lines 9..15

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

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

            constructor(argv, config, plan) {
              super(argv, config, plan);
              const { assertPresent, env, inquirer } = this.context;
              assertPresent({ env, inquirer });
              this.env = env;
          Severity: Major
          Found in src/commands/set-origin.js and 6 other locations - About 2 hrs to fix
          src/commands/environments.js on lines 8..14
          src/commands/environments/create.js on lines 7..13
          src/commands/environments/reset.js on lines 10..16
          src/commands/projects.js on lines 6..12
          src/commands/push.js on lines 8..14
          src/commands/switch.js on lines 8..14

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

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

            constructor(argv, config, plan) {
              super(argv, config, plan);
              const { assertPresent, env, inquirer } = this.context;
              assertPresent({ env, inquirer });
              this.env = env;
          Severity: Major
          Found in src/commands/environments/reset.js and 6 other locations - About 2 hrs to fix
          src/commands/environments.js on lines 8..14
          src/commands/environments/create.js on lines 7..13
          src/commands/projects.js on lines 6..12
          src/commands/push.js on lines 8..14
          src/commands/set-origin.js on lines 9..15
          src/commands/switch.js on lines 8..14

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

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

            constructor(argv, config, plan) {
              super(argv, config, plan);
              const { assertPresent, env, environmentRenderer } = this.context;
              assertPresent({ env, environmentRenderer });
              this.env = env;
          Severity: Major
          Found in src/commands/environments/create.js and 6 other locations - About 2 hrs to fix
          src/commands/environments.js on lines 8..14
          src/commands/environments/reset.js on lines 10..16
          src/commands/projects.js on lines 6..12
          src/commands/push.js on lines 8..14
          src/commands/set-origin.js on lines 9..15
          src/commands/switch.js on lines 8..14

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

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

            constructor(argv, config, plan) {
              super(argv, config, plan);
              const { assertPresent, env, environmentsRenderer } = this.context;
              assertPresent({ env, environmentsRenderer });
              this.env = env;
          Severity: Major
          Found in src/commands/environments.js and 6 other locations - About 2 hrs to fix
          src/commands/environments/create.js on lines 7..13
          src/commands/environments/reset.js on lines 10..16
          src/commands/projects.js on lines 6..12
          src/commands/push.js on lines 8..14
          src/commands/set-origin.js on lines 9..15
          src/commands/switch.js on lines 8..14

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

          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 JobStateChecker has a Cognitive Complexity of 19 (exceeds 5 allowed). Consider refactoring.
          Open

          function JobStateChecker(message, oclifExit) {
            const { assertPresent, authenticator, env, logger } = Context.inject();
            assertPresent({ authenticator, env, logger });
          
            const bar = new ProgressBar(`${message} [:bar] :percent `, { total: 100 });
          Severity: Minor
          Found in src/services/job-state-checker.js - About 2 hrs 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 6 locations. Consider refactoring.
          Open

            constructor({ assertPresent, chalk, logger, Table }) {
              assertPresent({
                chalk,
                logger,
                Table,
          Severity: Major
          Found in src/renderers/project.js and 5 other locations - About 2 hrs to fix
          src/renderers/branches.js on lines 4..13
          src/renderers/environments.js on lines 4..13
          src/renderers/projects.js on lines 4..13
          src/services/schema/update/analyzer/database-analyzer.js on lines 4..13
          src/services/schema/update/database.js on lines 2..11

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

          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

            constructor({ assertPresent, chalk, logger, Table }) {
              assertPresent({
                chalk,
                logger,
                Table,
          Severity: Major
          Found in src/renderers/branches.js and 5 other locations - About 2 hrs to fix
          src/renderers/environments.js on lines 4..13
          src/renderers/project.js on lines 4..13
          src/renderers/projects.js on lines 4..13
          src/services/schema/update/analyzer/database-analyzer.js on lines 4..13
          src/services/schema/update/database.js on lines 2..11

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

          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

            constructor({ assertPresent, chalk, logger, Table }) {
              assertPresent({
                chalk,
                logger,
                Table,
          Severity: Major
          Found in src/renderers/projects.js and 5 other locations - About 2 hrs to fix
          src/renderers/branches.js on lines 4..13
          src/renderers/environments.js on lines 4..13
          src/renderers/project.js on lines 4..13
          src/services/schema/update/analyzer/database-analyzer.js on lines 4..13
          src/services/schema/update/database.js on lines 2..11

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

          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