datacite/lupo

View on GitHub

Showing 575 of 596 total issues

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

  field :book_chapters, BookChapterConnectionWithTotalType, null: false do
    argument :query, String, required: false
    argument :ids, [String], required: false
    argument :published, String, required: false
    argument :user_id, String, required: false
Severity: Major
Found in app/graphql/types/query_type.rb and 21 other locations - About 5 hrs to fix
app/graphql/types/query_type.rb on lines 299..326
app/graphql/types/query_type.rb on lines 341..368
app/graphql/types/query_type.rb on lines 383..410
app/graphql/types/query_type.rb on lines 425..452
app/graphql/types/query_type.rb on lines 467..494
app/graphql/types/query_type.rb on lines 549..576
app/graphql/types/query_type.rb on lines 591..618
app/graphql/types/query_type.rb on lines 633..660
app/graphql/types/query_type.rb on lines 675..702
app/graphql/types/query_type.rb on lines 760..787
app/graphql/types/query_type.rb on lines 802..829
app/graphql/types/query_type.rb on lines 844..871
app/graphql/types/query_type.rb on lines 886..913
app/graphql/types/query_type.rb on lines 929..956
app/graphql/types/query_type.rb on lines 972..999
app/graphql/types/query_type.rb on lines 1015..1042
app/graphql/types/query_type.rb on lines 1058..1085
app/graphql/types/query_type.rb on lines 1144..1171
app/graphql/types/query_type.rb on lines 1187..1214
app/graphql/types/query_type.rb on lines 1230..1257
app/graphql/types/query_type.rb on lines 1273..1300

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

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

  field :workflows, WorkflowConnectionWithTotalType, null: false do
    argument :query, String, required: false
    argument :ids, [String], required: false
    argument :published, String, required: false
    argument :user_id, String, required: false
Severity: Major
Found in app/graphql/types/query_type.rb and 21 other locations - About 5 hrs to fix
app/graphql/types/query_type.rb on lines 299..326
app/graphql/types/query_type.rb on lines 341..368
app/graphql/types/query_type.rb on lines 383..410
app/graphql/types/query_type.rb on lines 425..452
app/graphql/types/query_type.rb on lines 467..494
app/graphql/types/query_type.rb on lines 549..576
app/graphql/types/query_type.rb on lines 591..618
app/graphql/types/query_type.rb on lines 633..660
app/graphql/types/query_type.rb on lines 675..702
app/graphql/types/query_type.rb on lines 760..787
app/graphql/types/query_type.rb on lines 802..829
app/graphql/types/query_type.rb on lines 886..913
app/graphql/types/query_type.rb on lines 929..956
app/graphql/types/query_type.rb on lines 972..999
app/graphql/types/query_type.rb on lines 1015..1042
app/graphql/types/query_type.rb on lines 1058..1085
app/graphql/types/query_type.rb on lines 1101..1128
app/graphql/types/query_type.rb on lines 1144..1171
app/graphql/types/query_type.rb on lines 1187..1214
app/graphql/types/query_type.rb on lines 1230..1257
app/graphql/types/query_type.rb on lines 1273..1300

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

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

  field :models, ModelConnectionWithTotalType, null: false do
    argument :query, String, required: false
    argument :ids, [String], required: false
    argument :published, String, required: false
    argument :user_id, String, required: false
Severity: Major
Found in app/graphql/types/query_type.rb and 21 other locations - About 5 hrs to fix
app/graphql/types/query_type.rb on lines 299..326
app/graphql/types/query_type.rb on lines 341..368
app/graphql/types/query_type.rb on lines 383..410
app/graphql/types/query_type.rb on lines 425..452
app/graphql/types/query_type.rb on lines 467..494
app/graphql/types/query_type.rb on lines 549..576
app/graphql/types/query_type.rb on lines 591..618
app/graphql/types/query_type.rb on lines 675..702
app/graphql/types/query_type.rb on lines 760..787
app/graphql/types/query_type.rb on lines 802..829
app/graphql/types/query_type.rb on lines 844..871
app/graphql/types/query_type.rb on lines 886..913
app/graphql/types/query_type.rb on lines 929..956
app/graphql/types/query_type.rb on lines 972..999
app/graphql/types/query_type.rb on lines 1015..1042
app/graphql/types/query_type.rb on lines 1058..1085
app/graphql/types/query_type.rb on lines 1101..1128
app/graphql/types/query_type.rb on lines 1144..1171
app/graphql/types/query_type.rb on lines 1187..1214
app/graphql/types/query_type.rb on lines 1230..1257
app/graphql/types/query_type.rb on lines 1273..1300

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

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

  field :conference_papers, ConferencePaperConnectionWithTotalType, null: false do
    argument :query, String, required: false
    argument :ids, [String], required: false
    argument :published, String, required: false
    argument :user_id, String, required: false
Severity: Major
Found in app/graphql/types/query_type.rb and 21 other locations - About 5 hrs to fix
app/graphql/types/query_type.rb on lines 299..326
app/graphql/types/query_type.rb on lines 341..368
app/graphql/types/query_type.rb on lines 383..410
app/graphql/types/query_type.rb on lines 425..452
app/graphql/types/query_type.rb on lines 467..494
app/graphql/types/query_type.rb on lines 549..576
app/graphql/types/query_type.rb on lines 591..618
app/graphql/types/query_type.rb on lines 633..660
app/graphql/types/query_type.rb on lines 675..702
app/graphql/types/query_type.rb on lines 760..787
app/graphql/types/query_type.rb on lines 802..829
app/graphql/types/query_type.rb on lines 844..871
app/graphql/types/query_type.rb on lines 886..913
app/graphql/types/query_type.rb on lines 929..956
app/graphql/types/query_type.rb on lines 972..999
app/graphql/types/query_type.rb on lines 1015..1042
app/graphql/types/query_type.rb on lines 1101..1128
app/graphql/types/query_type.rb on lines 1144..1171
app/graphql/types/query_type.rb on lines 1187..1214
app/graphql/types/query_type.rb on lines 1230..1257
app/graphql/types/query_type.rb on lines 1273..1300

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

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

  field :books, BookConnectionWithTotalType, null: false do
    argument :query, String, required: false
    argument :ids, [String], required: false
    argument :published, String, required: false
    argument :user_id, String, required: false
Severity: Major
Found in app/graphql/types/query_type.rb and 21 other locations - About 5 hrs to fix
app/graphql/types/query_type.rb on lines 299..326
app/graphql/types/query_type.rb on lines 341..368
app/graphql/types/query_type.rb on lines 383..410
app/graphql/types/query_type.rb on lines 425..452
app/graphql/types/query_type.rb on lines 467..494
app/graphql/types/query_type.rb on lines 549..576
app/graphql/types/query_type.rb on lines 591..618
app/graphql/types/query_type.rb on lines 633..660
app/graphql/types/query_type.rb on lines 675..702
app/graphql/types/query_type.rb on lines 760..787
app/graphql/types/query_type.rb on lines 802..829
app/graphql/types/query_type.rb on lines 844..871
app/graphql/types/query_type.rb on lines 886..913
app/graphql/types/query_type.rb on lines 929..956
app/graphql/types/query_type.rb on lines 972..999
app/graphql/types/query_type.rb on lines 1015..1042
app/graphql/types/query_type.rb on lines 1058..1085
app/graphql/types/query_type.rb on lines 1101..1128
app/graphql/types/query_type.rb on lines 1187..1214
app/graphql/types/query_type.rb on lines 1230..1257
app/graphql/types/query_type.rb on lines 1273..1300

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

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

  field :physical_objects, PhysicalObjectConnectionWithTotalType, null: false do
    argument :query, String, required: false
    argument :ids, [String], required: false
    argument :published, String, required: false
    argument :user_id, String, required: false
Severity: Major
Found in app/graphql/types/query_type.rb and 21 other locations - About 5 hrs to fix
app/graphql/types/query_type.rb on lines 299..326
app/graphql/types/query_type.rb on lines 341..368
app/graphql/types/query_type.rb on lines 383..410
app/graphql/types/query_type.rb on lines 425..452
app/graphql/types/query_type.rb on lines 467..494
app/graphql/types/query_type.rb on lines 549..576
app/graphql/types/query_type.rb on lines 591..618
app/graphql/types/query_type.rb on lines 633..660
app/graphql/types/query_type.rb on lines 760..787
app/graphql/types/query_type.rb on lines 802..829
app/graphql/types/query_type.rb on lines 844..871
app/graphql/types/query_type.rb on lines 886..913
app/graphql/types/query_type.rb on lines 929..956
app/graphql/types/query_type.rb on lines 972..999
app/graphql/types/query_type.rb on lines 1015..1042
app/graphql/types/query_type.rb on lines 1058..1085
app/graphql/types/query_type.rb on lines 1101..1128
app/graphql/types/query_type.rb on lines 1144..1171
app/graphql/types/query_type.rb on lines 1187..1214
app/graphql/types/query_type.rb on lines 1230..1257
app/graphql/types/query_type.rb on lines 1273..1300

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

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

File repository_type.rb has 375 lines of code (exceeds 250 allowed). Consider refactoring.
Open

class RepositoryType < BaseObject
  description "Information about repositories"
  field :uid,
        ID,
        null: false,
Severity: Minor
Found in app/graphql/types/repository_type.rb - About 5 hrs to fix

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

      field :part_of,
            WorkConnectionWithTotalType,
            null: true,
            max_page_size: 100,
            description: "The DOI is a part of this DOI." do
    Severity: Major
    Found in app/graphql/types/doi_item.rb and 6 other locations - About 4 hrs to fix
    app/graphql/types/doi_item.rb on lines 223..253
    app/graphql/types/doi_item.rb on lines 255..285
    app/graphql/types/doi_item.rb on lines 287..317
    app/graphql/types/doi_item.rb on lines 338..366
    app/graphql/types/doi_item.rb on lines 400..428
    app/graphql/types/doi_item.rb on lines 430..460

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

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

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

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

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

    Refactorings

    Further Reading

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

      field :other_related,
           WorkConnectionWithTotalType,
           null: true,
           max_page_size: 100,
           description: "Other works related to this DOI." do
    Severity: Major
    Found in app/graphql/types/doi_item.rb and 6 other locations - About 4 hrs to fix
    app/graphql/types/doi_item.rb on lines 223..253
    app/graphql/types/doi_item.rb on lines 255..285
    app/graphql/types/doi_item.rb on lines 338..366
    app/graphql/types/doi_item.rb on lines 368..398
    app/graphql/types/doi_item.rb on lines 400..428
    app/graphql/types/doi_item.rb on lines 430..460

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

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

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

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

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

    Refactorings

    Further Reading

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

      field :versions,
            WorkConnectionWithTotalType,
            null: true, max_page_size: 100, description: "Versions of this DOI." do
        argument :query, String, required: false
        argument :ids, [String], required: false
    Severity: Major
    Found in app/graphql/types/doi_item.rb and 6 other locations - About 4 hrs to fix
    app/graphql/types/doi_item.rb on lines 223..253
    app/graphql/types/doi_item.rb on lines 255..285
    app/graphql/types/doi_item.rb on lines 287..317
    app/graphql/types/doi_item.rb on lines 338..366
    app/graphql/types/doi_item.rb on lines 368..398
    app/graphql/types/doi_item.rb on lines 430..460

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

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

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

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

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

    Refactorings

    Further Reading

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

      field :version_of,
            WorkConnectionWithTotalType,
            null: true,
            max_page_size: 100,
            description: "The DOI is a version of this DOI." do
    Severity: Major
    Found in app/graphql/types/doi_item.rb and 6 other locations - About 4 hrs to fix
    app/graphql/types/doi_item.rb on lines 223..253
    app/graphql/types/doi_item.rb on lines 255..285
    app/graphql/types/doi_item.rb on lines 287..317
    app/graphql/types/doi_item.rb on lines 338..366
    app/graphql/types/doi_item.rb on lines 368..398
    app/graphql/types/doi_item.rb on lines 400..428

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

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

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

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

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

    Refactorings

    Further Reading

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

      field :references,
            WorkConnectionWithTotalType,
            null: true,
            max_page_size: 100,
            description: "References for this DOI" do
    Severity: Major
    Found in app/graphql/types/doi_item.rb and 6 other locations - About 4 hrs to fix
    app/graphql/types/doi_item.rb on lines 255..285
    app/graphql/types/doi_item.rb on lines 287..317
    app/graphql/types/doi_item.rb on lines 338..366
    app/graphql/types/doi_item.rb on lines 368..398
    app/graphql/types/doi_item.rb on lines 400..428
    app/graphql/types/doi_item.rb on lines 430..460

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

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

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

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

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

    Refactorings

    Further Reading

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

      field :citations,
            WorkConnectionWithTotalType,
            null: true,
            max_page_size: 100,
            description: "Citations for this DOI." do
    Severity: Major
    Found in app/graphql/types/doi_item.rb and 6 other locations - About 4 hrs to fix
    app/graphql/types/doi_item.rb on lines 223..253
    app/graphql/types/doi_item.rb on lines 287..317
    app/graphql/types/doi_item.rb on lines 338..366
    app/graphql/types/doi_item.rb on lines 368..398
    app/graphql/types/doi_item.rb on lines 400..428
    app/graphql/types/doi_item.rb on lines 430..460

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

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

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

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

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

    Refactorings

    Further Reading

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

      field :parts,
            WorkConnectionWithTotalType,
            null: true, max_page_size: 100, description: "Parts of this DOI." do
        argument :query, String, required: false
        argument :ids, [String], required: false
    Severity: Major
    Found in app/graphql/types/doi_item.rb and 6 other locations - About 4 hrs to fix
    app/graphql/types/doi_item.rb on lines 223..253
    app/graphql/types/doi_item.rb on lines 255..285
    app/graphql/types/doi_item.rb on lines 287..317
    app/graphql/types/doi_item.rb on lines 368..398
    app/graphql/types/doi_item.rb on lines 400..428
    app/graphql/types/doi_item.rb on lines 430..460

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

    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

      field :publications,
            PublicationConnectionWithTotalType,
            null: true, description: "Publications managed by the repository" do
        argument :query, String, required: false
        argument :ids, String, required: false
    Severity: Major
    Found in app/graphql/types/repository_type.rb and 2 other locations - About 4 hrs to fix
    app/graphql/types/repository_type.rb on lines 134..162
    app/graphql/types/repository_type.rb on lines 194..222

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

    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

      field :softwares,
            SoftwareConnectionWithTotalType,
            null: true, description: "Software managed by the repository" do
        argument :query, String, required: false
        argument :ids, String, required: false
    Severity: Major
    Found in app/graphql/types/repository_type.rb and 2 other locations - About 4 hrs to fix
    app/graphql/types/repository_type.rb on lines 134..162
    app/graphql/types/repository_type.rb on lines 164..192

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

    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

      field :datasets,
            DatasetConnectionWithTotalType,
            null: true, description: "Datasets managed by the repository" do
        argument :query, String, required: false
        argument :ids, String, required: false
    Severity: Major
    Found in app/graphql/types/repository_type.rb and 2 other locations - About 4 hrs to fix
    app/graphql/types/repository_type.rb on lines 164..192
    app/graphql/types/repository_type.rb on lines 194..222

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

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

      def index
        sort =
          case params[:sort]
          when "relevance"
            { "_score" => { order: "desc" } }
    Severity: Major
    Found in app/controllers/activities_controller.rb - About 4 hrs to fix

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

        field :works,
              WorkConnectionWithTotalType,
              null: true, description: "Works by this provider." do
          argument :query, String, required: false
          argument :ids, [String], required: false
      Severity: Major
      Found in app/graphql/types/member_type.rb and 5 other locations - About 4 hrs to fix
      app/graphql/types/funder_type.rb on lines 25..52
      app/graphql/types/funder_type.rb on lines 54..81
      app/graphql/types/funder_type.rb on lines 83..110
      app/graphql/types/funder_type.rb on lines 112..140
      app/graphql/types/repository_type.rb on lines 224..252

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

      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 :data_management_plans,
              DataManagementPlanConnectionWithTotalType,
              null: true,
              description: "Data management plans from this organization" do
          argument :query, String, required: false
      Severity: Major
      Found in app/graphql/types/repository_type.rb and 5 other locations - About 4 hrs to fix
      app/graphql/types/funder_type.rb on lines 25..52
      app/graphql/types/funder_type.rb on lines 54..81
      app/graphql/types/funder_type.rb on lines 83..110
      app/graphql/types/funder_type.rb on lines 112..140
      app/graphql/types/member_type.rb on lines 163..190

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

      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