MiniDigger/Hangar

View on GitHub

Showing 229 of 518 total issues

Function diff_lineMode_ has 45 lines of code (exceeds 25 allowed). Consider refactoring.
Open

diff_match_patch.prototype.diff_lineMode_ = function(text1, text2, deadline) {
  // Scan the text on a line-by-line basis first.
  var a = this.diff_linesToChars_(text1, text2);
  text1 = a.chars1;
  text2 = a.chars2;

    Function slide has 44 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

      Carousel.prototype.slide = function (type, next) {
        var $active   = this.$element.find('.item.active')
        var $next     = next || this.getItemForDirection(type, $active)
        var isCycling = this.interval
        var direction = type == 'next' ? 'left' : 'right'
    Severity: Minor
    Found in ore/public/bootstrap/js/bootstrap.js - About 1 hr to fix

      Function loadMeta has 44 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

        def loadMeta[F[_]](implicit messages: Messages, F: Sync[F]): EitherT[F, String, PluginFileWithData] = {
          val fileNames = PluginFileData.fileNames
      
          val res = newJarStream
            .flatMap { in =>
      Severity: Minor
      Found in orePlayCommon/app/ore/models/project/io/PluginFile.scala - About 1 hr to fix

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

            versionString: String,
            dependencyIds: List[String],
            description: Option[String],
            projectId: Option[DbRef[Project]], // Version might be for an uncreated project
            fileSize: Long,
        Severity: Major
        Found in orePlayCommon/app/ore/models/project/factory/PendingVersion.scala - About 1 hr to fix

          Function asProtocol has 42 lines of code (exceeds 25 allowed). Consider refactoring.
          Open

            ): APIV2.Project = {
              val iconPath = projectFiles.getIconPath(namespace.ownerName, name)
              val iconUrl =
                if (iconPath.isDefined)
                  controllers.project.routes.Projects.showIcon(namespace.ownerName, namespace.slug).absoluteURL()
          Severity: Minor
          Found in apiV2/app/models/querymodels/apiV2QueryModels.scala - About 1 hr to fix

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

                  created_at: LocalDateTime,
                  plugin_id: String,
                  name: String,
                  namespace: ProjectNamespace,
                  recommended_version: Option[RecommendedVersion],
            Severity: Major
            Found in apiV2/app/models/protocols/APIV2.scala - About 1 hr to fix

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

                  service: ModelService[IO],
                  sso: SSOApi[IO],
                  bakery: Bakery,
                  config: OreConfig,
                  users: UserBase[IO],
              Severity: Major
              Found in orePlayCommon/app/controllers/OreControllerComponents.scala - About 1 hr to fix

                Function diff_compute_ has 40 lines of code (exceeds 25 allowed). Consider refactoring.
                Open

                diff_match_patch.prototype.diff_compute_ = function(text1, text2, checklines,
                    deadline) {
                  var diffs;
                
                  if (!text1) {

                  Function diff_fromDelta has 40 lines of code (exceeds 25 allowed). Consider refactoring.
                  Open

                  diff_match_patch.prototype.diff_fromDelta = function(text1, delta) {
                    var diffs = [];
                    var diffsLength = 0;  // Keeping our own length var is faster in JS.
                    var pointer = 0;  // Cursor in text1
                    var tokens = delta.split(/\t/g);

                    Function show has 39 lines of code (exceeds 25 allowed). Consider refactoring.
                    Open

                      Modal.prototype.show = function (_relatedTarget) {
                        var that = this
                        var e    = $.Event('show.bs.modal', { relatedTarget: _relatedTarget })
                    
                        this.$element.trigger(e)
                    Severity: Minor
                    Found in ore/public/bootstrap/js/bootstrap.js - About 1 hr to fix

                      Function backdrop has 39 lines of code (exceeds 25 allowed). Consider refactoring.
                      Open

                        Modal.prototype.backdrop = function (callback) {
                          var that = this
                          var animate = this.$element.hasClass('fade') ? 'fade' : ''
                      
                          if (this.isShown && this.options.backdrop) {
                      Severity: Minor
                      Found in ore/public/bootstrap/js/bootstrap.js - About 1 hr to fix

                        Function createProjectTopic has 39 lines of code (exceeds 25 allowed). Consider refactoring.
                        Open

                          def createProjectTopic(project: Model[Project]): F[Model[Project]] = {
                            val title = Templates.projectTitle(project)
                        
                            implicit val mdc: DiscourseMDC = DiscourseMDC(project.ownerName, None, title)
                        
                        
                        Severity: Minor
                        Found in ore/app/discourse/OreDiscourseApiEnabled.scala - About 1 hr to fix

                          Function initChannelManager has 38 lines of code (exceeds 25 allowed). Consider refactoring.
                          Open

                          function initChannelManager(toggle, channelName, channelHex, title, call, method, submit, nonReviewed) {
                              $(toggle).off('click'); // Unbind previous click handlers
                              $(toggle).click(function() {
                                  var modal = getModal();
                                  var preview = modal.find('.preview');
                          Severity: Minor
                          Found in ore/public/javascripts/channelManage.js - About 1 hr to fix

                            Function loadActions has 38 lines of code (exceeds 25 allowed). Consider refactoring.
                            Open

                            function loadActions(increment, action) {
                                pages[action] += increment;
                                var offset = (pages[action] - 1) * CONTENT_PER_PAGE;
                            
                                apiV2Request('users/' + USERNAME + '/' + action + '?offset=' + offset + '&limit=' + CONTENT_PER_PAGE).then(function (result) {
                            Severity: Minor
                            Found in ore/public/javascripts/userPage.js - About 1 hr to fix

                              Function diff_main has 38 lines of code (exceeds 25 allowed). Consider refactoring.
                              Open

                              diff_match_patch.prototype.diff_main = function(text1, text2, opt_checklines,
                                  opt_deadline) {
                                // Set a deadline by which time the diff must be complete.
                                if (typeof opt_deadline == 'undefined') {
                                  if (this.Diff_Timeout <= 0) {

                                Function activate has 38 lines of code (exceeds 25 allowed). Consider refactoring.
                                Open

                                  Tab.prototype.activate = function (element, container, callback) {
                                    var $active    = container.find('> .active')
                                    var transition = callback
                                      && $.support.transition
                                      && ($active.length && $active.hasClass('fade') || !!container.find('> .fade').length)
                                Severity: Minor
                                Found in ore/public/bootstrap/js/bootstrap.js - About 1 hr to fix

                                  Function initUserSearch has 38 lines of code (exceeds 25 allowed). Consider refactoring.
                                  Open

                                  function initUserSearch(callback) {
                                      var search = $('.user-search');
                                      var input = search.find('input');
                                  
                                      // Disable button with no input
                                  Severity: Minor
                                  Found in ore/public/javascripts/userSearch.js - About 1 hr to fix

                                    Function patch_addPadding has 38 lines of code (exceeds 25 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);

                                      Function getQueue has 38 lines of code (exceeds 25 allowed). Consider refactoring.
                                      Open

                                        val getQueue: Query0[UnsortedQueueEntry] = {
                                          val reviewStateId = ReviewState.Unreviewed.value
                                          sql"""|SELECT sq.project_author,
                                                |       sq.project_slug,
                                                |       sq.project_name,
                                      Severity: Minor
                                      Found in ore/app/db/impl/query/AppQueries.scala - About 1 hr to fix

                                        Function getProjects has 38 lines of code (exceeds 25 allowed). Consider refactoring.
                                        Open

                                          ): Query0[ProjectListEntry] = {
                                            val visibilityFrag =
                                              if (canSeeHidden) None
                                              else
                                                currentUserId.fold(Some(fr"(p.visibility = 1)")) { id =>
                                        Severity: Minor
                                        Found in ore/app/db/impl/query/UserPagesQueries.scala - About 1 hr to fix
                                          Severity
                                          Category
                                          Status
                                          Source
                                          Language