MiniDigger/Hangar

View on GitHub

Showing 229 of 518 total issues

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

    createdAt: LocalDateTime,
    name: String,
    tagline: Option[String],
    joinDate: Option[LocalDateTime],
    roles: List[Role]
Severity: Minor
Found in apiV2/app/models/querymodels/apiV2QueryModels.scala - About 35 mins to fix

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

          apiKey: String,
          apiUri: Uri,
          breakerMaxFailures: Int,
          breakerResetDur: FiniteDuration,
          breakerTimeoutDur: FiniteDuration,
    Severity: Minor
    Found in auth/src/main/scala/ore/auth/AkkaSpongeAuthApi.scala - About 35 mins to fix

      Method addStat has 5 arguments (exceeds 4 allowed). Consider refactoring.
      Open

              createEntryFunc: (InetString, String, Option[DbRef[User]]) => M,
              entryCompanion: ModelCompanion.Aux[M, T],
              describe: String,
              addStatNow: F[Unit],
              result: F[Result]
      Severity: Minor
      Found in ore/app/ore/StatTracker.scala - About 35 mins to fix

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

            val value: Int,
            val title: String,
            val fn: ProjectTableMain => ColumnOrdered[_],
            val fragment: Fragment,
            val apiName: String
        Severity: Minor
        Found in orePlayCommon/app/ore/models/project/ProjectSortingStrategy.scala - About 35 mins to fix

          Method getProjectList has 5 arguments (exceeds 4 allowed). Consider refactoring.
          Open

                categories: Option[String],
                sort: Option[Int],
                q: Option[String],
                limit: Option[Long],
                offset: Option[Long]
          Severity: Minor
          Found in ore/app/ore/rest/OreRestfulApiV1.scala - About 35 mins to fix

            Method log has 5 arguments (exceeds 4 allowed). Consider refactoring.
            Open

                  request: AuthRequest[_],
                  action: LoggedAction[Ctx],
                  actionContextId: DbRef[Ctx],
                  newState: String,
                  oldState: String
            Severity: Minor
            Found in ore/app/util/UserActionLogger.scala - About 35 mins to fix

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

                  apiKey: String,
                  channel: OptionT[IO, Model[Channel]],
                  recommended: Boolean,
                  createForumPost: Boolean,
                  changelog: Option[String]
              Severity: Minor
              Found in ore/app/form/project/VersionDeployForm.scala - About 35 mins to fix

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

                    p: ProjectData,
                    v: Model[Version],
                    c: Model[Channel],
                    approvedBy: Option[String], // Reviewer if present
                    dependencies: Seq[(Dependency, Option[Model[Project]])]
                Severity: Minor
                Found in orePlayCommon/app/models/viewhelper/VersionData.scala - About 35 mins to fix

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

                        env: Environment,
                        conf: Configuration,
                        sourceMapper: OptionalSourceMapper,
                        router: Provider[Router],
                        val messagesApi: MessagesApi
                  Severity: Minor
                  Found in ore/app/ErrorHandler.scala - About 35 mins to fix

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

                        canPostAsOwnerOrga: Boolean = false,
                        uProjectFlags: Boolean = false,
                        starred: Boolean = false,
                        watching: Boolean = false,
                        permissions: Permission = Permission.None
                    Severity: Minor
                    Found in orePlayCommon/app/models/viewhelper/ScopedProjectData.scala - About 35 mins to fix

                      Method listProjects has 5 arguments (exceeds 4 allowed). Consider refactoring.
                      Open

                            categories: Option[String],
                            sort: Option[Int],
                            q: Option[String],
                            limit: Option[Long],
                            offset: Option[Long]
                      Severity: Minor
                      Found in ore/app/controllers/ApiV1Controller.scala - About 35 mins to fix

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

                            val value: Int,
                            val name: String,
                            val emptyMessage: String,
                            val title: String,
                            val filter: NotificationTable => Rep[Boolean]
                        Severity: Minor
                        Found in ore/app/ore/models/user/notification/NotificationFilter.scala - About 35 mins to fix

                          Method getVersionList has 5 arguments (exceeds 4 allowed). Consider refactoring.
                          Open

                                pluginId: String,
                                channels: Option[String],
                                limit: Option[Int],
                                offset: Option[Int],
                                onlyPublic: Boolean
                          Severity: Minor
                          Found in ore/app/ore/rest/OreRestfulApiV1.scala - About 35 mins to fix

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

                                name: String,
                                pluginId: String,
                                category: Category,
                                description: Option[String],
                                ownerId: Option[DbRef[User]],
                            Severity: Minor
                            Found in ore/app/form/project/ProjectCreateForm.scala - About 35 mins to fix

                              Method writeVersion has 5 arguments (exceeds 4 allowed). Consider refactoring.
                              Open

                                    v: Model[Version],
                                    p: Project,
                                    c: Channel,
                                    author: Option[String],
                                    tags: Seq[Model[VersionTag]]
                              Severity: Minor
                              Found in ore/app/ore/rest/OreRestfulApiV1.scala - About 35 mins to fix

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

                                    api: OreRestfulApiV1,
                                    status: StatusZ,
                                    forms: OreForms,
                                    factory: ProjectFactory,
                                    files: ProjectFiles
                                Severity: Minor
                                Found in ore/app/controllers/ApiV1Controller.scala - About 35 mins to fix

                                  Function patch_addPadding has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring.
                                  Open

                                  diff_match_patch.prototype.patch_addPadding = function(patches) {
                                    var paddingLength = this.Patch_Margin;
                                    var nullPadding = '';
                                    for (var x = 1; x <= paddingLength; x++) {
                                      nullPadding += String.fromCharCode(x);
                                  Severity: Minor
                                  Found in ore/public/diff-match-patch/javascript/diff_match_patch_uncompressed.js - About 35 mins to fix

                                  Cognitive Complexity

                                  Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.

                                  A method's cognitive complexity is based on a few simple rules:

                                  • Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
                                  • Code is considered more complex for each "break in the linear flow of the code"
                                  • Code is considered more complex when "flow breaking structures are nested"

                                  Further reading

                                  Avoid too many return statements within this function.
                                  Open

                                      return this.diff_lineMode_(text1, text2, deadline);
                                  Severity: Major
                                  Found in ore/public/diff-match-patch/javascript/diff_match_patch_uncompressed.js - About 30 mins to fix

                                    Avoid too many return statements within this function.
                                    Open

                                          return 2;
                                    Severity: Major
                                    Found in ore/public/diff-match-patch/javascript/diff_match_patch_uncompressed.js - About 30 mins to fix

                                      Avoid too many return statements within this function.
                                      Open

                                          return 0;
                                      Severity: Major
                                      Found in ore/public/diff-match-patch/javascript/diff_match_patch_uncompressed.js - About 30 mins to fix
                                        Severity
                                        Category
                                        Status
                                        Source
                                        Language