discourse/discourse

View on GitHub

Showing 1,692 of 2,021 total issues

Avoid too many return statements within this method.
Open

    return if TopicUser.where(
Severity: Major
Found in app/services/post_alerter.rb - About 30 mins to fix

    Avoid too many return statements within this method.
    Open

        return if notifier_id && MutedUser.where(user_id: user.id, muted_user_id: notifier_id)
    Severity: Major
    Found in app/services/post_alerter.rb - About 30 mins to fix

      Avoid too many return statements within this method.
      Open

            return redirect_to cdn_path(avatar_url)
      Severity: Major
      Found in app/controllers/user_avatars_controller.rb - About 30 mins to fix

        Avoid too many return statements within this method.
        Open

            return if notifier_id && IgnoredUser.where(user_id: user.id, ignored_user_id: notifier_id)
        Severity: Major
        Found in app/services/post_alerter.rb - About 30 mins to fix

          Avoid too many return statements within this method.
          Open

                return
          Severity: Major
          Found in app/services/badge_granter.rb - About 30 mins to fix

            Avoid too many return statements within this method.
            Open

                return true if is_admin?
            Severity: Major
            Found in lib/guardian/topic_guardian.rb - About 30 mins to fix

              Avoid too many return statements within this method.
              Open

                  return :auto_silence_regex if matches_auto_silence_regex?(manager)
              Severity: Major
              Found in lib/new_post_manager.rb - About 30 mins to fix

                Avoid too many return statements within this method.
                Open

                      return false if !can_create_topic_on_category?(topic.category)
                Severity: Major
                Found in lib/guardian/topic_guardian.rb - About 30 mins to fix

                  Avoid too many return statements within this method.
                  Open

                      return true if upload.user_id == user_avatar.user_id || upload.user_id == user.id
                  Severity: Major
                  Found in lib/guardian/user_guardian.rb - About 30 mins to fix

                    Avoid too many return statements within this method.
                    Open

                        return :fast_typer if is_fast_typer?(manager)
                    Severity: Major
                    Found in lib/new_post_manager.rb - About 30 mins to fix

                      Avoid too many return statements within this method.
                      Open

                          return true if (
                      Severity: Major
                      Found in lib/guardian/topic_guardian.rb - About 30 mins to fix

                        Avoid too many return statements within this method.
                        Open

                            return :staged if SiteSetting.approve_unless_staged? && user.staged?
                        Severity: Major
                        Found in lib/new_post_manager.rb - About 30 mins to fix

                          Avoid too many return statements within this method.
                          Open

                              return :category if post_needs_approval_in_its_category?(manager)
                          Severity: Major
                          Found in lib/new_post_manager.rb - About 30 mins to fix

                            Avoid too many return statements within this method.
                            Open

                                return :watched_word if WordWatcher.new("#{manager.args[:title]} #{manager.args[:raw]}").requires_approval?
                            Severity: Major
                            Found in lib/new_post_manager.rb - About 30 mins to fix

                              Avoid too many return statements within this method.
                              Open

                                  return true if (
                              Severity: Major
                              Found in lib/guardian/topic_guardian.rb - About 30 mins to fix

                                Avoid too many return statements within this method.
                                Open

                                      return false if is_flag &&
                                Severity: Major
                                Found in lib/guardian/post_guardian.rb - About 30 mins to fix

                                  Avoid too many return statements within this method.
                                  Open

                                      return false if topic.archived
                                  Severity: Major
                                  Found in lib/guardian/topic_guardian.rb - About 30 mins to fix

                                    Avoid too many return statements within this method.
                                    Open

                                          return false
                                    Severity: Major
                                    Found in lib/guardian/post_guardian.rb - About 30 mins to fix

                                      Avoid too many return statements within this method.
                                      Open

                                          return false if !is_moderator? && post.deleted_at.present?
                                      Severity: Major
                                      Found in lib/guardian/post_guardian.rb - About 30 mins to fix

                                        Avoid too many return statements within this method.
                                        Open

                                              return !post.edit_time_limit_expired?(@user)
                                        Severity: Major
                                        Found in lib/guardian/post_guardian.rb - About 30 mins to fix
                                          Severity
                                          Category
                                          Status
                                          Source
                                          Language