discourse/discourse

View on GitHub

Showing 1,624 of 1,936 total issues

Avoid too many return statements within this method.
Open

    return if SiteSetting.disable_system_edit_notifications && post_revision.user_id == Discourse::SYSTEM_USER_ID
Severity: Major
Found in app/services/post_action_notifier.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 perform_hidden_topic_show_response(ex.obj)
      Severity: Major
      Found in app/controllers/topics_controller.rb - About 30 mins to fix

        Avoid too many return statements within this method.
        Open

            return if post.topic.private_message?
        Severity: Major
        Found in app/services/post_action_notifier.rb - About 30 mins to fix

          Avoid too many return statements within this method.
          Open

                return if GroupUser.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 existing_notification_of_same_type && !should_notify_previous?(user, existing_notification_of_same_type, opts)
            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/controllers/topics_controller.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 false if @user.silenced?
                  Severity: Major
                  Found in lib/guardian/post_guardian.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 can_see_flags?(topic) if PostActionType.is_flag?(type_symbol)
                      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
                        Severity: Major
                        Found in lib/guardian/post_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 can_create_post?(post.topic)
                              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 post.hidden_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 :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 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 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
                                          Severity
                                          Category
                                          Status
                                          Source
                                          Language