ontohub/ontohub-backend

View on GitHub

Showing 61 of 71 total issues

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

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

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

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

  field :reasonerConfiguration, Types::ReasonerConfigurationType do
    description 'A ReasonerConfiguration'

    argument :id, !types.Int do
      description 'The id of the ReasonerConfiguration'
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 193..208
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 :signatureMorphism, Types::SignatureMorphismType do
    description 'A SignatureMorphism'

    argument :id, !types.Int do
      description 'The id of the SignatureMorphism'
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 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

    SignInMutation = GraphQL::Field.define do
      type Types::User::SessionTokenType
      description 'Signs in a user'

      argument :username, !types.String do
Severity: Minor
Found in app/graphql/mutations/account/sign_in_mutation.rb and 1 other location - About 35 mins to fix
app/graphql/mutations/account/reset_password_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

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

  field :generatedAxiom, Types::GeneratedAxiomType do
    description 'A GeneratedAxiom'

    argument :id, !types.Int do
      description 'The id of the GeneratedAxiom'
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 193..208
app/graphql/types/query_type.rb on lines 223..238
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 :premiseSelection, Types::PremiseSelectionType do
    description 'A PremiseSelection'

    argument :id, !types.Int do
      description 'The id of the PremiseSelection'
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 193..208
app/graphql/types/query_type.rb on lines 223..238
app/graphql/types/query_type.rb on lines 241..256

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::Repository::MembershipType = GraphQL::ObjectType.define do
  name 'RepositoryMembership'
  description 'The membership of a user in a repository'

  field :member, !Types::UserType do
Severity: Minor
Found in app/graphql/types/repository/membership_type.rb and 1 other location - About 35 mins to fix
app/graphql/types/organization/membership_type.rb on lines 3..16

Duplicated Code

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

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

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

Tuning

This issue has a mass of 34.

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