discourse/discourse

View on GitHub

Showing 1,624 of 1,936 total issues

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 @uri
    Severity: Major
    Found in lib/final_destination.rb - About 30 mins to fix

      Avoid too many return statements within this method.
      Open

          return true if user.badges.where(name: title, allow_title: true).exists?
      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.present?
        Severity: Major
        Found in lib/guardian.rb - About 30 mins to fix

          Avoid too many return statements within this method.
          Open

              return true if authenticated? && groups.all? { |g| g.visibility_level == Group.visibility_levels[:logged_on_users] }
          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 { errors: [I18n.t('not_found')] } if obj.is_a?(HasErrors) && obj.not_found
              Severity: Major
              Found in lib/json_error.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 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 group.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 false if group.members_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 unless Guardian.new.can_see_topic?(topic)
                          Severity: Major
                          Found in lib/oneboxer.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 memberships.empty? || memberships.length < groups.size
                              Severity: Major
                              Found in lib/guardian.rb - About 30 mins to fix

                                Avoid too many return statements within this method.
                                Open

                                    return true if authenticated? && group.members_visibility_level == Group.visibility_levels[:logged_on_users]
                                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.members_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 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 if topic.private_message?
                                      Severity: Major
                                      Found in lib/oneboxer.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
                                          Severity
                                          Category
                                          Status
                                          Source
                                          Language