discourse/discourse

View on GitHub

Showing 1,264 of 1,529 total issues

Avoid too many return statements within this method.
Open

          redirect_to(users_account_created_path) && (return)
Severity: Major
Found in app/controllers/session_controller.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 proxy_avatar(Discourse.store.cdn_url(optimized.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 true if ip_address.nil?
        Severity: Major
        Found in app/models/screened_ip_address.rb - About 30 mins to fix

          Avoid too many return statements within this method.
          Open

                return {
                  reason: I18n.t('redirected_to_top_reasons.new_user'),
                  period: period
                }
          Severity: Major
          Found in app/models/user_option.rb - About 30 mins to fix

            Avoid too many return statements within this method.
            Open

                  return {
                    reason: I18n.t('redirected_to_top_reasons.not_seen_in_a_month'),
                    period: period
                  }
            Severity: Major
            Found in app/models/user_option.rb - About 30 mins to fix

              Avoid too many return statements within this method.
              Open

                    return render body: nil, status: 500
              Severity: Major
              Found in app/controllers/users_controller.rb - About 30 mins to fix

                Avoid too many return statements within this method.
                Open

                      return fail_with('login.incorrect_username_email_or_password')
                Severity: Major
                Found in app/controllers/users_controller.rb - About 30 mins to fix

                  Avoid too many return statements within this method.
                  Open

                        return
                  Severity: Major
                  Found in app/controllers/static_controller.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/controllers/topics_controller.rb - About 30 mins to fix

                        Avoid too many return statements within this method.
                        Open

                                  return fail_with("login.missing_user_field") if f.required?
                        Severity: Major
                        Found in app/controllers/users_controller.rb - About 30 mins to fix

                          Avoid too many return statements within this method.
                          Open

                                return
                          Severity: Major
                          Found in app/controllers/static_controller.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 user.staged? && post.topic.category&.mailinglist_mirror?
                              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 && !should_notify_previous?(user, existing_notification, 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 if post.topic.blank?
                                  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 false unless hostname
                                    Severity: Major
                                    Found in app/jobs/regular/pull_hotlinked_images.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 Discourse.asset_host.present? && URI.parse(Discourse.asset_host).hostname == hostname
                                        Severity: Major
                                        Found in app/jobs/regular/pull_hotlinked_images.rb - About 30 mins to fix
                                          Severity
                                          Category
                                          Status
                                          Source
                                          Language