discourse/discourse

View on GitHub

Showing 1,669 of 1,992 total issues

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 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 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 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 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 true
            Severity: Major
            Found in lib/guardian/post_guardian.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 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 @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 :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 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 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 :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 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 :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 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 (
                                    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 (
                                      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
                                          Severity
                                          Category
                                          Status
                                          Source
                                          Language