CLOSER-Cohorts/archivist

View on GitHub

Showing 2,591 of 2,591 total issues

Avoid deeply nested control flow statements.
Open

          elsif child.name == 'Loop'

            cc_l = CcLoop.new(urn: extract_urn_identifier(child))
            @instrument.cc_loops << cc_l
            start_node = child.at_xpath('./InitialValue/Command/CommandContent')
Severity: Major
Found in lib/importers/xml/ddi/instrument.rb - About 45 mins to fix

Method urn has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring.
Open

    def urn(urn_prefix = nil, urn_type = nil)
      instrument = (self.is_a?(Instrument)) ? self : self.instrument
      urn_prefix = ['urn', 'ddi', instrument.agency, instrument.prefix].join ':' if urn_prefix.nil?
      urn_type = self.class::URN_TYPE if urn_type.nil?
      # Use ddi_slug instead of id
Severity: Minor
Found in lib/exportable.rb - 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

Method read_response_domain has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring.
Open

    def read_response_domain(node)
      if node.name == 'CodeDomain'
      cl = ::CodeList.find_by_identifier(
        'urn',
        extract_urn_identifier(node.at_xpath('./CodeListReference'))
Severity: Minor
Found in lib/importers/xml/ddi/question.rb - 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

Method initialize has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring.
Open

    def initialize(thing, options)
      if thing.is_a? String
        @doc = open(thing) { |f| Importers::TXT::TabDelimited.new(f) }
      else
        document = ::Document.find thing
Severity: Minor
Found in lib/importers/txt.rb - 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

Avoid deeply nested control flow statements.
Open

            rescue
              if (label = child.at_xpath('./Label/Content')).nil?
                cc_c.label = label
              else
                cc_c.label = 'Missing label'
Severity: Major
Found in lib/importers/xml/ddi/instrument.rb - About 45 mins to fix

Avoid deeply nested control flow statements.
Open

            rescue
              cc_c.logic = ''
Severity: Major
Found in lib/importers/xml/ddi/instrument.rb - About 45 mins to fix

Method parse has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring.
Open

    def parse
      hash = {}
      matchers = { question_item: './QuestionItem', category: './Category', code_list: './CodeList', instruction: './Instruction'}

      @node.xpath('//Fragment').each do | n |
Severity: Minor
Found in lib/importers/xml/ddi/fragment_instance.rb - 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 3 locations. Consider refactoring.
Open

        <RFFSelect
          name="corner_label"
          label="Corner Label"
          formControlProps={{ margin: 'none' }}
        >
Severity: Major
Found in react/src/components/QuestionGridForm.js and 2 other locations - About 45 mins to fix
react/src/components/CcQuestionForm.js on lines 67..76
react/src/components/ResponseDomainNumericForm.js on lines 51..60

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

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

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

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

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

Refactorings

Further Reading

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

        <Select
          name="subtype"
          label="Type"
          formControlProps={{ margin: 'none' }}
          required={true}
Severity: Major
Found in react/src/components/ResponseDomainNumericForm.js and 2 other locations - About 45 mins to fix
react/src/components/CcQuestionForm.js on lines 67..76
react/src/components/QuestionGridForm.js on lines 125..133

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

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

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

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

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

Refactorings

Further Reading

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

        <Select
          name="question_type"
          label="Type"
          required={true}
          formControlProps={{ margin: 'none' }}
Severity: Major
Found in react/src/components/CcQuestionForm.js and 2 other locations - About 45 mins to fix
react/src/components/QuestionGridForm.js on lines 125..133
react/src/components/ResponseDomainNumericForm.js on lines 51..60

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

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

            <AuthRoute type="editor" exact path={routes.instruments.instrument.build.codeLists.new} component={InstrumentBuildCodeLists} />
Severity: Major
Found in react/src/App.js and 12 other locations - About 40 mins to fix
react/src/App.js on lines 105..105
react/src/App.js on lines 106..106
react/src/App.js on lines 108..108
react/src/App.js on lines 109..109
react/src/App.js on lines 110..110
react/src/App.js on lines 111..111
react/src/App.js on lines 112..112
react/src/App.js on lines 113..113
react/src/App.js on lines 114..114
react/src/App.js on lines 115..115
react/src/App.js on lines 116..116
react/src/App.js on lines 117..117

Duplicated Code

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

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

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

Tuning

This issue has a mass of 49.

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

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

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

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

Refactorings

Further Reading

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

            <AuthRoute type="editor" exact path={routes.instruments.instrument.build.questionGrids.show} component={InstrumentBuildQuestionGrids} />
Severity: Major
Found in react/src/App.js and 12 other locations - About 40 mins to fix
react/src/App.js on lines 105..105
react/src/App.js on lines 106..106
react/src/App.js on lines 107..107
react/src/App.js on lines 108..108
react/src/App.js on lines 109..109
react/src/App.js on lines 110..110
react/src/App.js on lines 111..111
react/src/App.js on lines 113..113
react/src/App.js on lines 114..114
react/src/App.js on lines 115..115
react/src/App.js on lines 116..116
react/src/App.js on lines 117..117

Duplicated Code

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

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

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

Tuning

This issue has a mass of 49.

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

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

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

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

Refactorings

Further Reading

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

            <AuthRoute type="editor" exact path={routes.instruments.instrument.build.codeLists.all} component={InstrumentBuildCodeLists} />
Severity: Major
Found in react/src/App.js and 12 other locations - About 40 mins to fix
react/src/App.js on lines 106..106
react/src/App.js on lines 107..107
react/src/App.js on lines 108..108
react/src/App.js on lines 109..109
react/src/App.js on lines 110..110
react/src/App.js on lines 111..111
react/src/App.js on lines 112..112
react/src/App.js on lines 113..113
react/src/App.js on lines 114..114
react/src/App.js on lines 115..115
react/src/App.js on lines 116..116
react/src/App.js on lines 117..117

Duplicated Code

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

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

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

Tuning

This issue has a mass of 49.

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

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

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

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

Refactorings

Further Reading

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

            <AuthRoute type="editor" exact path={routes.instruments.instrument.build.questionItems.show} component={InstrumentBuildQuestionItems} />
Severity: Major
Found in react/src/App.js and 12 other locations - About 40 mins to fix
react/src/App.js on lines 105..105
react/src/App.js on lines 106..106
react/src/App.js on lines 107..107
react/src/App.js on lines 108..108
react/src/App.js on lines 110..110
react/src/App.js on lines 111..111
react/src/App.js on lines 112..112
react/src/App.js on lines 113..113
react/src/App.js on lines 114..114
react/src/App.js on lines 115..115
react/src/App.js on lines 116..116
react/src/App.js on lines 117..117

Duplicated Code

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

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

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

Tuning

This issue has a mass of 49.

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

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

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

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

Refactorings

Further Reading

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

            <AuthRoute type="editor" exact path={routes.instruments.instrument.build.questionGrids.all} component={InstrumentBuildQuestionGrids} />
Severity: Major
Found in react/src/App.js and 12 other locations - About 40 mins to fix
react/src/App.js on lines 105..105
react/src/App.js on lines 106..106
react/src/App.js on lines 107..107
react/src/App.js on lines 108..108
react/src/App.js on lines 109..109
react/src/App.js on lines 110..110
react/src/App.js on lines 112..112
react/src/App.js on lines 113..113
react/src/App.js on lines 114..114
react/src/App.js on lines 115..115
react/src/App.js on lines 116..116
react/src/App.js on lines 117..117

Duplicated Code

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

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

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

Tuning

This issue has a mass of 49.

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

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

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

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

Refactorings

Further Reading

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

            <AuthRoute type="editor" exact path={routes.instruments.instrument.build.questionItems.all} component={InstrumentBuildQuestionItems} />
Severity: Major
Found in react/src/App.js and 12 other locations - About 40 mins to fix
react/src/App.js on lines 105..105
react/src/App.js on lines 106..106
react/src/App.js on lines 107..107
react/src/App.js on lines 109..109
react/src/App.js on lines 110..110
react/src/App.js on lines 111..111
react/src/App.js on lines 112..112
react/src/App.js on lines 113..113
react/src/App.js on lines 114..114
react/src/App.js on lines 115..115
react/src/App.js on lines 116..116
react/src/App.js on lines 117..117

Duplicated Code

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

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

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

Tuning

This issue has a mass of 49.

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

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

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

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

Refactorings

Further Reading

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

            <AuthRoute type="editor" exact path={routes.instruments.instrument.build.responseDomains.all} component={InstrumentBuildResponseDomains} />
Severity: Major
Found in react/src/App.js and 12 other locations - About 40 mins to fix
react/src/App.js on lines 105..105
react/src/App.js on lines 106..106
react/src/App.js on lines 107..107
react/src/App.js on lines 108..108
react/src/App.js on lines 109..109
react/src/App.js on lines 110..110
react/src/App.js on lines 111..111
react/src/App.js on lines 112..112
react/src/App.js on lines 113..113
react/src/App.js on lines 115..115
react/src/App.js on lines 116..116
react/src/App.js on lines 117..117

Duplicated Code

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

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

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

Tuning

This issue has a mass of 49.

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

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

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

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

Refactorings

Further Reading

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

            <AuthRoute type="editor" exact path={routes.instruments.instrument.build.constructs.show} component={InstrumentConstructBuild} />
Severity: Major
Found in react/src/App.js and 12 other locations - About 40 mins to fix
react/src/App.js on lines 105..105
react/src/App.js on lines 106..106
react/src/App.js on lines 107..107
react/src/App.js on lines 108..108
react/src/App.js on lines 109..109
react/src/App.js on lines 110..110
react/src/App.js on lines 111..111
react/src/App.js on lines 112..112
react/src/App.js on lines 113..113
react/src/App.js on lines 114..114
react/src/App.js on lines 115..115
react/src/App.js on lines 116..116

Duplicated Code

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

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

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

Tuning

This issue has a mass of 49.

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

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

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

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

Refactorings

Further Reading

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

            <AuthRoute type="editor" exact path={routes.instruments.instrument.build.questionGrids.new} component={InstrumentBuildQuestionGrids} />
Severity: Major
Found in react/src/App.js and 12 other locations - About 40 mins to fix
react/src/App.js on lines 105..105
react/src/App.js on lines 106..106
react/src/App.js on lines 107..107
react/src/App.js on lines 108..108
react/src/App.js on lines 109..109
react/src/App.js on lines 110..110
react/src/App.js on lines 111..111
react/src/App.js on lines 112..112
react/src/App.js on lines 114..114
react/src/App.js on lines 115..115
react/src/App.js on lines 116..116
react/src/App.js on lines 117..117

Duplicated Code

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

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

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

Tuning

This issue has a mass of 49.

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

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

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

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

Refactorings

Further Reading

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

            <AuthRoute type="editor" exact path={routes.instruments.instrument.build.questionItems.new} component={InstrumentBuildQuestionItems} />
Severity: Major
Found in react/src/App.js and 12 other locations - About 40 mins to fix
react/src/App.js on lines 105..105
react/src/App.js on lines 106..106
react/src/App.js on lines 107..107
react/src/App.js on lines 108..108
react/src/App.js on lines 109..109
react/src/App.js on lines 111..111
react/src/App.js on lines 112..112
react/src/App.js on lines 113..113
react/src/App.js on lines 114..114
react/src/App.js on lines 115..115
react/src/App.js on lines 116..116
react/src/App.js on lines 117..117

Duplicated Code

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

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

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

Tuning

This issue has a mass of 49.

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

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

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

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

Refactorings

Further Reading

Severity
Category
Status
Source
Language