discourse/discourse

View on GitHub

Showing 1,669 of 1,992 total issues

Avoid too many return statements within this method.
Open

        return @uri
Severity: Major
Found in lib/final_destination.rb - About 30 mins to fix

    Avoid too many return statements within this method.
    Open

        return false if stat.topic_reply_count < SiteSetting.tl2_requires_topic_reply_count
    Severity: Major
    Found in lib/promotion.rb - About 30 mins to fix

      Avoid too many return statements within this method.
      Open

              return unless User.find_by_email(to_address)&.staff?
      Severity: Major
      Found in lib/email/sender.rb - About 30 mins to fix

        Avoid too many return statements within this method.
        Open

                return skip(SkippedEmailLog.reason_types[:sender_post_deleted]) unless post
        Severity: Major
        Found in lib/email/sender.rb - About 30 mins to fix

          Avoid too many return statements within this method.
          Open

              return false if stat.likes_given < SiteSetting.tl2_requires_likes_given
          Severity: Major
          Found in lib/promotion.rb - About 30 mins to fix

            Avoid too many return statements within this method.
            Open

                      return skip(SkippedEmailLog.reason_types[:sender_body_blank])
            Severity: Major
            Found in lib/email/sender.rb - About 30 mins to fix

              Avoid too many return statements within this method.
              Open

                  return if previous_text.gsub(/(\s){2,}/, '\1') != quoted_text.gsub(/(\s){2,}/, '\1')
              Severity: Major
              Found in lib/cooked_post_processor.rb - About 30 mins to fix

                Avoid too many return statements within this method.
                Open

                    return true
                Severity: Major
                Found in lib/promotion.rb - About 30 mins to fix

                  Avoid too many return statements within this method.
                  Open

                        return skip(SkippedEmailLog.reason_types[:sender_message_to_blank]) if @message.to.blank?
                  Severity: Major
                  Found in lib/email/sender.rb - About 30 mins to fix

                    Avoid too many return statements within this method.
                    Open

                          return skip(SkippedEmailLog.reason_types[:sender_message_to_invalid]) if to_address.end_with?(".invalid")
                    Severity: Major
                    Found in lib/email/sender.rb - About 30 mins to fix

                      Avoid too many return statements within this method.
                      Open

                          return if @post.raw.strip == quoteless_raw
                      Severity: Major
                      Found in lib/cooked_post_processor.rb - About 30 mins to fix

                        Avoid too many return statements within this method.
                        Open

                              return extract_from_address_and_name(mail.from) if mail.from.is_a? String
                        Severity: Major
                        Found in lib/email/receiver.rb - About 30 mins to fix

                          Avoid too many return statements within this method.
                          Open

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

                            Avoid too many return statements within this method.
                            Open

                                  return false if group.visibility_level == Group.visibility_levels[:owners]
                            Severity: Major
                            Found in lib/guardian.rb - About 30 mins to fix

                              Avoid too many return statements within this method.
                              Open

                                    return false if groups.all? { |g| g.visibility_level == Group.visibility_levels[:staff] }
                              Severity: Major
                              Found in lib/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.rb - About 30 mins to fix

                                  Avoid too many return statements within this method.
                                  Open

                                      return false if user.blank?
                                  Severity: Major
                                  Found in lib/guardian.rb - About 30 mins to fix

                                    Avoid too many return statements within this method.
                                    Open

                                            return false if object.reached_recipients_limit? && !is_staff?
                                    Severity: Major
                                    Found in lib/guardian.rb - About 30 mins to fix

                                      Avoid too many return statements within this method.
                                      Open

                                          return if !post || post.hidden || !allowed_post_types.include?(post.post_type)
                                      Severity: Major
                                      Found in lib/oneboxer.rb - About 30 mins to fix

                                        Avoid too many return statements within this method.
                                        Open

                                              return false
                                        Severity: Major
                                        Found in lib/final_destination.rb - About 30 mins to fix
                                          Severity
                                          Category
                                          Status
                                          Source
                                          Language