Bamieh/reflow

View on GitHub

Showing 112 of 112 total issues

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

describe('Suite B', function() {
  it('Runs Cases', function() {
    expect(1).to.equal(1);
    console.log('Another Standard Suite Case Invoked')
  })
Severity: Major
Found in packages/reflow-core/__test/fixture/suite/suite-b.js and 3 other locations - About 1 hr to fix
packages/reflow-core/__test/fixture/suite/standard-describe.js on lines 1..6
packages/reflow-core/__test/fixture/suite/suite-a.js on lines 1..6
packages/reflow-core/__test/fixture/suite/suite-c.js on lines 1..6

Duplicated Code

Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

Tuning

This issue has a mass of 56.

We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

Refactorings

Further Reading

Function getFlow has 26 lines of code (exceeds 25 allowed). Consider refactoring.
Open

const getFlow = function(): Flow {
  const flowObjects: FlowObject = {};
  return {
    get(name: string, fallback: any): void {
      const flowObject = flowObjects[name];
Severity: Minor
Found in packages/reflow-client/src/commands/flow-variables.ts - About 1 hr to fix

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

      try {
        source = await driver.source();
      } catch (e) {
        if (e.status === 6) {
          throw e;
    Severity: Major
    Found in examples/example-native-project/actions/execute/command.js and 1 other location - About 1 hr to fix
    examples/example-native-project/actions/execute/command.js on lines 15..22

    Duplicated Code

    Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

    Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

    When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

    Tuning

    This issue has a mass of 55.

    We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

    The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

    If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

    See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

    Refactorings

    Further Reading

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

      try {
        screenshot = await driver.takeScreenshot();
      } catch (e) {
        if (e.status === 6) {
          throw e;
    Severity: Major
    Found in examples/example-native-project/actions/execute/command.js and 1 other location - About 1 hr to fix
    examples/example-native-project/actions/execute/command.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 55.

    We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

    The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

    If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

    See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

    Refactorings

    Further Reading

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

      CombinationConnection: {
        edges(obj, args, { connection }) {
          const {flowID, ...cursorInfo} = obj;
          return connection.combination.getByFlowID(flowID, cursorInfo);
        }
    Severity: Major
    Found in packages/reflow-circuit/lib/graphql/resolvers.js and 3 other locations - About 1 hr to fix
    packages/reflow-circuit/lib/graphql/resolvers.js on lines 59..64
    packages/reflow-circuit/lib/graphql/resolvers.js on lines 65..70
    packages/reflow-circuit/lib/graphql/resolvers.js on lines 77..82

    Duplicated Code

    Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

    Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

    When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

    Tuning

    This issue has a mass of 55.

    We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

    The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

    If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

    See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

    Refactorings

    Further Reading

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

      SuiteConnection: {
        edges(obj, args, { connection }) {
          const {combinationID, ...cursorInfo} = obj;
          return connection.suite.getByCombinationID(combinationID, cursorInfo);
        }
    Severity: Major
    Found in packages/reflow-circuit/lib/graphql/resolvers.js and 3 other locations - About 1 hr to fix
    packages/reflow-circuit/lib/graphql/resolvers.js on lines 59..64
    packages/reflow-circuit/lib/graphql/resolvers.js on lines 65..70
    packages/reflow-circuit/lib/graphql/resolvers.js on lines 71..76

    Duplicated Code

    Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

    Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

    When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

    Tuning

    This issue has a mass of 55.

    We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

    The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

    If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

    See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

    Refactorings

    Further Reading

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

      FlowConnection: {
        edges(obj, args, { connection }) {
          const {jobID, ...cursorInfo} = obj;
          return connection.flow.getByJobID(jobID, cursorInfo);
        }
    Severity: Major
    Found in packages/reflow-circuit/lib/graphql/resolvers.js and 3 other locations - About 1 hr to fix
    packages/reflow-circuit/lib/graphql/resolvers.js on lines 59..64
    packages/reflow-circuit/lib/graphql/resolvers.js on lines 71..76
    packages/reflow-circuit/lib/graphql/resolvers.js on lines 77..82

    Duplicated Code

    Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

    Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

    When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

    Tuning

    This issue has a mass of 55.

    We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

    The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

    If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

    See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

    Refactorings

    Further Reading

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

      JobConnection: {
        edges(obj, args, { connection }) {
          const {projectID, ...cursorInfo} = obj;
          return connection.job.getByProjectID(projectID, cursorInfo);
        }
    Severity: Major
    Found in packages/reflow-circuit/lib/graphql/resolvers.js and 3 other locations - About 1 hr to fix
    packages/reflow-circuit/lib/graphql/resolvers.js on lines 65..70
    packages/reflow-circuit/lib/graphql/resolvers.js on lines 71..76
    packages/reflow-circuit/lib/graphql/resolvers.js on lines 77..82

    Duplicated Code

    Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

    Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

    When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

    Tuning

    This issue has a mass of 55.

    We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

    The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

    If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

    See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

    Refactorings

    Further Reading

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

      {
        Header: "Details",
        accessor: "node.id",
        Cell: e =><Link to={`/flow/${e.value}`}>{"Click here"}</Link>
      },
    Severity: Minor
    Found in packages/reflow-board/src/containers/FlowsList/columns.js and 1 other location - About 55 mins to fix
    packages/reflow-board/src/pages/CombinationsList/columns.js on lines 24..28

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

    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 details = {
      Header: "Details",
      accessor: "node.id",
      Cell: e =><Link to={`/combination/${e.value}`}>{"Click here"}</Link>
    }
    Severity: Minor
    Found in packages/reflow-board/src/pages/CombinationsList/columns.js and 1 other location - About 55 mins to fix
    packages/reflow-board/src/containers/FlowsList/columns.js on lines 25..29

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

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

    const parseDir = function parseDir(callerFilename, opts) {
      opts = opts || {}
      // disable recursion to support nested directories of subcommands
      if (typeof opts.recurse !== 'boolean') opts.recurse = true
      // exclude 'json', 'coffee' from require-directory defaults
    Severity: Minor
    Found in packages/reflow-core/src/utils/parse-dir.ts - About 55 mins 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

    Function parseDir has a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring.
    Open

    const parseDir = function parseDir(dir, callerFilename, opts) {
      opts = opts || {}
      // disable recursion to support nested directories of subcommands
      if (typeof opts.recurse !== 'boolean') opts.recurse = true
      // exclude 'json', 'coffee' from require-directory defaults
    Severity: Minor
    Found in packages/reflow-cli/bin/parse-dir.js - About 55 mins 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

    Function parseDir has a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring.
    Open

    const parseDir = function parseDir(callerFilename, opts) {
      opts = opts || {}
      // disable recursion to support nested directories of subcommands
      if (typeof opts.recurse !== 'boolean') opts.recurse = true
      // exclude 'json', 'coffee' from require-directory defaults
    Severity: Minor
    Found in packages/reflow-core/lib/utils/parse-dir.js - About 55 mins 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

    Function ReflowReporter has a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring.
    Open

    const ReflowReporter = function(runner, options = {}) {
      const reporterOptions = options.reporterOptions || {};
      const {
        combinationID,
        flowDetails,
    Severity: Minor
    Found in packages/reflow-reporter/index.js - About 55 mins 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

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

    async function getAllConnectedDevices() {
      console.log('Detecting devices.');
      return {
        android: await getAndroidDevices(),
        ios: await getIOSDevices(),
    Severity: Minor
    Found in packages/reflow-appium/lib/routes/devices.js and 1 other location - About 50 mins to fix
    packages/reflow-appium/lib/devices.js on lines 114..124

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

    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

        context.describe.only = function (title, fn) {
          return common.suite.only({
            title: title,
            file: file,
            fn: fn
    Severity: Minor
    Found in packages/reflow-core/lib/interfaces/bdd.js and 1 other location - About 50 mins to fix
    packages/reflow-core/lib/interfaces/bdd.js on lines 108..114

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

    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

    async function getAllConnectedDevices() {
      console.log('Detecting devices.');
      return {
        android: await getAndroidDevices(),
        ios: await getIOSDevices(),
    Severity: Minor
    Found in packages/reflow-appium/lib/devices.js and 1 other location - About 50 mins to fix
    packages/reflow-appium/lib/routes/devices.js on lines 114..124

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

    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

        context.xdescribe = context.xcontext = context.describe.skip = function (title, fn) {
          return common.suite.skip({
            title: title,
            file: file,
            fn: fn
    Severity: Minor
    Found in packages/reflow-core/lib/interfaces/bdd.js and 1 other location - About 50 mins to fix
    packages/reflow-core/lib/interfaces/bdd.js on lines 120..126

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

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

    const getFlow = function(): Flow {
      const flowObjects: FlowObject = {};
      return {
        get(name: string, fallback: any): void {
          const flowObject = flowObjects[name];
    Severity: Minor
    Found in packages/reflow-client/src/commands/flow-variables.ts - About 45 mins 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 4 locations. Consider refactoring.
    Open

        it('executes basic trees', function(done) {
          console.log('=> Tree: basic start')
          const execution = executeTree(basicTree)
          
          execution.run(done)
    Severity: Major
    Found in packages/reflow-core/__test/execute.test.js and 3 other locations - About 35 mins to fix
    packages/reflow-core/__test/execute.test.js on lines 35..39
    packages/reflow-core/__test/execute.test.js on lines 40..44
    packages/reflow-core/__test/execute.test.js on lines 45..49

    Duplicated Code

    Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

    Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

    When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

    Tuning

    This issue has a mass of 47.

    We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

    The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

    If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

    See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

    Refactorings

    Further Reading

    Severity
    Category
    Status
    Source
    Language