discourse/discourse

View on GitHub

Showing 1,588 of 1,895 total issues

Avoid too many return statements within this method.
Open

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

    Avoid too many return statements within this method.
    Open

        return data if path =~ /\.hbs/
    Severity: Major
    Found in lib/discourse_iife.rb - About 30 mins to fix

      Avoid too many return statements within this method.
      Open

          return data if path =~ /\.hbrs/
      Severity: Major
      Found in lib/discourse_iife.rb - About 30 mins to fix

        Avoid too many return statements within this method.
        Open

            return data if path =~ /\.handlebars/
        Severity: Major
        Found in lib/discourse_iife.rb - About 30 mins to fix

          Avoid too many return statements within this method.
          Open

              return data if (path =~ /\/translations/)
          Severity: Major
          Found in lib/discourse_iife.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 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 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 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 groups.any? { |g| can_edit_group?(g) } ? true : false
                    Severity: Major
                    Found in lib/guardian.rb - About 30 mins to fix

                      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 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_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 true
                            Severity: Major
                            Found in lib/promotion.rb - About 30 mins to fix

                              Avoid too many return statements within this method.
                              Open

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

                                Avoid too many return statements within this method.
                                Open

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

                                  Avoid too many return statements within this method.
                                  Open

                                          return skip(SkippedEmailLog.reason_types[:custom], custom_reason: e.message)
                                  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 false if stat.days_visited < SiteSetting.tl2_requires_days_visited
                                      Severity: Major
                                      Found in lib/promotion.rb - About 30 mins to fix

                                        Avoid too many return statements within this method.
                                        Open

                                            return false if stat.likes_received < SiteSetting.tl2_requires_likes_received
                                        Severity: Major
                                        Found in lib/promotion.rb - About 30 mins to fix
                                          Severity
                                          Category
                                          Status
                                          Source
                                          Language