Repository Analysis

discourse/discourse

A platform for community discussion. Free, open, simple.

1.9 Likely human-written View on GitHub
1.9
Adjusted Score
1.9
Raw Score
100%
Time Factor
2026-05-29
Last Push
47,136
Stars
Ruby
Language
2,329,504
Lines of Code
17920
Files
3777
Pattern Hits
2026-05-31
Scan Date

Score History

Severity Breakdown

CRITICAL 16HIGH 2MEDIUM 135LOW 3624

Pattern Findings

3777 matches across 13 categories. Click a row to expand file-level details.

Over-Commented Block1765 hits · 1753 pts
SeverityFileLineSnippet
LOWapp/models/user_api_key_client.rb21end
LOWapp/models/draft.rb341 end
LOWapp/models/draft.rb361#
LOWapp/models/tag_group_membership.rb1# frozen_string_literal: true
LOWapp/models/sidebar_url.rb81 def set_external
LOWapp/models/single_sign_on_record.rb1# frozen_string_literal: true
LOWapp/models/single_sign_on_record.rb21# created_at :datetime not null
LOWapp/models/child_theme.rb21
LOWapp/models/user_custom_field.rb21# Table name: user_custom_fields
LOWapp/models/user_ip_address_history.rb1# frozen_string_literal: true
LOWapp/models/user_ip_address_history.rb21#
LOWapp/models/directory_item.rb241# == Schema Information
LOWapp/models/directory_item.rb261#
LOWapp/models/topic_group.rb81#
LOWapp/models/group_history.rb41 records = records.where("#{filter}_id" => id)
LOWapp/models/group_history.rb61# acting_user_id :integer not null
LOWapp/models/directory_column.rb61#
LOWapp/models/onceoff_log.rb1# frozen_string_literal: true
LOWapp/models/topic_tag.rb41 counters_to_update[:public_topic_count] = -1
LOWapp/models/topic_tag.rb61#
LOWapp/models/topic_allowed_group.rb1# frozen_string_literal: true
LOWapp/models/topic_allowed_group.rb21# index_topic_allowed_groups_on_topic_id_and_group_id (topic_id,group_id) UNIQUE
LOWapp/models/user_profile.rb221# bio_cooked_version :integer
LOWapp/models/user_profile.rb241#
LOWapp/models/topic_view_item.rb61 )
LOWapp/models/topic_view_item.rb81# uniq_ip_or_user_id_topic_views (user_id,ip_address,topic_id) UNIQUE
LOWapp/models/user_profile_view.rb61 profile_views.joins("INNER JOIN users ON users.id = user_profile_views.user_id")
LOWapp/models/user_profile_view.rb81#
LOWapp/models/category.rb1341 def on_custom_fields_change
LOWapp/models/category.rb1361# default_top_period :string(20) default("all")
LOWapp/models/category.rb1381# read_only_banner :string
LOWapp/models/category.rb1401# latest_post_id :integer
LOWapp/models/tag.rb321 errors.add(:name, :invalid) if name.present? && RESERVED_TAGS.include?(name.strip.downcase)
LOWapp/models/tag.rb341# Indexes
LOWapp/models/user_required_fields_version.rb1# frozen_string_literal: true
LOWapp/models/ignored_user.rb21 SQL
LOWapp/models/backup_draft_post.rb1# frozen_string_literal: true
LOWapp/models/backup_draft_post.rb21# index_backup_draft_posts_on_post_id (post_id) UNIQUE
LOWapp/models/color_scheme_color.rb21# id :integer not null, primary key
LOWapp/models/user_badge.rb141# badge_id :integer not null
LOWapp/models/user_action.rb481 )
LOWapp/models/user_action.rb501# target_user_id :integer
LOWapp/models/user_avatar.rb221# user_id :integer not null
LOWapp/models/group_mention.rb1# frozen_string_literal: true
LOWapp/models/group_mention.rb21# index_group_mentions_on_post_id_and_group_id (post_id,group_id) UNIQUE
LOWapp/models/reviewable_score.rb101
LOWapp/models/reviewable_score.rb121#
LOWapp/models/reviewable_post.rb141# payload :json
LOWapp/models/reviewable_post.rb161#
LOWapp/models/application_request.rb81# == Schema Information
LOWapp/models/skipped_email_log.rb81# custom_reason :text
LOWapp/models/given_daily_like.rb41#
LOWapp/models/user_stat.rb321#
LOWapp/models/user_stat.rb341# posts_read_count :integer default(0), not null
LOWapp/models/tag_user.rb241 .joins(:tag)
LOWapp/models/tag_user.rb261# Indexes
LOWapp/models/user_warning.rb1# frozen_string_literal: true
LOWapp/models/user_warning.rb21#
LOWapp/models/incoming_email.rb81# error :text
LOWapp/models/incoming_email.rb101# index_incoming_emails_on_imap_sync (imap_sync)
1705 more matches not shown…
Hyper-Verbose Identifiers1391 hits · 1446 pts
SeverityFileLineSnippet
LOWapp/mailers/invite_mailer.rb71 def send_password_instructions(user)
LOWapp/mailers/user_notifications.rb242 def account_second_factor_disabled(user, opts = {})
LOWapp/mailers/user_notifications.rb454 def user_invited_to_private_message(user, opts)
LOWapp/mailers/user_notifications.rb875 def build_user_email_token_by_template(template, user, email_token)
LOWapp/models/topic_posters_summary.rb72 def shuffle_last_poster_to_back_in(summary)
LOWapp/models/user_profile.rb77 def upload_profile_background(upload)
LOWapp/models/category.rb1300 def check_permissions_compatibility(parent_permissions, child_permissions)
LOWapp/models/reviewable_post.rb100 def perform_reject_and_keep_deleted(performed_by, _args)
LOWapp/models/reviewable_post.rb104 def perform_approve_and_restore(performed_by, _args)
LOWapp/models/reviewable_post.rb110 def perform_approve_and_unhide(performed_by, _args)
LOWapp/models/reviewable_post.rb117 def perform_reject_and_delete(performed_by, _args)
LOWapp/models/reviewable_post.rb123 def perform_reject_and_suspend(performed_by, _args)
LOWapp/models/reviewable_user.rb146 def perform_delete_user_block(performed_by, args)
LOWapp/models/reviewable_flagged_post.rb159 def perform_ignore_and_do_nothing(performed_by, args)
LOWapp/models/reviewable_flagged_post.rb194 def perform_delete_and_block_user(performed_by, args)
LOWapp/models/reviewable_flagged_post.rb203 def perform_agree_and_restore(performed_by, args)
LOWapp/models/reviewable_flagged_post.rb253 def perform_delete_and_ignore(performed_by, args)
LOWapp/models/reviewable_flagged_post.rb259 def perform_delete_and_ignore_replies(performed_by, args)
LOWapp/models/reviewable_flagged_post.rb272 def perform_delete_and_agree_replies(performed_by, args)
LOWapp/models/topic_user.rb73 def auto_notification_for_staging(
LOWapp/models/topic_user.rb152 def notification_level_change(user_id, topic_id, notification_level, reason_id)
LOWapp/models/discourse_connect.rb120 def lookup_or_create_user_unsafe(ip_address)
LOWapp/models/discourse_connect.rb243 def match_email_or_create_user(ip_address)
LOWapp/models/discourse_connect.rb338 def change_external_attributes_and_override(sso_record, user)
LOWapp/models/topic.rb63 def filtered_topic_thumbnails(extra_sizes: [])
LOWapp/models/topic.rb1432 def participant_groups_summary(options = {})
LOWapp/models/topic.rb1623 def inherit_auto_close_from_category(timer_type: :close)
LOWapp/models/topic.rb1964 def convert_to_private_message(user)
LOWapp/models/topic.rb2048 def update_category_topic_count_by(num)
LOWapp/models/topic.rb2124 def rate_limit_topic_invitation(invited_by)
LOWapp/models/topic.rb2144 def cannot_permanently_delete_reason(user)
LOWapp/models/topic.rb2219 def invite_to_private_message(invited_by, target_user, guardian)
LOWapp/models/topic.rb2277 def apply_per_day_rate_limit_for(key, method_name)
LOWapp/models/group.rb459 def filter_posts_for_guardian(result, guardian, opts = nil)
LOWapp/models/group.rb860 def trigger_user_removed_event(user)
LOWapp/models/group.rb1187 def send_membership_notification(user)
LOWapp/models/category_list.rb284 def categories_with_descendants(categories = @categories)
LOWapp/models/user_notification_schedule.rb20 def create_do_not_disturb_timings(delete_existing: false)
LOWapp/models/theme_modifier_set.rb81 def add_theme_setting_modifier(modifier_name, setting_name)
LOWapp/models/theme_modifier_set.rb86 def refresh_theme_setting_modifiers(target_setting_name: nil, target_setting_value: nil)
LOWapp/models/remote_theme.rb435 def update_theme_color_schemes(theme, schemes)
LOWapp/models/remote_theme.rb509 def create_theme_site_settings(theme, theme_site_settings)
LOWapp/models/reviewable_queued_post.rb140 def perform_approve_post_closed(performed_by, args)
LOWapp/models/reviewable_queued_post.rb153 def perform_revise_and_reject_post(performed_by, args)
LOWapp/models/reviewable_queued_post.rb204 def perform_delete_and_block_user(performed_by, args)
LOWapp/models/post_action.rb114 def add_moderator_post_if_needed(moderator, disposition, delete_post = false)
LOWapp/models/theme.rb1033 def convert_list_to_json_schema(setting_row, setting)
LOWapp/models/unsubscribe_key.rb31 def get_unsubscribe_strategy_for(key)
LOWapp/models/upload.rb511 def sync_optimized_videos_secure_status(mark_secure)
LOWapp/models/post.rb575 def sync_category_description(category = nil)
LOWapp/models/post.rb1121 def update_uploads_secure_status(source:)
LOWapp/models/post.rb1204 def cannot_permanently_delete_reason(user)
LOWapp/models/post.rb1233 def parse_quote_into_arguments(quote)
LOWapp/models/post.rb1240 def add_to_quoted_post_numbers(num)
LOWapp/models/post.rb1246 def create_reply_relationship_with(post)
LOWapp/models/user.rb392 def secured_sidebar_category_ids(user_guardian = nil)
LOWapp/models/user.rb604 def enqueue_staff_welcome_message(role)
LOWapp/models/user.rb685 def unread_notifications_of_type(notification_type, since: nil)
LOWapp/models/user.rb702 def unread_notifications_of_priority(high_priority:)
LOWapp/models/user.rb857 def publish_reviewable_counts(extra_data = nil)
1331 more matches not shown…
Fake / Example Data405 hits · 468 pts
SeverityFileLineSnippet
LOWfrontend/discourse-i18n/src/index.js402 // I18n.prepareOptions({name: "John Doe"}, {name: "Mary Doe", role: "user"});
LOWfrontend/discourse-i18n/src/index.js403 // #=> {name: "John Doe", role: "user"}
LOWfrontend/discourse/tests/unit/models/composer-test.js535 { name: "foo@bar.com", type: "email" },
LOWfrontend/discourse/tests/unit/lib/to-markdown-test.js143 <p>Lorem ipsum <span>dolor sit amet, consectetur</span> <strike>elit.</strike></p>
LOWfrontend/discourse/tests/unit/lib/to-markdown-test.js143 <p>Lorem ipsum <span>dolor sit amet, consectetur</span> <strike>elit.</strike></p>
LOWfrontend/discourse/tests/unit/lib/to-markdown-test.js146 const markdown = `Lorem ipsum dolor sit amet, consectetur ~~elit.~~\n\nUt minim veniam, quis nostrud laboris ut aliq
LOWfrontend/discourse/tests/unit/lib/to-markdown-test.js146 const markdown = `Lorem ipsum dolor sit amet, consectetur ~~elit.~~\n\nUt minim veniam, quis nostrud laboris ut aliq
LOWfrontend/discourse/tests/unit/lib/to-markdown-test.js286 let html = `Lorem ipsum dolor sit amet,
LOWfrontend/discourse/tests/unit/lib/to-markdown-test.js286 let html = `Lorem ipsum dolor sit amet,
LOWfrontend/discourse/tests/unit/lib/to-markdown-test.js293 let output = `Lorem ipsum dolor sit amet, \n\n\`\`\`\nvar helloWorld = () => {\n alert(' hello \t\t world ');
LOWfrontend/discourse/tests/unit/lib/to-markdown-test.js293 let output = `Lorem ipsum dolor sit amet, \n\n\`\`\`\nvar helloWorld = () => {\n alert(' hello \t\t world ');
LOWfrontend/discourse/tests/unit/lib/to-markdown-test.js297 html = `Lorem ipsum dolor sit amet, <code>var helloWorld = () => {
LOWfrontend/discourse/tests/unit/lib/to-markdown-test.js297 html = `Lorem ipsum dolor sit amet, <code>var helloWorld = () => {
LOWfrontend/discourse/tests/unit/lib/to-markdown-test.js302 output = `Lorem ipsum dolor sit amet, \`var helloWorld = () => { alert(' hello world '); return; } helloWorld();\`co
LOWfrontend/discourse/tests/unit/lib/to-markdown-test.js302 output = `Lorem ipsum dolor sit amet, \`var helloWorld = () => { alert(' hello world '); return; } helloWorld();\`co
LOWfrontend/discourse/tests/unit/lib/to-markdown-test.js308 let html = "<blockquote>Lorem ipsum</blockquote>";
LOWfrontend/discourse/tests/unit/lib/to-markdown-test.js309 let output = "> Lorem ipsum";
LOWfrontend/discourse/tests/unit/lib/to-markdown-test.js313 "<blockquote>Lorem ipsum</blockquote><blockquote><p>dolor sit amet</p></blockquote>";
LOWfrontend/discourse/tests/unit/lib/to-markdown-test.js313 "<blockquote>Lorem ipsum</blockquote><blockquote><p>dolor sit amet</p></blockquote>";
LOWfrontend/discourse/tests/unit/lib/to-markdown-test.js314 output = "> Lorem ipsum\n\n> dolor sit amet";
LOWfrontend/discourse/tests/unit/lib/to-markdown-test.js314 output = "> Lorem ipsum\n\n> dolor sit amet";
LOWfrontend/discourse/tests/unit/lib/to-markdown-test.js318 "<blockquote>\nLorem ipsum\n<blockquote><p>dolor <blockquote>sit</blockquote> amet</p></blockquote></blockquote>";
LOWfrontend/discourse/tests/unit/lib/to-markdown-test.js319 output = "> Lorem ipsum\n>\n> > dolor\n> >\n> > > sit\n> >\n> > amet";
LOWfrontend/discourse/tests/unit/lib/build-quote-test.js49 buildQuote(post, "lorem ipsum", { full: true }),
LOWfrontend/discourse/tests/unit/lib/build-quote-test.js50 '[quote="eviltrout, post:1, topic:2, full:true"]\nlorem ipsum\n[/quote]\n\n',
LOW…ourse/tests/acceptance/create-account-external-test.js102 setupAuthData({ name: "John Doe", name_from_provider: true });
LOW…nd/discourse/tests/acceptance/composer-actions-test.js562 '[quote="bianca, post:1, topic:130, full:true"]\nLorem ipsum dolor sit amet, consectetur adipiscing elit. Maecen
LOW…nd/discourse/tests/acceptance/composer-actions-test.js562 '[quote="bianca, post:1, topic:130, full:true"]\nLorem ipsum dolor sit amet, consectetur adipiscing elit. Maecen
LOW…ourse/tests/acceptance/invite-show-user-fields-test.js52 await fillIn("#new-account-name", "John Doe");
LOW…tend/discourse/tests/acceptance/create-account-test.js126 Session.current().email = "foo@bar.com";
LOW…tend/discourse/tests/acceptance/create-account-test.js130 assert.strictEqual(email, "foo@bar.com");
LOW…e/tests/acceptance/group-manage-email-settings-test.js154 email_username: "test@test.com",
LOW…e/tests/acceptance/group-manage-email-settings-test.js172 .hasValue("test@test.com", "email username is prefilled");
LOW…ntend/discourse/tests/acceptance/invite-accept-test.js138 await fillIn("#new-account-name", "John Doe");
LOW…/javascripts/acceptance/chat-channel-reactions-test.js13 message: "Lorem ipsum!",
LOW…/javascripts/acceptance/chat-channel-reactions-test.js14 cooked: `<p>Lorem ipsum!</p>`,
LOWplugins/chat/spec/models/chat/direct_message_spec.rb84 new_user = Fabricate.build(:user, username: "johndoe", name: "John Doe")
LOWplugins/chat/spec/models/chat/direct_message_spec.rb88 I18n.t("chat.channel.dm_title.single_user", username: "John Doe"),
LOWplugins/chat/spec/models/chat/direct_message_spec.rb93 user2.update!(name: "John Doe")
LOWplugins/chat/spec/models/chat/direct_message_spec.rb108 new_user = Fabricate.build(:user, username: "johndoe", name: "John Doe")
LOW…discourse_workflows/data_table_rows_controller_spec.rb41 fab!(:row) { insert_data_table_row(data_table, "email" => "test@test.com") }
LOW…discourse_workflows/data_table_rows_controller_spec.rb54 expect(json["rows"][0]["email"]).to eq("test@test.com")
LOW…discourse_workflows/data_table_rows_controller_spec.rb75 filters: [{ columnName: "email", condition: "invalid", value: "test@test.com" }],
LOW…course_workflows/data_table_columns_controller_spec.rb38 fab!(:row) { insert_data_table_row(data_table, "email" => "test@test.com") }
LOW…course_workflows/data_table_columns_controller_spec.rb58 "email" => "test@test.com",
LOW…course_workflows/data_table_columns_controller_spec.rb71 fab!(:row) { insert_data_table_row(data_table, "email" => "test@test.com") }
LOW…course_workflows/data_table_columns_controller_spec.rb92 expect(row_data["contact_email"]).to eq("test@test.com")
LOW…course_workflows/data_table_columns_controller_spec.rb107 fab!(:row) { insert_data_table_row(data_table, "email" => "test@test.com", "score" => 7) }
LOW…pec/lib/discourse_workflows/data_tables/facade_spec.rb499 row = facade.insert(build_row_input({ "email" => "test@test.com" }, fill_missing: true))
LOW…pec/lib/discourse_workflows/data_tables/facade_spec.rb501 expect(row["email"]).to eq("test@test.com")
LOW…ices/discourse_workflows/data_table_row/update_spec.rb22 fab!(:row) { insert_data_table_row(data_table, "email" => "test@test.com", "score" => 1) }
LOW…ices/discourse_workflows/data_table_row/update_spec.rb27 "filters" => [{ "columnName" => "email", "condition" => "eq", "value" => "test@test.com" }],
LOW…ices/discourse_workflows/data_table_row/update_spec.rb85 "email" => "test@test.com",
LOW…scourse_workflows/data_table_row/update_single_spec.rb23 fab!(:row) { insert_data_table_row(data_table, "email" => "test@test.com", "score" => 1) }
LOW…scourse_workflows/data_table_row/update_single_spec.rb78 "email" => "test@test.com",
LOW…ices/discourse_workflows/data_table_row/insert_spec.rb23 { data_table_id: data_table.id, data: { "email" => "test@test.com", "score" => "42" } }
LOW…ices/discourse_workflows/data_table_row/insert_spec.rb70 expect(row.slice("email", "score")).to eq("email" => "test@test.com", "score" => 42)
LOW…ices/discourse_workflows/data_table_row/insert_spec.rb75 "email" => "test@test.com",
LOW…est/javascripts/unit/controllers/subscriptions-test.js27 this.currentUser.email = "user@example.com";
LOW…est/javascripts/unit/controllers/subscriptions-test.js39 'customer-email="user@example.com"'
345 more matches not shown…
Self-Referential Comments99 hits · 304 pts
SeverityFileLineSnippet
MEDIUMapp/models/topic_link.rb382 # Create the reflection if we can
MEDIUMapp/models/topic_link_click.rb14 # Create a click from a URL and post_id
MEDIUMapp/models/private_message_topic_tracking_state.rb3# This class is used to mirror unread and new status for private messages between
MEDIUMapp/models/topic_list.rb104 # Create a lookup for all the user ids we need
MEDIUMapp/models/reviewable.rb122 # Create a new reviewable, or if the target has already been reviewed return it to the
MEDIUMapp/models/topic_tracking_state.rb3# This class is used to mirror unread and new status back to end users
MEDIUMapp/models/post.rb966 # Create a reply relationship between quoted posts and this new post
MEDIUMapp/models/concerns/reviewable_action_builder.rb169 # Create a result object.
MEDIUMapp/jobs/regular/group_smtp_email.rb79 # Create an incoming email record for tracking purposes.
MEDIUMapp/controllers/application_controller.rb615 # This method is intended to be a no-op.
MEDIUMapp/services/theme_settings_migrations_runner.rb7 # Defining a method `get_category_id_by_name` will result in the `getCategoryIdByName` function being made available
MEDIUMapp/services/post_alerter.rb696 # Create the notification
MEDIUM…services/video_conversion/aws_media_convert_adapter.rb310 # Create a temporary upload object to leverage FileStore::BaseStore path generation
MEDIUM…ervices/notifications/delete_previous_notifications.rb3# Create a new notification while deleting previous versions of it.
MEDIUMconfig/locales/transliterate.bg.yml2# This file contains content for the i18n transliteration map from
MEDIUMconfig/locales/transliterate.de.yml3# This file contains transliteration rules for German
MEDIUMconfig/locales/transliterate.ru.yml2# This file contains content for the i18n transliteration map from
MEDIUMconfig/locales/transliterate.en.yml3# This file contains default transliteration rules and configures stringex
MEDIUMconfig/locales/transliterate.vi.yml3# This file contains transliteration rules for Vietnamese
MEDIUMconfig/locales/transliterate.ug.yml3# This file contains transliteration rules for Uyghur based on
MEDIUMconfig/locales/transliterate.ar.yml3# This file contains transliteration rules for Arabic
MEDIUMconfig/initializers/100-wrap_parameters.rb5# This file contains settings for ActionController::ParamsWrapper which
MEDIUM…ration/app/jobs/onceoff/migrate_from_slack_official.rb88 # Create the rule, with clever logic for avoiding duplicates
MEDIUM…ugins/discourse-chat-integration/app/helpers/helper.rb151 # Create a rule for a specific channel
MEDIUM…scourse-chat-integration/spec/services/manager_spec.rb292 # Create a group & user
MEDIUM…scourse-chat-integration/spec/services/manager_spec.rb300 # Create a category
MEDIUM…/discourse-adplugin/spec/system/admin_house_ad_spec.rb30 # Create a new ad
MEDIUM…s/chat/app/queries/chat/tracking_state_report_query.rb4 # This class is responsible for querying the user's current tracking
MEDIUMplugins/chat/spec/system/uploads_spec.rb23 # Define the JavaScript to simulate dragging an external image
MEDIUMplugins/chat/spec/lib/chat/message_processor_spec.rb22 # Create a message with an image in a onebox (common when posting URLs with images)
MEDIUM…at/spec/services/video_conversion/chat_message_spec.rb10 # Create a chat message with video upload
MEDIUMplugins/chat/lib/chat_sdk/message.rb33 # This method is a convenience wrapper around `create` with `streaming: true` set by default.
MEDIUM…s/discourse-assign/spec/components/topic_query_spec.rb108 # Create a new topic with only a post assignment (no topic assignment)
MEDIUMplugins/discourse-assign/lib/assigner.rb364 # Create a webhook event
MEDIUMplugins/discourse-assign/lib/assigner.rb425 # Create a webhook event
MEDIUMplugins/discourse-ai/app/models/ai_artifact.rb85 # Create the version record
MEDIUM…iscourse-ai/spec/models/shared_ai_conversation_spec.rb76 # Create a post with an AI artifact
MEDIUM…se-ai/spec/requests/admin/ai_agents_controller_spec.rb332 # Create the agent
MEDIUM…se-ai/spec/requests/ai_bot/topic_serialization_spec.rb17 # Create a bot post with the custom field set
MEDIUM…se-ai/spec/lib/discourse_automation/llm_triage_spec.rb207 # Create a post and capture its topic
MEDIUM…spec/lib/discourse_automation/llm_agent_triage_spec.rb21 # Create the user for this agent
MEDIUM…spec/lib/discourse_automation/llm_agent_triage_spec.rb221 # Create a category and tags for the test
MEDIUM…spec/lib/discourse_automation/llm_agent_triage_spec.rb226 # Create a topic with category and tags
MEDIUM…spec/lib/discourse_automation/llm_agent_triage_spec.rb236 # Create a post in that topic
MEDIUM…spec/lib/discourse_automation/llm_agent_triage_spec.rb293 # Create a private message topic
MEDIUM…spec/lib/discourse_automation/llm_agent_triage_spec.rb305 # Create a follow-up post
MEDIUM…scourse-ai/spec/lib/completions/cancel_manager_spec.rb72 # Create a model that points to our hanging server
MEDIUM…i/spec/lib/completions/prompt_messages_builder_spec.rb83 # Create a topic with tags
MEDIUM…se-ai/spec/lib/completions/endpoints/anthropic_spec.rb825 # Create a mock prompt with tool results in messages (simulating what dialect produces)
MEDIUM…/discourse-ai/spec/lib/agents/tools/edit_image_spec.rb102 # Create a private message post with an upload
MEDIUM…/discourse-ai/spec/lib/agents/tools/edit_image_spec.rb106 # Create an upload associated with the private post
MEDIUM…/discourse-ai/spec/lib/agents/tools/edit_image_spec.rb130 # Create a private message post with an upload
MEDIUM…/discourse-ai/spec/lib/agents/tools/edit_image_spec.rb134 # Create an upload associated with the private post
MEDIUM…/discourse-ai/spec/lib/agents/tools/edit_image_spec.rb159 # Create a tool that raises an error
MEDIUM…/discourse-ai/spec/lib/agents/tools/researcher_spec.rb28 # Create a second LLM model to test the researcher_llm option
MEDIUM…iscourse-ai/spec/lib/agents/tools/create_image_spec.rb81 # Create a tool that raises an error
MEDIUM…ourse-ai/spec/lib/utils/ai_staff_action_logger_spec.rb51 # Create a agent with a large system prompt
MEDIUM…ourse-ai/spec/lib/utils/ai_staff_action_logger_spec.rb412 # Create a quota for the model
MEDIUM…ourse-ai/spec/lib/utils/research/llm_formatter_spec.rb27 # Create a post with content that will exceed our token limit
MEDIUM…ns/discourse-ai/spec/lib/automation/llm_tagger_spec.rb216 # Create an additional tag that's not in manual list
39 more matches not shown…
Hallucination Indicators16 hits · 175 pts
SeverityFileLineSnippet
CRITICAL…d/discourse/app/static/prosemirror/extensions/quote.js164 const paragraph = view.state.schema.nodes.paragraph.create();
CRITICAL…nd/discourse/app/static/prosemirror/extensions/link.js342 tr.addMark(from, to, view.state.schema.marks.link.create({ href: text }));
CRITICAL…p/static/prosemirror/extensions/override-drag-ghost.js62 const wrappedNode = view.state.schema.nodes.paragraph.create(
CRITICAL…urse/app/static/prosemirror/extensions/link-toolbar.js202 this.#view.state.schema.nodes.paragraph.create(
CRITICAL…/discourse/app/static/prosemirror/extensions/onebox.js372 view.state.schema.nodes.onebox_inline.create({
CRITICAL…/discourse/app/static/prosemirror/extensions/onebox.js386 const oneboxNode = view.state.schema.nodes.onebox.create({
CRITICALfrontend/discourse/app/lib/flag-targets/topic-flag.js29 flagModal.args.model.flagModel.actions_summary.forEach((a) => {
CRITICALfrontend/discourse/app/lib/flag-targets/topic-flag.js37 return flagModal.args.model.flagModel.actions_summary.some((a) => {
CRITICALfrontend/discourse/app/lib/flag-targets/post-flag.js48 return flagModal.args.model.flagModel.actions_summary.find(
CRITICALconfig/initializers/assets.rb12Rails.application.config.assets.paths.push(
CRITICALconfig/initializers/assets.rb19Rails.application.config.assets.paths.push(
CRITICALconfig/initializers/assets.rb24Rails.application.config.assets.excluded_paths.push(
CRITICAL…g/assets/javascripts/discourse/lib/post-voting-flag.js26 return flagModal.args.model.flagModel.availableFlags.includes(
CRITICAL…/assets/javascripts/discourse/lib/chat-message-flag.js52 flagModal.args.model.flagModel.availableFlags.includes(flag.name_key) &&
CRITICALspec/requests/invites_controller_spec.rb1244 expect(invite.invited_users.first.user.groups.pluck(:name)).to contain_exactly(
CRITICALlib/middleware/default_headers.rb17 Rails.application.config.action_dispatch.default_headers.to_h.except(*EXCLUDED_HEADERS)
Decorative Section Separators25 hits · 80 pts
SeverityFileLineSnippet
MEDIUMapp/assets/stylesheets/common/nested-view.scss3// ── Top-level nested view ──────────────────────────────────────────
MEDIUMapp/assets/stylesheets/common/nested-view.scss311// ── Nested post (single comment in tree) ───────────────────────────
MEDIUMapp/assets/stylesheets/common/nested-view.scss844// ── Children container ─────────────────────────────────────────────
MEDIUMapp/assets/stylesheets/common/nested-view.scss880// ── Context view ──────────────────────────────────────────────────
MEDIUMapp/assets/stylesheets/common/nested-view.scss924// ── Deep-link highlight animation ──────────────────────────────────
MEDIUMapp/assets/stylesheets/common/nested-view.scss939// ── Activity log modal ────────────────────────────────────────────
MEDIUMapp/assets/stylesheets/common/nested-view.scss994// ── Mobile layout ─────────────────────────────────────────────────
MEDIUMplugins/chat/lib/chat/message_mover.rb8# -------------------
MEDIUMplugins/chat/lib/chat/transcript_service.rb311 # ----------------------------------------
MEDIUMspec/system/page_objects/pages/nested_view.rb41 # ── Root view assertions ──────────────────────────────────────
MEDIUMspec/system/page_objects/pages/nested_view.rb59 # ── Context view assertions ───────────────────────────────────
MEDIUMspec/system/page_objects/pages/nested_view.rb77 # ── Post assertions ───────────────────────────────────────────
MEDIUMspec/system/page_objects/pages/nested_view.rb294 # ── Actions ───────────────────────────────────────────────────
MEDIUMspec/system/page_objects/pages/nested_view.rb442 # ── Deletion/recovery assertions ─────────────────────────────
MEDIUMspec/system/page_objects/pages/nested_view.rb477 # ── Ignored-user placeholder assertions ──────────────────────
MEDIUMspec/system/page_objects/pages/nested_view.rb494 # ── Post actions ────────────────────────────────────────────
MEDIUMspec/system/page_objects/pages/nested_view.rb517 # ── Pinned post assertions ─────────────────────────────────
MEDIUMspec/system/page_objects/pages/nested_view.rb527 # ── Load more ───────────────────────────────────────────────
MEDIUMspec/system/page_objects/pages/nested_view.rb538 # ── Cloaking ─────────────────────────────────────────────────
MEDIUMspec/system/page_objects/pages/nested_view.rb557 # ── Suggested topics ──────────────────────────────────────────
MEDIUMscript/memstats.rb6#------------------------------------------------------------------------------
MEDIUMscript/memstats.rb28#------------------------------------------------------------------------------
MEDIUMlib/discourse_webauthn/registration_service.rb85 #==================================================
MEDIUMlib/discourse_webauthn/registration_service.rb89 #==================================================
MEDIUMlib/discourse_webauthn/registration_service.rb98 #==================================================
Redundant / Tautological Comments28 hits · 44 pts
SeverityFileLineSnippet
LOWapp/controllers/list_controller.rb430 # Check if the category slug is incorrect and redirect to a link containing
LOW…discourse-assign/spec/requests/list_controller_spec.rb436 # Assign topics to different users and groups
LOW…discourse-assign/spec/requests/list_controller_spec.rb459 # Assign topics to different users and groups
LOW…ugins/discourse-ai/app/models/llm_credit_allocation.rb40 # Check if association is preloaded to avoid N+1 queries
LOW…ins/discourse-ai/app/jobs/regular/digest_rag_upload.rb24 # Check if this is the first time we process this upload.
LOWplugins/discourse-ai/discourse_automation/llm_tagger.rb107 # Check if we can perform the action before proceeding
LOW…spec/lib/discourse_automation/llm_agent_triage_spec.rb207 # Set up to cause an error
LOW…ugins/discourse-ai/lib/agents/tool_runner/discourse.rb229 # Check if user already exists
LOWplugins/discourse-ai/lib/agents/tools/edit_image.rb67 # Check if upload has access control
LOWplugins/discourse-ai/lib/automation/llm_triage.rb194 # Check if another triage rule already created a reviewable for this post.
LOWplugins/discourse-ai/lib/ai_bot/entry_point.rb100 # Check if the only recipients are bots
LOW…rs/discourse_subscriptions/user/payments_controller.rb93 # Check if the charge is associated with the given email and has no customer ID
LOW…rs/discourse_subscriptions/user/payments_controller.rb99 # Check if there are more charges to fetch
LOW…rs/discourse_subscriptions/user/payments_controller.rb102 # Set starting_after to the last charge's ID for the next batch
LOWspec/requests/admin/themes_controller_spec.rb1008 # Set back to default
LOW…regular/site_setting_update_default_categories_spec.rb41 # Set default_categories_watching to the new value otherwise
LOWscript/backport.rb78 # Check if release branch exists
LOWscript/bulk_import/uploads_importer.yml29# Check if files are missing in the upload store and update the database accordingly.
LOWscript/bulk_import/uploads_importer.yml51 # Set this to true if the site is a multisite and configure the `multisite_db_name` accordingly
LOWscript/import_scripts/friendsmegplus.rb38 # Set this to the base URL for the site; required for importing videos
LOWscript/import_scripts/discuz_x.rb24 # Set DISCUZX_BASE_DIR to the base directory of your discuz installation.
LOWscript/import_scripts/zoho.rb176 # Check if Zoho's most common form of a code block is present.
LOW.github/workflows/migration-tests.yml88 # Check if generated output matches what's committed
LOWlib/validators/video_conversion_enabled_validator.rb13 # Check if MediaConvert role ARN is provided
LOWlib/validators/video_conversion_enabled_validator.rb16 # Check if S3 credentials are provided (either access keys or IAM profile)
LOWlib/validators/video_conversion_enabled_validator.rb37 # Check if using IAM profile
LOWlib/validators/video_conversion_enabled_validator.rb40 # Check if access key and secret are provided
LOW…rate/20250626090725_add_my_messages_link_to_sidebar.rb13 # Check if "My Messages" link already exists
AI Slop Vocabulary20 hits · 40 pts
SeverityFileLineSnippet
LOWapp/models/category.rb782 # Ideally we can just call .clear here, but it runs SQL, we only want to run it
LOWapp/models/theme_field.rb464 self.value_baked = Digest::SHA1.hexdigest(result.join(",")) # We don't use the compiled CSS here, we just use it to
LOWapp/models/email_token.rb72 # If the user's email is already taken, just return nil (failure)
MEDIUMapp/models/post.rb637 # Ideally we would want a more comprehensive way of saying that certain
MEDIUM…services/video_conversion/aws_media_convert_adapter.rb310 # Create a temporary upload object to leverage FileStore::BaseStore path generation
MEDIUMconfig/initializers/100-secret_token.rb4# backwards support of "seamless" upgrade from Rails 3.
LOW…scourse-ai/spec/lib/completions/endpoints/nova_spec.rb233 # lets just return the tool call again, this is about ensuring we encode the prompt right
MEDIUM…ugins/discourse-ai/lib/agents/tool_runner/discourse.rb18 # default to public visibility and only elevate when `with_private: true`
MEDIUMspec/lib/pretty_text_spec.rb1455 <iframe width="640" height="360" src="https://player.vimeo.com/video/1" data-original-href="https://vimeo.co
LOWspec/lib/trashable_spec.rb4 # post is trashable, just use it.
MEDIUMspec/lib/onebox/engine/loom_onebox_spec.rb13 '<iframe class="loom-onebox" src="https://www.loom.com/embed/c9695e5dc084496c80b7d7516d2a569a?sid=e1279914-ecaa-4f
MEDIUMspec/lib/onebox/engine/wistia_onebox_spec.rb16 '<iframe src="https://fast.wistia.net/embed/iframe/26sk4lmiix" width="960" height="540" title="Nice." frameborder=
MEDIUMscript/import_scripts/lithium.rb8# If you have leverage you may get a data dump, in my case it was provided in XML
LOWlib/site_setting_extension.rb884 # a custom getter for it, so we can just use the normal getter
LOWlib/topic_query.rb758 # topics. Otherwise, just use bumped_at.
LOWlib/onebox/engine/youtube_onebox.rb178 # use params.include? so that you can just add "&loop"
LOWlib/onebox/engine/amazon_onebox.rb155 # available and where to find it so just set it all to nil
LOWlib/onebox/engine/amazon_onebox.rb198 # available and where to find it so just set it all to nil
LOWlib/second_factor/actions/discourse_connect_provider.rb15 # 'prompt=none' was requested, so just return a failed authentication
LOW…ate/20250714010001_backfill_themeable_site_settings.rb11 # and theme site settings will just use the default value.
Example Usage Blocks14 hits · 23 pts
SeverityFileLineSnippet
LOWapp/assets/stylesheets/common/foundation/mixins.scss207// Example usage:
LOWplugins/discourse-oauth2-basic/plugin.rb27# Example usage:
LOWspec/support/theme_screenshot_marker.rb5# Usage:
LOWlib/discourse.rb18 # Usage:
LOWlib/discourse_webauthn.rb69 # Usage:
LOWlib/plugin/instance.rb304 # Example usage:
LOWlib/plugin/instance.rb346 # Example usage:
LOWlib/plugin/instance.rb355 # Example usage:
LOWlib/plugin/instance.rb376 # Example usage:
LOWlib/plugin/instance.rb120 # Example usage:
LOWlib/plugin/instance.rb393 # Example usage:
LOWlib/plugin/instance.rb416 # Example usage:
LOWlib/emoji/regex_generator.rb11# Usage:
LOWlib/scheduler/thread_pool.rb8 # Usage:
Slop Phrases11 hits · 20 pts
SeverityFileLineSnippet
MEDIUM…/lib/discourse_webauthn/authentication_service_spec.rb36# @params will contain authenticatorData and signature which you can use as is.
LOWscript/bulk_import/discourse_merger.rb458 # make sure to get a backup with uploads then convert them to local.
LOWscript/import_scripts/mylittleforum.rb35# If you update the Docker container and perform another import afterwards, make sure to back up these files beforehand.
LOWscript/import_scripts/mybbru.rb9# If your forum has non-English usernames, don't forget to enable Unicode usernames in /admin/site_settings
LOWscript/import_scripts/mybbru.rb9# If your forum has non-English usernames, don't forget to enable Unicode usernames in /admin/site_settings
MEDIUMlib/discourse.rb1058 # you can use Discourse.warn when you want to report custom environment
MEDIUMlib/plugin/instance.rb1181 # We'll include the HTML inside the unsubscribe form, so you can add your fields using the
LOWlib/plugin/instance.rb763 # When using this, make sure to consider the effect on AnonymousCache
LOWlib/email_controller_helper/base_email_unsubscriber.rb13 # Don't forget to call super when extending this method.
LOWlib/email_controller_helper/base_email_unsubscriber.rb31 # Don't forget to call super when extending this method.
LOW…43_ensure_anonymous_and_logged_in_users_auto_groups.rb15 # new auto groups. Also make sure to rebake posts & update group mentions.
Cross-Language Confusion (JS/TS)1 hit · 5 pts
SeverityFileLineSnippet
HIGHfrontend/discourse/app/controllers/topic.js1799 print() {
Magic Placeholder Names1 hit · 5 pts
SeverityFileLineSnippet
HIGH…lib/ai_tool_scripts/presets/image_generation/custom.js4 const apiKey = "YOUR_API_KEY";
Verbosity Indicators1 hit · 2 pts
SeverityFileLineSnippet
LOWlib/post_action_creator.rb128 # We need to check if the creator exists because it's possible `create_message_creator` returns nil