pupilfirst/pupilfirst

View on GitHub

Showing 104 of 226 total issues

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

      red: {
        50: 'rgb(var(--color-red-50) / <alpha-value>)',
        100: 'rgb(var(--color-red-100) / <alpha-value>)',
        200: 'rgb(var(--color-red-200) / <alpha-value>)',
        300: 'rgb(var(--color-red-300) / <alpha-value>)',
Severity: Major
Found in tailwind.config.js and 7 other locations - About 1 hr to fix
tailwind.config.js on lines 31..43
tailwind.config.js on lines 44..56
tailwind.config.js on lines 57..69
tailwind.config.js on lines 70..82
tailwind.config.js on lines 83..95
tailwind.config.js on lines 96..108
tailwind.config.js on lines 109..121

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

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

      primary: {
        50: 'rgb(var(--color-primary-50) / <alpha-value>)',
        100: 'rgb(var(--color-primary-100) / <alpha-value>)',
        200: 'rgb(var(--color-primary-200) / <alpha-value>)',
        300: 'rgb(var(--color-primary-300) / <alpha-value>)',
Severity: Major
Found in tailwind.config.js and 7 other locations - About 1 hr to fix
tailwind.config.js on lines 18..30
tailwind.config.js on lines 31..43
tailwind.config.js on lines 44..56
tailwind.config.js on lines 57..69
tailwind.config.js on lines 70..82
tailwind.config.js on lines 96..108
tailwind.config.js on lines 109..121

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

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

      gray: {
        50: 'rgb(var(--color-gray-50) / <alpha-value>)',
        100: 'rgb(var(--color-gray-100) / <alpha-value>)',
        200: 'rgb(var(--color-gray-200) / <alpha-value>)',
        300: 'rgb(var(--color-gray-300) / <alpha-value>)',
Severity: Major
Found in tailwind.config.js and 7 other locations - About 1 hr to fix
tailwind.config.js on lines 18..30
tailwind.config.js on lines 31..43
tailwind.config.js on lines 44..56
tailwind.config.js on lines 57..69
tailwind.config.js on lines 70..82
tailwind.config.js on lines 83..95
tailwind.config.js on lines 109..121

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

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

      blue: {
        50: 'rgb(var(--color-blue-50) / <alpha-value>)',
        100: 'rgb(var(--color-blue-100) / <alpha-value>)',
        200: 'rgb(var(--color-blue-200) / <alpha-value>)',
        300: 'rgb(var(--color-blue-300) / <alpha-value>)',
Severity: Major
Found in tailwind.config.js and 7 other locations - About 1 hr to fix
tailwind.config.js on lines 18..30
tailwind.config.js on lines 31..43
tailwind.config.js on lines 44..56
tailwind.config.js on lines 70..82
tailwind.config.js on lines 83..95
tailwind.config.js on lines 96..108
tailwind.config.js on lines 109..121

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

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

      orange: {
        50: 'rgb(var(--color-orange-50) / <alpha-value>)',
        100: 'rgb(var(--color-orange-100) / <alpha-value>)',
        200: 'rgb(var(--color-orange-200) / <alpha-value>)',
        300: 'rgb(var(--color-orange-300) / <alpha-value>)',
Severity: Major
Found in tailwind.config.js and 7 other locations - About 1 hr to fix
tailwind.config.js on lines 18..30
tailwind.config.js on lines 31..43
tailwind.config.js on lines 57..69
tailwind.config.js on lines 70..82
tailwind.config.js on lines 83..95
tailwind.config.js on lines 96..108
tailwind.config.js on lines 109..121

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

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

      green: {
        50: 'rgb(var(--color-green-50) / <alpha-value>)',
        100: 'rgb(var(--color-green-100) / <alpha-value>)',
        200: 'rgb(var(--color-green-200) / <alpha-value>)',
        300: 'rgb(var(--color-green-300) / <alpha-value>)',
Severity: Major
Found in tailwind.config.js and 7 other locations - About 1 hr to fix
tailwind.config.js on lines 18..30
tailwind.config.js on lines 31..43
tailwind.config.js on lines 44..56
tailwind.config.js on lines 57..69
tailwind.config.js on lines 83..95
tailwind.config.js on lines 96..108
tailwind.config.js on lines 109..121

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

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

      yellow: {
        50: 'rgb(var(--color-yellow-50) / <alpha-value>)',
        100: 'rgb(var(--color-yellow-100) / <alpha-value>)',
        200: 'rgb(var(--color-yellow-200) / <alpha-value>)',
        300: 'rgb(var(--color-yellow-300) / <alpha-value>)',
Severity: Major
Found in tailwind.config.js and 7 other locations - About 1 hr to fix
tailwind.config.js on lines 18..30
tailwind.config.js on lines 44..56
tailwind.config.js on lines 57..69
tailwind.config.js on lines 70..82
tailwind.config.js on lines 83..95
tailwind.config.js on lines 96..108
tailwind.config.js on lines 109..121

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

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

      focusColor: {
        50: 'rgb(var(--color-focusColor-50) / <alpha-value>)',
        100: 'rgb(var(--color-focusColor-100) / <alpha-value>)',
        200: 'rgb(var(--color-focusColor-200) / <alpha-value>)',
        300: 'rgb(var(--color-focusColor-300) / <alpha-value>)',
Severity: Major
Found in tailwind.config.js and 7 other locations - About 1 hr to fix
tailwind.config.js on lines 18..30
tailwind.config.js on lines 31..43
tailwind.config.js on lines 44..56
tailwind.config.js on lines 57..69
tailwind.config.js on lines 70..82
tailwind.config.js on lines 83..95
tailwind.config.js on lines 96..108

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

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

    def taggings
      BatchLoader::GraphQL
        .for(object.id)
        .batch do |user_ids, loader|
          tags =
Severity: Major
Found in app/graphql/types/user_type.rb and 1 other location - About 1 hr to fix
app/graphql/types/student_type.rb on lines 59..74

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

    def taggings
      BatchLoader::GraphQL
        .for(object.id)
        .batch do |student_ids, loader|
          tags =
Severity: Major
Found in app/graphql/types/student_type.rb and 1 other location - About 1 hr to fix
app/graphql/types/user_type.rb on lines 59..74

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

  class ArchiveCoachNote < GraphQL::Schema::Mutation
    argument :id, ID, required: true

    description "Archives a coach note for student"

Severity: Major
Found in app/graphql/mutations/archive_coach_note.rb and 4 other locations - About 1 hr to fix
app/graphql/mutations/create_topic_subscription.rb on lines 2..18
app/graphql/mutations/dropout_student.rb on lines 2..22
app/graphql/mutations/lock_topic.rb on lines 2..18
app/graphql/mutations/unlock_topic.rb on lines 2..18

Duplicated Code

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

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

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

Tuning

This issue has a mass of 49.

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

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

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

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

Refactorings

Further Reading

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

  class UnlockTopic < GraphQL::Schema::Mutation
    argument :id, ID, required: true

    description "Unlock a topic in community."

Severity: Major
Found in app/graphql/mutations/unlock_topic.rb and 4 other locations - About 1 hr to fix
app/graphql/mutations/archive_coach_note.rb on lines 2..18
app/graphql/mutations/create_topic_subscription.rb on lines 2..18
app/graphql/mutations/dropout_student.rb on lines 2..22
app/graphql/mutations/lock_topic.rb on lines 2..18

Duplicated Code

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

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

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

Tuning

This issue has a mass of 49.

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

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

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

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

Refactorings

Further Reading

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

  class LockTopic < GraphQL::Schema::Mutation
    argument :id, ID, required: true

    description "Lock a topic in community."

Severity: Major
Found in app/graphql/mutations/lock_topic.rb and 4 other locations - About 1 hr to fix
app/graphql/mutations/archive_coach_note.rb on lines 2..18
app/graphql/mutations/create_topic_subscription.rb on lines 2..18
app/graphql/mutations/dropout_student.rb on lines 2..22
app/graphql/mutations/unlock_topic.rb on lines 2..18

Duplicated Code

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

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

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

Tuning

This issue has a mass of 49.

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

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

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

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

Refactorings

Further Reading

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

  class DropoutStudent < GraphQL::Schema::Mutation
    argument :id, ID, required: true

    description 'Mark student as exited'

Severity: Major
Found in app/graphql/mutations/dropout_student.rb and 4 other locations - About 1 hr to fix
app/graphql/mutations/archive_coach_note.rb on lines 2..18
app/graphql/mutations/create_topic_subscription.rb on lines 2..18
app/graphql/mutations/lock_topic.rb on lines 2..18
app/graphql/mutations/unlock_topic.rb on lines 2..18

Duplicated Code

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

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

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

Tuning

This issue has a mass of 49.

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

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

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

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

Refactorings

Further Reading

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

  class CreateTopicSubscription < GraphQL::Schema::Mutation
    argument :topic_id, ID, required: true

    description "Create a topic subscription."

Severity: Major
Found in app/graphql/mutations/create_topic_subscription.rb and 4 other locations - About 1 hr to fix
app/graphql/mutations/archive_coach_note.rb on lines 2..18
app/graphql/mutations/dropout_student.rb on lines 2..22
app/graphql/mutations/lock_topic.rb on lines 2..18
app/graphql/mutations/unlock_topic.rb on lines 2..18

Duplicated Code

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

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

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

Tuning

This issue has a mass of 49.

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

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

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

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

Refactorings

Further Reading

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

  class DeleteCourseAuthor < GraphQL::Schema::Mutation
    argument :id, ID, required: true

    description "Delete a course author"

Severity: Major
Found in app/graphql/mutations/delete_course_author.rb and 1 other location - About 1 hr to fix
app/graphql/mutations/initiate_account_deletion.rb on lines 2..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 49.

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

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

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

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

Refactorings

Further Reading

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

  class InitiateAccountDeletion < GraphQL::Schema::Mutation
    argument :email, String, required: true

    description "Delete user account"

Severity: Major
Found in app/graphql/mutations/initiate_account_deletion.rb and 1 other location - About 1 hr to fix
app/graphql/mutations/delete_course_author.rb on lines 2..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 49.

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

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

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

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

Refactorings

Further Reading

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

  class DeleteCertificate < GraphQL::Schema::Mutation
    argument :id, ID, required: true

    description "Delete an un-issued certificate"

Severity: Major
Found in app/graphql/mutations/delete_certificate.rb and 2 other locations - About 1 hr to fix
app/graphql/mutations/mark_post_as_solution.rb on lines 2..21
app/graphql/mutations/unmark_post_as_solution.rb on lines 2..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 49.

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

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

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

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

Refactorings

Further Reading

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

  class MarkPostAsSolution < GraphQL::Schema::Mutation
    argument :id, ID, required: true

    description "Mark a community post as a solution"

Severity: Major
Found in app/graphql/mutations/mark_post_as_solution.rb and 2 other locations - About 1 hr to fix
app/graphql/mutations/delete_certificate.rb on lines 2..21
app/graphql/mutations/unmark_post_as_solution.rb on lines 2..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 49.

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

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

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

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

Refactorings

Further Reading

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

  class UnmarkPostAsSolution < GraphQL::Schema::Mutation
    argument :id, ID, required: true

    description "Unmark a community post as a solution"

Severity: Major
Found in app/graphql/mutations/unmark_post_as_solution.rb and 2 other locations - About 1 hr to fix
app/graphql/mutations/delete_certificate.rb on lines 2..21
app/graphql/mutations/mark_post_as_solution.rb on lines 2..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 49.

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

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

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

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

Refactorings

Further Reading

Severity
Category
Status
Source
Language