MiniDigger/Hangar

View on GitHub

Showing 518 of 518 total issues

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

    userId: DbRef[User],
    address: InetString,
    action: LoggedAction[Ctx],
    actionContext: LoggedActionContext[Ctx],
    actionContextId: DbRef[Ctx],
Severity: Major
Found in models/src/main/scala/ore/models/user/LoggedAction.scala - About 50 mins to fix

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

          plugin_id: String,
          name: String,
          namespace: ProjectNamespace,
          recommended_version: Option[RecommendedVersion],
          stats: ProjectStats,
    Severity: Major
    Found in apiV2/app/models/protocols/APIV2.scala - About 50 mins to fix

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

          value: String,
          roleId: Int,
          category: RoleCategory,
          permissions: Perm,
          title: String,
      Severity: Major
      Found in models/src/main/scala/ore/permission/role/roles.scala - About 50 mins to fix

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

            loginUrl: String,
            signupUrl: String,
            verifyUrl: String,
            secret: String,
            timeout: FiniteDuration,
        Severity: Major
        Found in auth/src/main/scala/ore/auth/AkkaSSOApi.scala - About 50 mins to fix

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

              name: String,
              category: RoleCategory,
              permissions: Permission,
              title: String,
              color: String,
          Severity: Major
          Found in models/src/main/scala/ore/models/user/role/DbRole.scala - About 50 mins to fix

            Method projectSelectFrag has 7 arguments (exceeds 4 allowed). Consider refactoring.
            Open

                  pluginId: Option[String],
                  category: List[Category],
                  tags: List[String],
                  query: Option[String],
                  owner: Option[String],
            Severity: Major
            Found in apiV2/app/db/impl/query/APIV2Queries.scala - About 50 mins to fix

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

                  projectId: DbRef[Project],
                  userId: DbRef[User],
                  reason: FlagReason,
                  comment: String,
                  isResolved: Boolean = false,
              Severity: Major
              Found in models/src/main/scala/ore/models/project/Flag.scala - About 50 mins to fix

                Method actionQuery has 7 arguments (exceeds 4 allowed). Consider refactoring.
                Open

                      table: Fragment,
                      user: String,
                      canSeeHidden: Boolean,
                      currentUserId: Option[DbRef[User]],
                      order: ProjectSortingStrategy,
                Severity: Major
                Found in apiV2/app/db/impl/query/APIV2Queries.scala - About 50 mins to fix

                  Method projectCountQuery has 7 arguments (exceeds 4 allowed). Consider refactoring.
                  Open

                        pluginId: Option[String],
                        category: List[Category],
                        tags: List[String],
                        query: Option[String],
                        owner: Option[String],
                  Severity: Major
                  Found in apiV2/app/db/impl/query/APIV2Queries.scala - About 50 mins to fix

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

                        val value: Int,
                        val name: String,
                        val platformCategory: PlatformCategory,
                        val priority: Int,
                        val dependencyId: String,
                    Severity: Major
                    Found in models/src/main/scala/ore/data/Platforms.scala - About 50 mins to fix

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

                          flagId: DbRef[Flag],
                          flagReason: FlagReason,
                          flagComment: String,
                          reporter: String,
                          projectOwnerName: String,
                      Severity: Major
                      Found in ore/app/models/querymodels/ShownFlag.scala - About 50 mins to fix

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

                            reviews: Long,
                            uploads: Long,
                            totalDownloads: Long,
                            unsafeDownloads: Long,
                            flagsOpened: Long,
                        Severity: Major
                        Found in ore/app/models/querymodels/Stats.scala - About 50 mins to fix

                          Method getLog has 7 arguments (exceeds 4 allowed). Consider refactoring.
                          Open

                                oPage: Option[Int],
                                userFilter: Option[DbRef[User]],
                                projectFilter: Option[DbRef[Project]],
                                versionFilter: Option[DbRef[Version]],
                                pageFilter: Option[DbRef[Page]],
                          Severity: Major
                          Found in ore/app/db/impl/query/AppQueries.scala - About 50 mins to fix

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

                                unstable: Boolean,
                                recommended: Boolean,
                                channelName: String,
                                protected val channelColorHex: String,
                                nonReviewed: Boolean,
                            Severity: Major
                            Found in ore/app/form/project/VersionData.scala - About 50 mins to fix

                              Method showHome has 7 arguments (exceeds 4 allowed). Consider refactoring.
                              Open

                                    categories: Seq[String],
                                    query: Option[String],
                                    sort: Option[String],
                                    page: Option[Int],
                                    platformCategory: Option[String],
                              Severity: Major
                              Found in ore/app/controllers/Application.scala - About 50 mins to fix

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

                                    currentUser: Option[Model[User]] = None,
                                    globalPermissions: Permission = Permission.None,
                                    hasNotice: Boolean = false,
                                    hasUnreadNotifications: Boolean = false,
                                    unresolvedFlags: Boolean = false,
                                Severity: Major
                                Found in orePlayCommon/app/models/viewhelper/HeaderData.scala - About 50 mins to fix

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

                                      namespace: ProjectNamespace,
                                      projectName: String,
                                      versionString: String,
                                      versionCreatedAt: Instant,
                                      channelName: String,
                                  Severity: Major
                                  Found in ore/app/models/querymodels/queueEntry.scala - About 50 mins to fix

                                    Method showLog has 7 arguments (exceeds 4 allowed). Consider refactoring.
                                    Open

                                          oPage: Option[Int],
                                          userFilter: Option[DbRef[User]],
                                          projectFilter: Option[DbRef[Project]],
                                          versionFilter: Option[DbRef[Version]],
                                          pageFilter: Option[DbRef[Page]],
                                    Severity: Major
                                    Found in ore/app/controllers/Application.scala - About 50 mins to fix

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

                                        def apiDbAction[A: Encoder](perms: Permission, scope: APIScope)(
                                            action: ApiRequest[AnyContent] => doobie.ConnectionIO[A]
                                        ): Action[AnyContent] =
                                          ApiAction(perms, scope).asyncF { request =>
                                            service.runDbCon(action(request)).map(a => Ok(a.asJson))
                                      Severity: Minor
                                      Found in apiV2/app/controllers/apiv2/ApiV2Controller.scala and 1 other location - About 50 mins to fix
                                      apiV2/app/controllers/apiv2/ApiV2Controller.scala on lines 174..180

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

                                      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 apiVecDbAction[A: Encoder](
                                            perms: Permission,
                                            scope: APIScope
                                        )(action: ApiRequest[AnyContent] => doobie.ConnectionIO[Vector[A]]): Action[AnyContent] =
                                          ApiAction(perms, scope).asyncF { request =>
                                      Severity: Minor
                                      Found in apiV2/app/controllers/apiv2/ApiV2Controller.scala and 1 other location - About 50 mins to fix
                                      apiV2/app/controllers/apiv2/ApiV2Controller.scala on lines 146..151

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

                                      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