ontohub/ontohub-backend

View on GitHub

Showing 71 of 71 total issues

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

  field :sentences, !types[!Types::SentenceType] do
    description 'The Sentences in which this Symbol occurs'

    argument :limit, types.Int do
      description 'Maximum number of entries to list'
Severity: Major
Found in app/graphql/types/symbol_type.rb and 7 other locations - About 1 hr to fix
app/graphql/types/language_type.rb on lines 65..81
app/graphql/types/oms_type.rb on lines 137..154
app/graphql/types/oms_type.rb on lines 158..174
app/graphql/types/premise_selection_type.rb on lines 16..32
app/graphql/types/sine_premise_selection_type.rb on lines 29..45
app/graphql/types/sine_premise_selection_type.rb on lines 49..68
app/graphql/types/symbol_type.rb on lines 38..54

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

  field :consistencyCheckAttempts,
    !types[!Types::ConsistencyCheckAttemptType] do
    description "The attempts to check this OMS's consistency"

    argument :limit, types.Int do
Severity: Major
Found in app/graphql/types/oms_type.rb and 7 other locations - About 1 hr to fix
app/graphql/types/language_type.rb on lines 65..81
app/graphql/types/oms_type.rb on lines 158..174
app/graphql/types/premise_selection_type.rb on lines 16..32
app/graphql/types/sine_premise_selection_type.rb on lines 29..45
app/graphql/types/sine_premise_selection_type.rb on lines 49..68
app/graphql/types/symbol_type.rb on lines 18..34
app/graphql/types/symbol_type.rb on lines 38..54

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

  field :sineSymbolPremiseTriggers,
    !types[!Types::SineSymbolPremiseTriggerType] do
    description <<~DESCRIPTION
      Shows the tolerance needed for a Symbol to trigger (select) a premise
    DESCRIPTION
Severity: Major
Found in app/graphql/types/sine_premise_selection_type.rb and 7 other locations - About 1 hr to fix
app/graphql/types/language_type.rb on lines 65..81
app/graphql/types/oms_type.rb on lines 137..154
app/graphql/types/oms_type.rb on lines 158..174
app/graphql/types/premise_selection_type.rb on lines 16..32
app/graphql/types/sine_premise_selection_type.rb on lines 29..45
app/graphql/types/symbol_type.rb on lines 18..34
app/graphql/types/symbol_type.rb on lines 38..54

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

  field :logics, !types[!Types::LogicType] do
    description 'The logics of this Language'

    argument :limit, types.Int do
      description 'Maximum number of entries to list'
Severity: Major
Found in app/graphql/types/language_type.rb and 7 other locations - About 1 hr to fix
app/graphql/types/oms_type.rb on lines 137..154
app/graphql/types/oms_type.rb on lines 158..174
app/graphql/types/premise_selection_type.rb on lines 16..32
app/graphql/types/sine_premise_selection_type.rb on lines 29..45
app/graphql/types/sine_premise_selection_type.rb on lines 49..68
app/graphql/types/symbol_type.rb on lines 18..34
app/graphql/types/symbol_type.rb on lines 38..54

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

  field :signatures, !types[!Types::SignatureType] do
    description 'The Signatures in which this Symbol occurs'

    argument :limit, types.Int do
      description 'Maximum number of entries to list'
Severity: Major
Found in app/graphql/types/symbol_type.rb and 7 other locations - About 1 hr to fix
app/graphql/types/language_type.rb on lines 65..81
app/graphql/types/oms_type.rb on lines 137..154
app/graphql/types/oms_type.rb on lines 158..174
app/graphql/types/premise_selection_type.rb on lines 16..32
app/graphql/types/sine_premise_selection_type.rb on lines 29..45
app/graphql/types/sine_premise_selection_type.rb on lines 49..68
app/graphql/types/symbol_type.rb on lines 18..34

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

  field :selectedPremises, !types[!Types::SentenceType] do
    description 'The selected premises'

    argument :limit, types.Int do
      description 'Maximum number of entries to list'
Severity: Major
Found in app/graphql/types/premise_selection_type.rb and 7 other locations - About 1 hr to fix
app/graphql/types/language_type.rb on lines 65..81
app/graphql/types/oms_type.rb on lines 137..154
app/graphql/types/oms_type.rb on lines 158..174
app/graphql/types/sine_premise_selection_type.rb on lines 29..45
app/graphql/types/sine_premise_selection_type.rb on lines 49..68
app/graphql/types/symbol_type.rb on lines 18..34
app/graphql/types/symbol_type.rb on lines 38..54

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

  field :sentences, !types[!Types::SentenceType] do
    description 'All sentneces in this OMS'

    argument :limit, types.Int do
      description 'Maximum number of entries to list'
Severity: Major
Found in app/graphql/types/oms_type.rb and 7 other locations - About 1 hr to fix
app/graphql/types/language_type.rb on lines 65..81
app/graphql/types/oms_type.rb on lines 137..154
app/graphql/types/premise_selection_type.rb on lines 16..32
app/graphql/types/sine_premise_selection_type.rb on lines 29..45
app/graphql/types/sine_premise_selection_type.rb on lines 49..68
app/graphql/types/symbol_type.rb on lines 18..34
app/graphql/types/symbol_type.rb on lines 38..54

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

  field :sineSymbolCommonnesses, !types[!Types::SineSymbolCommonnessType] do
    description 'Shows in how many Sentences of the OMS a Symbol occurs'

    argument :limit, types.Int do
      description 'Maximum number of entries to list'
Severity: Major
Found in app/graphql/types/sine_premise_selection_type.rb and 7 other locations - About 1 hr to fix
app/graphql/types/language_type.rb on lines 65..81
app/graphql/types/oms_type.rb on lines 137..154
app/graphql/types/oms_type.rb on lines 158..174
app/graphql/types/premise_selection_type.rb on lines 16..32
app/graphql/types/sine_premise_selection_type.rb on lines 49..68
app/graphql/types/symbol_type.rb on lines 18..34
app/graphql/types/symbol_type.rb on lines 38..54

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

Method instrument has 27 lines of code (exceeds 25 allowed). Consider refactoring.
Open

    def instrument(_type, field)
      # rubocop:enable Metrics/MethodLength
      # rubocop:enable Metrics/AbcSize
      old_resolve = field.resolve_proc
      field.redefine do
Severity: Minor
Found in app/graphql/instrumenters/validation_error_instrumenter.rb - About 1 hr to fix

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

          when :rename_and_update
            # `path` from the GraphQL API is mapped to `previous_path` of
            # Bringit.
            if file[:previous_path].blank?
              @errors.add("#{prefix}path", 'must be present')
    Severity: Minor
    Found in app/models/multi_blob.rb and 1 other location - About 55 mins to fix
    app/models/multi_blob.rb on lines 153..163

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

    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

          when :rename
            # `path` from the GraphQL API is mapped to `previous_path` of
            # Bringit.
            if file[:previous_path].blank?
              @errors.add("#{prefix}path", 'must be present')
    Severity: Minor
    Found in app/models/multi_blob.rb and 1 other location - About 55 mins to fix
    app/models/multi_blob.rb on lines 142..152

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

    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

    Method instrument has a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring.
    Open

        def instrument(_type, field)
          # rubocop:enable Metrics/MethodLength
          # rubocop:enable Metrics/AbcSize
          old_resolve = field.resolve_proc
          field.redefine do
    Severity: Minor
    Found in app/graphql/instrumenters/validation_error_instrumenter.rb - 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

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

    module Mutations
      module Account
        ResendConfirmationEmailMutation = GraphQL::Field.define do
          type !types.Boolean
          description 'Resends the confirmation email to a user'
    app/graphql/mutations/account/resend_password_reset_email_mutation.rb on lines 5..35
    app/graphql/mutations/account/resend_unlock_account_email_mutation.rb on lines 5..35

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

    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

    module Mutations
      module Account
        ResendPasswordResetEmailMutation = GraphQL::Field.define do
          type !types.Boolean
          description 'Resends the password reset email to a user'
    app/graphql/mutations/account/resend_confirmation_email_mutation.rb on lines 5..35
    app/graphql/mutations/account/resend_unlock_account_email_mutation.rb on lines 5..35

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

    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

    module Mutations
      module Account
        ResendUnlockAccountEmailMutation = GraphQL::Field.define do
          type !types.Boolean
          description 'Resends the unlock account email to a user'
    app/graphql/mutations/account/resend_confirmation_email_mutation.rb on lines 5..35
    app/graphql/mutations/account/resend_password_reset_email_mutation.rb on lines 5..35

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

    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

      field :reasoningAttempt, Types::ReasoningAttemptType do
        description 'A ReasoningAttempt'
    
        argument :id, !types.Int do
          description 'The id of the ReasoningAttempt'
    Severity: Major
    Found in app/graphql/types/query_type.rb and 5 other locations - About 35 mins to fix
    app/graphql/types/query_type.rb on lines 157..172
    app/graphql/types/query_type.rb on lines 175..190
    app/graphql/types/query_type.rb on lines 223..238
    app/graphql/types/query_type.rb on lines 241..256
    app/graphql/types/query_type.rb on lines 259..274

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

    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

      field :signature, Types::SignatureType do
        description 'A Signature'
    
        argument :id, !types.Int do
          description 'The id of the Signature'
    Severity: Major
    Found in app/graphql/types/query_type.rb and 5 other locations - About 35 mins to fix
    app/graphql/types/query_type.rb on lines 175..190
    app/graphql/types/query_type.rb on lines 193..208
    app/graphql/types/query_type.rb on lines 223..238
    app/graphql/types/query_type.rb on lines 241..256
    app/graphql/types/query_type.rb on lines 259..274

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

    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

    Types::ReasonerOutputType = GraphQL::ObjectType.define do
      name 'ReasonerOutput'
      description 'The output of a Reasoner'
    
      field :reasoningAttempt, !Types::ReasoningAttemptType do
    Severity: Minor
    Found in app/graphql/types/reasoner_output_type.rb and 1 other location - About 35 mins to fix
    app/graphql/types/sine_symbol_commonness_type.rb on lines 3..17

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

    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

    Types::SineSymbolCommonnessType = GraphQL::ObjectType.define do
      name 'SineSymbolCommonness'
      description 'Shows in how many Sentences of the OMS a Symbol occurs'
    
      field :sinePremiseSelection, !Types::SinePremiseSelectionType do
    Severity: Minor
    Found in app/graphql/types/sine_symbol_commonness_type.rb and 1 other location - About 35 mins to fix
    app/graphql/types/reasoner_output_type.rb on lines 3..17

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

    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

        ResetPasswordMutation = GraphQL::Field.define do
          type Types::User::SessionTokenType
          description "Resets a user's password"
    
          argument :password, !types.String do
    Severity: Minor
    Found in app/graphql/mutations/account/reset_password_mutation.rb and 1 other location - About 35 mins to fix
    app/graphql/mutations/account/sign_in_mutation.rb on lines 7..21

    Duplicated Code

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

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

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

    Tuning

    This issue has a mass of 36.

    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