discourse/discourse

View on GitHub

Showing 1,624 of 1,936 total issues

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 skip_message(SkippedEmailLog.reason_types[:exceeded_emails_limit])
    Severity: Major
    Found in app/jobs/regular/user_email.rb - About 30 mins to fix

      Avoid too many return statements within this method.
      Open

              return skip_message(SkippedEmailLog.reason_types[:user_email_seen_recently])
      Severity: Major
      Found in app/jobs/regular/user_email.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 skip_message(skip_reason_type) if skip_reason_type.present?
          Severity: Major
          Found in app/jobs/regular/user_email.rb - About 30 mins to fix

            Avoid too many return statements within this method.
            Open

                      return SkippedEmailLog.reason_types[:user_email_already_read]
            Severity: Major
            Found in app/jobs/regular/user_email.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 skip_message(SkippedEmailLog.reason_types[:user_email_notification_already_read])
                Severity: Major
                Found in app/jobs/regular/user_email.rb - About 30 mins to fix

                  Avoid too many return statements within this method.
                  Open

                            return [nil, nil]
                  Severity: Major
                  Found in app/jobs/regular/user_email.rb - About 30 mins to fix

                    Avoid too many return statements within this method.
                    Open

                            return skip_message(SkippedEmailLog.reason_types[:exceeded_bounces_limit])
                    Severity: Major
                    Found in app/jobs/regular/user_email.rb - About 30 mins to fix

                      Avoid too many return statements within this method.
                      Open

                            return nil
                      Severity: Major
                      Found in app/models/topic_link_click.rb - About 30 mins to fix

                        Avoid too many return statements within this method.
                        Open

                            return url if args[:user_id] && link.user_id == args[:user_id]
                        Severity: Major
                        Found in app/models/topic_link_click.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 url if WHITELISTED_REDIRECT_HOSTNAMES.include?(uri.hostname) || is_cdn_link
                            Severity: Major
                            Found in app/models/topic_link_click.rb - About 30 mins to fix

                              Avoid too many return statements within this method.
                              Open

                                      return render json: success_json
                              Severity: Major
                              Found in app/controllers/session_controller.rb - About 30 mins to fix

                                Avoid too many return statements within this method.
                                Open

                                    return render json: { error: I18n.t('email_login.invalid_token') }
                                Severity: Major
                                Found in app/controllers/session_controller.rb - About 30 mins to fix

                                  Avoid too many return statements within this method.
                                  Open

                                            return nil
                                  Severity: Major
                                  Found in app/models/optimized_image.rb - About 30 mins to fix

                                    Avoid too many return statements within this method.
                                    Open

                                            return render json: failed_json.merge(
                                              error: I18n.t("login.invalid_second_factor_code"),
                                              reason: "invalid_second_factor",
                                              backup_enabled: user.backup_codes_enabled?
                                            )
                                    Severity: Major
                                    Found in app/controllers/session_controller.rb - About 30 mins to fix

                                      Avoid too many return statements within this method.
                                      Open

                                                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 thumbnail if thumbnail
                                        Severity: Major
                                        Found in app/models/optimized_image.rb - About 30 mins to fix
                                          Severity
                                          Category
                                          Status
                                          Source
                                          Language