MiniDigger/Hangar

View on GitHub

Showing 518 of 518 total issues

Constructor has 6 arguments (exceeds 4 allowed). Consider refactoring.
Open

      implicit val service: ModelService[F],
      config: OreConfig,
      auth: SpongeAuthApi[F],
      F: Sync[F],
      par: Parallel[F, G],
Severity: Minor
Found in orePlayCommon/app/db/impl/access/OrganizationBase.scala - About 45 mins to fix

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

            this.$element.on(eventOut + '.' + this.type, this.options.selector, $.proxy(this.leave, this))
    Severity: Minor
    Found in ore/public/bootstrap/js/bootstrap.js and 1 other location - About 45 mins to fix
    ore/public/bootstrap/js/bootstrap.js on lines 1068..1068

    Duplicated Code

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

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

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

    Tuning

    This issue has a mass of 50.

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

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

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

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

    Refactorings

    Further Reading

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

              _ <- roles
                .filter(_.role == Role.OrganizationOwner)
                .toVector
                .parTraverse(role => service.update(role)(_.copy(role = Role.OrganizationAdmin)))
    models/src/main/scala/ore/models/project/Project.scala on lines 212..215

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

    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

            _ <- ownerRoles
              .filter(_.role == Role.ProjectOwner)
              .toVector
              .parTraverse(role => service.update(role)(_.copy(role = Role.ProjectDeveloper)))
    Severity: Minor
    Found in models/src/main/scala/ore/models/project/Project.scala and 1 other location - About 45 mins to fix
    models/src/main/scala/ore/models/organization/Organization.scala on lines 70..73

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

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

        def channels[V[_, _]: QueryView](view: V[ChannelTable, Model[Channel]]): V[ChannelTable, Model[Channel]] =
          view.filterView(_.projectId === self.id.value)
    Severity: Major
    Found in models/src/main/scala/ore/models/project/Project.scala and 14 other locations - About 45 mins to fix
    models/src/main/scala/ore/models/project/Channel.scala on lines 59..60
    models/src/main/scala/ore/models/project/Project.scala on lines 303..306
    models/src/main/scala/ore/models/project/Project.scala on lines 327..328
    models/src/main/scala/ore/models/project/Project.scala on lines 357..358
    models/src/main/scala/ore/models/project/Project.scala on lines 365..366
    models/src/main/scala/ore/models/project/Project.scala on lines 376..379
    models/src/main/scala/ore/models/project/Version.scala on lines 179..182
    models/src/main/scala/ore/models/project/Version.scala on lines 210..211
    models/src/main/scala/ore/models/user/User.scala on lines 167..170
    models/src/main/scala/ore/models/user/User.scala on lines 177..180
    models/src/main/scala/ore/models/user/User.scala on lines 187..190
    models/src/main/scala/ore/models/user/User.scala on lines 197..200
    models/src/main/scala/ore/models/user/User.scala on lines 216..217
    models/src/main/scala/ore/models/user/User.scala on lines 237..240

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

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

        def pages[V[_, _]: QueryView](view: V[PageTable, Model[Page]]): V[PageTable, Model[Page]] =
          view.filterView(_.projectId === self.id.value)
    Severity: Major
    Found in models/src/main/scala/ore/models/project/Project.scala and 14 other locations - About 45 mins to fix
    models/src/main/scala/ore/models/project/Channel.scala on lines 59..60
    models/src/main/scala/ore/models/project/Project.scala on lines 303..306
    models/src/main/scala/ore/models/project/Project.scala on lines 327..328
    models/src/main/scala/ore/models/project/Project.scala on lines 349..350
    models/src/main/scala/ore/models/project/Project.scala on lines 357..358
    models/src/main/scala/ore/models/project/Project.scala on lines 376..379
    models/src/main/scala/ore/models/project/Version.scala on lines 179..182
    models/src/main/scala/ore/models/project/Version.scala on lines 210..211
    models/src/main/scala/ore/models/user/User.scala on lines 167..170
    models/src/main/scala/ore/models/user/User.scala on lines 177..180
    models/src/main/scala/ore/models/user/User.scala on lines 187..190
    models/src/main/scala/ore/models/user/User.scala on lines 197..200
    models/src/main/scala/ore/models/user/User.scala on lines 216..217
    models/src/main/scala/ore/models/user/User.scala on lines 237..240

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

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

        def views[V[_, _]: QueryView](
            view: V[ProjectViewsTable, Model[ProjectView]]
        ): V[ProjectViewsTable, Model[ProjectView]] =
          view.filterView(_.modelId === self.id.value)
    Severity: Major
    Found in models/src/main/scala/ore/models/project/Project.scala and 14 other locations - About 45 mins to fix
    models/src/main/scala/ore/models/project/Channel.scala on lines 59..60
    models/src/main/scala/ore/models/project/Project.scala on lines 327..328
    models/src/main/scala/ore/models/project/Project.scala on lines 349..350
    models/src/main/scala/ore/models/project/Project.scala on lines 357..358
    models/src/main/scala/ore/models/project/Project.scala on lines 365..366
    models/src/main/scala/ore/models/project/Project.scala on lines 376..379
    models/src/main/scala/ore/models/project/Version.scala on lines 179..182
    models/src/main/scala/ore/models/project/Version.scala on lines 210..211
    models/src/main/scala/ore/models/user/User.scala on lines 167..170
    models/src/main/scala/ore/models/user/User.scala on lines 177..180
    models/src/main/scala/ore/models/user/User.scala on lines 187..190
    models/src/main/scala/ore/models/user/User.scala on lines 197..200
    models/src/main/scala/ore/models/user/User.scala on lines 216..217
    models/src/main/scala/ore/models/user/User.scala on lines 237..240

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

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

        def flags[V[_, _]: QueryView](view: V[FlagTable, Model[Flag]]): V[FlagTable, Model[Flag]] =
          view.filterView(_.projectId === self.id.value)
    Severity: Major
    Found in models/src/main/scala/ore/models/project/Project.scala and 14 other locations - About 45 mins to fix
    models/src/main/scala/ore/models/project/Channel.scala on lines 59..60
    models/src/main/scala/ore/models/project/Project.scala on lines 303..306
    models/src/main/scala/ore/models/project/Project.scala on lines 349..350
    models/src/main/scala/ore/models/project/Project.scala on lines 357..358
    models/src/main/scala/ore/models/project/Project.scala on lines 365..366
    models/src/main/scala/ore/models/project/Project.scala on lines 376..379
    models/src/main/scala/ore/models/project/Version.scala on lines 179..182
    models/src/main/scala/ore/models/project/Version.scala on lines 210..211
    models/src/main/scala/ore/models/user/User.scala on lines 167..170
    models/src/main/scala/ore/models/user/User.scala on lines 177..180
    models/src/main/scala/ore/models/user/User.scala on lines 187..190
    models/src/main/scala/ore/models/user/User.scala on lines 197..200
    models/src/main/scala/ore/models/user/User.scala on lines 216..217
    models/src/main/scala/ore/models/user/User.scala on lines 237..240

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

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

        def versions[V[_, _]: QueryView](view: V[VersionTable, Model[Version]]): V[VersionTable, Model[Version]] =
          view.filterView(_.projectId === self.id.value)
    Severity: Major
    Found in models/src/main/scala/ore/models/project/Project.scala and 14 other locations - About 45 mins to fix
    models/src/main/scala/ore/models/project/Channel.scala on lines 59..60
    models/src/main/scala/ore/models/project/Project.scala on lines 303..306
    models/src/main/scala/ore/models/project/Project.scala on lines 327..328
    models/src/main/scala/ore/models/project/Project.scala on lines 349..350
    models/src/main/scala/ore/models/project/Project.scala on lines 365..366
    models/src/main/scala/ore/models/project/Project.scala on lines 376..379
    models/src/main/scala/ore/models/project/Version.scala on lines 179..182
    models/src/main/scala/ore/models/project/Version.scala on lines 210..211
    models/src/main/scala/ore/models/user/User.scala on lines 167..170
    models/src/main/scala/ore/models/user/User.scala on lines 177..180
    models/src/main/scala/ore/models/user/User.scala on lines 187..190
    models/src/main/scala/ore/models/user/User.scala on lines 197..200
    models/src/main/scala/ore/models/user/User.scala on lines 216..217
    models/src/main/scala/ore/models/user/User.scala on lines 237..240

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

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

        def versions[V[_, _]: QueryView](view: V[VersionTable, Model[Version]]): V[VersionTable, Model[Version]] =
          view.filterView(_.channelId === self.id.value)
    Severity: Major
    Found in models/src/main/scala/ore/models/project/Channel.scala and 14 other locations - About 45 mins to fix
    models/src/main/scala/ore/models/project/Project.scala on lines 303..306
    models/src/main/scala/ore/models/project/Project.scala on lines 327..328
    models/src/main/scala/ore/models/project/Project.scala on lines 349..350
    models/src/main/scala/ore/models/project/Project.scala on lines 357..358
    models/src/main/scala/ore/models/project/Project.scala on lines 365..366
    models/src/main/scala/ore/models/project/Project.scala on lines 376..379
    models/src/main/scala/ore/models/project/Version.scala on lines 179..182
    models/src/main/scala/ore/models/project/Version.scala on lines 210..211
    models/src/main/scala/ore/models/user/User.scala on lines 167..170
    models/src/main/scala/ore/models/user/User.scala on lines 177..180
    models/src/main/scala/ore/models/user/User.scala on lines 187..190
    models/src/main/scala/ore/models/user/User.scala on lines 197..200
    models/src/main/scala/ore/models/user/User.scala on lines 216..217
    models/src/main/scala/ore/models/user/User.scala on lines 237..240

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

    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

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

      def valueEnumDecoder[V, A <: ValueEnumEntry[V]: Typeable](enumObj: ValueEnum[V, A])(name: A => String): Decoder[A] =
        (c: HCursor) => c.as[String].flatMap(optionToResult(_, s => enumObj.values.find(a => name(a) == s), c.history))
    Severity: Minor
    Found in apiV2/app/models/protocols/APIV2.scala and 1 other location - About 45 mins to fix
    apiV2/app/models/protocols/APIV2.scala on lines 33..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 74.

    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

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

      def enumDecoder[A <: EnumEntry: Typeable](enumObj: Enum[A])(name: A => String): Decoder[A] =
        (c: HCursor) => c.as[String].flatMap(optionToResult(_, s => enumObj.values.find(a => name(a) == s), c.history))
    Severity: Minor
    Found in apiV2/app/models/protocols/APIV2.scala and 1 other location - About 45 mins to fix
    apiV2/app/models/protocols/APIV2.scala on lines 27..28

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

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

        def tags[V[_, _]: QueryView](
            view: V[VersionTagTable, Model[VersionTag]]
        ): V[VersionTagTable, Model[VersionTag]] =
          view.filterView(_.versionId === self.id.value)
    Severity: Major
    Found in models/src/main/scala/ore/models/project/Version.scala and 14 other locations - About 45 mins to fix
    models/src/main/scala/ore/models/project/Channel.scala on lines 59..60
    models/src/main/scala/ore/models/project/Project.scala on lines 303..306
    models/src/main/scala/ore/models/project/Project.scala on lines 327..328
    models/src/main/scala/ore/models/project/Project.scala on lines 349..350
    models/src/main/scala/ore/models/project/Project.scala on lines 357..358
    models/src/main/scala/ore/models/project/Project.scala on lines 365..366
    models/src/main/scala/ore/models/project/Project.scala on lines 376..379
    models/src/main/scala/ore/models/project/Version.scala on lines 210..211
    models/src/main/scala/ore/models/user/User.scala on lines 167..170
    models/src/main/scala/ore/models/user/User.scala on lines 177..180
    models/src/main/scala/ore/models/user/User.scala on lines 187..190
    models/src/main/scala/ore/models/user/User.scala on lines 197..200
    models/src/main/scala/ore/models/user/User.scala on lines 216..217
    models/src/main/scala/ore/models/user/User.scala on lines 237..240

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

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

        def apiKeys[V[_, _]: QueryView](
            view: V[ProjectApiKeyTable, Model[ProjectApiKey]]
        ): V[ProjectApiKeyTable, Model[ProjectApiKey]] =
          view.filterView(_.projectId === self.id.value)
    Severity: Major
    Found in models/src/main/scala/ore/models/project/Project.scala and 14 other locations - About 45 mins to fix
    models/src/main/scala/ore/models/project/Channel.scala on lines 59..60
    models/src/main/scala/ore/models/project/Project.scala on lines 303..306
    models/src/main/scala/ore/models/project/Project.scala on lines 327..328
    models/src/main/scala/ore/models/project/Project.scala on lines 349..350
    models/src/main/scala/ore/models/project/Project.scala on lines 357..358
    models/src/main/scala/ore/models/project/Project.scala on lines 365..366
    models/src/main/scala/ore/models/project/Version.scala on lines 179..182
    models/src/main/scala/ore/models/project/Version.scala on lines 210..211
    models/src/main/scala/ore/models/user/User.scala on lines 167..170
    models/src/main/scala/ore/models/user/User.scala on lines 177..180
    models/src/main/scala/ore/models/user/User.scala on lines 187..190
    models/src/main/scala/ore/models/user/User.scala on lines 197..200
    models/src/main/scala/ore/models/user/User.scala on lines 216..217
    models/src/main/scala/ore/models/user/User.scala on lines 237..240

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

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

        def reviewEntries[V[_, _]: QueryView](view: V[ReviewTable, Model[Review]]): V[ReviewTable, Model[Review]] =
          view.filterView(_.versionId === self.id.value)
    Severity: Major
    Found in models/src/main/scala/ore/models/project/Version.scala and 14 other locations - About 45 mins to fix
    models/src/main/scala/ore/models/project/Channel.scala on lines 59..60
    models/src/main/scala/ore/models/project/Project.scala on lines 303..306
    models/src/main/scala/ore/models/project/Project.scala on lines 327..328
    models/src/main/scala/ore/models/project/Project.scala on lines 349..350
    models/src/main/scala/ore/models/project/Project.scala on lines 357..358
    models/src/main/scala/ore/models/project/Project.scala on lines 365..366
    models/src/main/scala/ore/models/project/Project.scala on lines 376..379
    models/src/main/scala/ore/models/project/Version.scala on lines 179..182
    models/src/main/scala/ore/models/user/User.scala on lines 167..170
    models/src/main/scala/ore/models/user/User.scala on lines 177..180
    models/src/main/scala/ore/models/user/User.scala on lines 187..190
    models/src/main/scala/ore/models/user/User.scala on lines 197..200
    models/src/main/scala/ore/models/user/User.scala on lines 216..217
    models/src/main/scala/ore/models/user/User.scala on lines 237..240

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

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

        def ownedOrganizations[V[_, _]: QueryView](
            view: V[OrganizationTable, Model[Organization]]
        ): V[OrganizationTable, Model[Organization]] =
          view.filterView(_.userId === self.id.value)
    Severity: Major
    Found in models/src/main/scala/ore/models/user/User.scala and 14 other locations - About 45 mins to fix
    models/src/main/scala/ore/models/project/Channel.scala on lines 59..60
    models/src/main/scala/ore/models/project/Project.scala on lines 303..306
    models/src/main/scala/ore/models/project/Project.scala on lines 327..328
    models/src/main/scala/ore/models/project/Project.scala on lines 349..350
    models/src/main/scala/ore/models/project/Project.scala on lines 357..358
    models/src/main/scala/ore/models/project/Project.scala on lines 365..366
    models/src/main/scala/ore/models/project/Project.scala on lines 376..379
    models/src/main/scala/ore/models/project/Version.scala on lines 179..182
    models/src/main/scala/ore/models/project/Version.scala on lines 210..211
    models/src/main/scala/ore/models/user/User.scala on lines 167..170
    models/src/main/scala/ore/models/user/User.scala on lines 177..180
    models/src/main/scala/ore/models/user/User.scala on lines 197..200
    models/src/main/scala/ore/models/user/User.scala on lines 216..217
    models/src/main/scala/ore/models/user/User.scala on lines 237..240

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

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

        def projects[V[_, _]: QueryView](
            view: V[ProjectTableMain, Model[Project]]
        ): V[ProjectTableMain, Model[Project]] =
          view.filterView(_.userId === self.id.value)
    Severity: Major
    Found in models/src/main/scala/ore/models/user/User.scala and 14 other locations - About 45 mins to fix
    models/src/main/scala/ore/models/project/Channel.scala on lines 59..60
    models/src/main/scala/ore/models/project/Project.scala on lines 303..306
    models/src/main/scala/ore/models/project/Project.scala on lines 327..328
    models/src/main/scala/ore/models/project/Project.scala on lines 349..350
    models/src/main/scala/ore/models/project/Project.scala on lines 357..358
    models/src/main/scala/ore/models/project/Project.scala on lines 365..366
    models/src/main/scala/ore/models/project/Project.scala on lines 376..379
    models/src/main/scala/ore/models/project/Version.scala on lines 179..182
    models/src/main/scala/ore/models/project/Version.scala on lines 210..211
    models/src/main/scala/ore/models/user/User.scala on lines 177..180
    models/src/main/scala/ore/models/user/User.scala on lines 187..190
    models/src/main/scala/ore/models/user/User.scala on lines 197..200
    models/src/main/scala/ore/models/user/User.scala on lines 216..217
    models/src/main/scala/ore/models/user/User.scala on lines 237..240

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

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

        def flags[V[_, _]: QueryView](view: V[FlagTable, Model[Flag]]): V[FlagTable, Model[Flag]] =
          view.filterView(_.userId === self.id.value)
    Severity: Major
    Found in models/src/main/scala/ore/models/user/User.scala and 14 other locations - About 45 mins to fix
    models/src/main/scala/ore/models/project/Channel.scala on lines 59..60
    models/src/main/scala/ore/models/project/Project.scala on lines 303..306
    models/src/main/scala/ore/models/project/Project.scala on lines 327..328
    models/src/main/scala/ore/models/project/Project.scala on lines 349..350
    models/src/main/scala/ore/models/project/Project.scala on lines 357..358
    models/src/main/scala/ore/models/project/Project.scala on lines 365..366
    models/src/main/scala/ore/models/project/Project.scala on lines 376..379
    models/src/main/scala/ore/models/project/Version.scala on lines 179..182
    models/src/main/scala/ore/models/project/Version.scala on lines 210..211
    models/src/main/scala/ore/models/user/User.scala on lines 167..170
    models/src/main/scala/ore/models/user/User.scala on lines 177..180
    models/src/main/scala/ore/models/user/User.scala on lines 187..190
    models/src/main/scala/ore/models/user/User.scala on lines 197..200
    models/src/main/scala/ore/models/user/User.scala on lines 237..240

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

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

        def notifications[V[_, _]: QueryView](
            view: V[NotificationTable, Model[Notification]]
        ): V[NotificationTable, Model[Notification]] =
          view.filterView(_.userId === self.id.value)
    Severity: Major
    Found in models/src/main/scala/ore/models/user/User.scala and 14 other locations - About 45 mins to fix
    models/src/main/scala/ore/models/project/Channel.scala on lines 59..60
    models/src/main/scala/ore/models/project/Project.scala on lines 303..306
    models/src/main/scala/ore/models/project/Project.scala on lines 327..328
    models/src/main/scala/ore/models/project/Project.scala on lines 349..350
    models/src/main/scala/ore/models/project/Project.scala on lines 357..358
    models/src/main/scala/ore/models/project/Project.scala on lines 365..366
    models/src/main/scala/ore/models/project/Project.scala on lines 376..379
    models/src/main/scala/ore/models/project/Version.scala on lines 179..182
    models/src/main/scala/ore/models/project/Version.scala on lines 210..211
    models/src/main/scala/ore/models/user/User.scala on lines 167..170
    models/src/main/scala/ore/models/user/User.scala on lines 177..180
    models/src/main/scala/ore/models/user/User.scala on lines 187..190
    models/src/main/scala/ore/models/user/User.scala on lines 197..200
    models/src/main/scala/ore/models/user/User.scala on lines 216..217

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

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

        def organizationRoles[V[_, _]: QueryView](
            view: V[OrganizationRoleTable, Model[OrganizationUserRole]]
        ): V[OrganizationRoleTable, Model[OrganizationUserRole]] =
          view.filterView(_.userId === self.id.value)
    Severity: Major
    Found in models/src/main/scala/ore/models/user/User.scala and 14 other locations - About 45 mins to fix
    models/src/main/scala/ore/models/project/Channel.scala on lines 59..60
    models/src/main/scala/ore/models/project/Project.scala on lines 303..306
    models/src/main/scala/ore/models/project/Project.scala on lines 327..328
    models/src/main/scala/ore/models/project/Project.scala on lines 349..350
    models/src/main/scala/ore/models/project/Project.scala on lines 357..358
    models/src/main/scala/ore/models/project/Project.scala on lines 365..366
    models/src/main/scala/ore/models/project/Project.scala on lines 376..379
    models/src/main/scala/ore/models/project/Version.scala on lines 179..182
    models/src/main/scala/ore/models/project/Version.scala on lines 210..211
    models/src/main/scala/ore/models/user/User.scala on lines 167..170
    models/src/main/scala/ore/models/user/User.scala on lines 177..180
    models/src/main/scala/ore/models/user/User.scala on lines 187..190
    models/src/main/scala/ore/models/user/User.scala on lines 216..217
    models/src/main/scala/ore/models/user/User.scala on lines 237..240

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

    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