.rubocop_todo.yml 34 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865
  1. # This configuration was generated by
  2. # `rubocop --auto-gen-config --auto-gen-only-exclude --no-exclude-limit --no-offense-counts --no-auto-gen-timestamp`
  3. # using RuboCop version 1.56.3.
  4. # The point is for the user to remove these configuration records
  5. # one by one as the offenses are removed from the code base.
  6. # Note that changes in the inspected code, or installation of new
  7. # versions of RuboCop, may require this file to be generated again.
  8. # This cop supports safe autocorrection (--autocorrect).
  9. # Configuration parameters: TreatCommentsAsGroupSeparators, ConsiderPunctuation, Include.
  10. # Include: **/*.gemfile, **/Gemfile, **/gems.rb
  11. Bundler/OrderedGems:
  12. Exclude:
  13. - 'Gemfile'
  14. # This cop supports safe autocorrection (--autocorrect).
  15. # Configuration parameters: EnforcedStyle, IndentationWidth.
  16. # SupportedStyles: with_first_argument, with_fixed_indentation
  17. Layout/ArgumentAlignment:
  18. Exclude:
  19. - 'config/initializers/cors.rb'
  20. - 'config/initializers/session_store.rb'
  21. # This cop supports safe autocorrection (--autocorrect).
  22. # Configuration parameters: AllowMultipleStyles, EnforcedHashRocketStyle, EnforcedColonStyle, EnforcedLastArgumentHashStyle.
  23. # SupportedHashRocketStyles: key, separator, table
  24. # SupportedColonStyles: key, separator, table
  25. # SupportedLastArgumentHashStyles: always_inspect, always_ignore, ignore_implicit, ignore_explicit
  26. Layout/HashAlignment:
  27. Exclude:
  28. - 'config/environments/production.rb'
  29. - 'config/initializers/rack_attack.rb'
  30. - 'config/routes.rb'
  31. # This cop supports safe autocorrection (--autocorrect).
  32. # Configuration parameters: AllowDoxygenCommentStyle, AllowGemfileRubyComment.
  33. Layout/LeadingCommentSpace:
  34. Exclude:
  35. - 'config/application.rb'
  36. - 'config/initializers/3_omniauth.rb'
  37. # This cop supports safe autocorrection (--autocorrect).
  38. # Configuration parameters: Max, AllowHeredoc, AllowURI, URISchemes, IgnoreCopDirectives, AllowedPatterns.
  39. # URISchemes: http, https
  40. Layout/LineLength:
  41. Exclude:
  42. - 'app/models/account.rb'
  43. # This cop supports safe autocorrection (--autocorrect).
  44. # Configuration parameters: EnforcedStyle.
  45. # SupportedStyles: require_no_space, require_space
  46. Layout/SpaceInLambdaLiteral:
  47. Exclude:
  48. - 'config/environments/production.rb'
  49. - 'config/initializers/content_security_policy.rb'
  50. # Configuration parameters: IgnoreLiteralBranches, IgnoreConstantBranches.
  51. Lint/DuplicateBranch:
  52. Exclude:
  53. - 'app/lib/account_statuses_filter.rb'
  54. # Configuration parameters: AllowComments, AllowEmptyLambdas.
  55. Lint/EmptyBlock:
  56. Exclude:
  57. - 'spec/controllers/api/v2/search_controller_spec.rb'
  58. - 'spec/fabricators/access_token_fabricator.rb'
  59. - 'spec/fabricators/conversation_fabricator.rb'
  60. - 'spec/fabricators/system_key_fabricator.rb'
  61. - 'spec/lib/activitypub/adapter_spec.rb'
  62. - 'spec/models/user_role_spec.rb'
  63. Lint/NonLocalExitFromIterator:
  64. Exclude:
  65. - 'app/helpers/jsonld_helper.rb'
  66. # This cop supports unsafe autocorrection (--autocorrect-all).
  67. Lint/OrAssignmentToConstant:
  68. Exclude:
  69. - 'lib/sanitize_ext/sanitize_config.rb'
  70. # This cop supports safe autocorrection (--autocorrect).
  71. # Configuration parameters: IgnoreEmptyBlocks, AllowUnusedKeywordArguments.
  72. Lint/UnusedBlockArgument:
  73. Exclude:
  74. - 'config/initializers/content_security_policy.rb'
  75. - 'config/initializers/doorkeeper.rb'
  76. - 'config/initializers/paperclip.rb'
  77. - 'config/initializers/simple_form.rb'
  78. # This cop supports unsafe autocorrection (--autocorrect-all).
  79. Lint/UselessAssignment:
  80. Exclude:
  81. - 'app/services/activitypub/process_status_update_service.rb'
  82. - 'config/initializers/3_omniauth.rb'
  83. - 'db/migrate/20190511134027_add_silenced_at_suspended_at_to_accounts.rb'
  84. - 'db/post_migrate/20190511152737_remove_suspended_silenced_account_fields.rb'
  85. - 'spec/controllers/api/v1/favourites_controller_spec.rb'
  86. - 'spec/controllers/concerns/account_controller_concern_spec.rb'
  87. - 'spec/helpers/jsonld_helper_spec.rb'
  88. - 'spec/models/account_spec.rb'
  89. - 'spec/models/domain_block_spec.rb'
  90. - 'spec/models/status_spec.rb'
  91. - 'spec/models/user_spec.rb'
  92. - 'spec/models/webauthn_credentials_spec.rb'
  93. - 'spec/services/account_search_service_spec.rb'
  94. - 'spec/services/post_status_service_spec.rb'
  95. - 'spec/services/precompute_feed_service_spec.rb'
  96. - 'spec/services/resolve_url_service_spec.rb'
  97. - 'spec/views/statuses/show.html.haml_spec.rb'
  98. # Configuration parameters: AllowedMethods, AllowedPatterns, CountRepeatedAttributes.
  99. Metrics/AbcSize:
  100. Max: 149
  101. # Configuration parameters: CountBlocks, Max.
  102. Metrics/BlockNesting:
  103. Exclude:
  104. - 'lib/tasks/mastodon.rake'
  105. # Configuration parameters: AllowedMethods, AllowedPatterns.
  106. Metrics/CyclomaticComplexity:
  107. Max: 25
  108. # Configuration parameters: AllowedMethods, AllowedPatterns.
  109. Metrics/PerceivedComplexity:
  110. Max: 27
  111. # Configuration parameters: EnforcedStyle, CheckMethodNames, CheckSymbols, AllowedIdentifiers, AllowedPatterns.
  112. # SupportedStyles: snake_case, normalcase, non_integer
  113. # AllowedIdentifiers: capture3, iso8601, rfc1123_date, rfc822, rfc2822, rfc3339, x86_64
  114. Naming/VariableNumber:
  115. Exclude:
  116. - 'db/migrate/20180106000232_add_index_on_statuses_for_api_v1_accounts_account_id_statuses.rb'
  117. - 'db/migrate/20180514140000_revert_index_change_on_statuses_for_api_v1_accounts_account_id_statuses.rb'
  118. - 'db/migrate/20190820003045_update_statuses_index.rb'
  119. - 'db/migrate/20190823221802_add_local_index_to_statuses.rb'
  120. - 'db/migrate/20200119112504_add_public_index_to_statuses.rb'
  121. - 'spec/models/account_spec.rb'
  122. - 'spec/models/domain_block_spec.rb'
  123. - 'spec/models/user_spec.rb'
  124. # This cop supports unsafe autocorrection (--autocorrect-all).
  125. # Configuration parameters: SafeMultiline.
  126. Performance/DeletePrefix:
  127. Exclude:
  128. - 'app/models/featured_tag.rb'
  129. Performance/MapMethodChain:
  130. Exclude:
  131. - 'app/models/feed.rb'
  132. - 'lib/mastodon/cli/maintenance.rb'
  133. - 'spec/services/bulk_import_service_spec.rb'
  134. - 'spec/services/import_service_spec.rb'
  135. RSpec/AnyInstance:
  136. Exclude:
  137. - 'spec/controllers/activitypub/inboxes_controller_spec.rb'
  138. - 'spec/controllers/admin/accounts_controller_spec.rb'
  139. - 'spec/controllers/admin/resets_controller_spec.rb'
  140. - 'spec/controllers/admin/settings/branding_controller_spec.rb'
  141. - 'spec/controllers/api/v1/media_controller_spec.rb'
  142. - 'spec/controllers/auth/sessions_controller_spec.rb'
  143. - 'spec/controllers/settings/two_factor_authentication/confirmations_controller_spec.rb'
  144. - 'spec/controllers/settings/two_factor_authentication/recovery_codes_controller_spec.rb'
  145. - 'spec/lib/request_spec.rb'
  146. - 'spec/lib/status_filter_spec.rb'
  147. - 'spec/models/account_spec.rb'
  148. - 'spec/models/setting_spec.rb'
  149. - 'spec/services/activitypub/process_collection_service_spec.rb'
  150. - 'spec/validators/follow_limit_validator_spec.rb'
  151. - 'spec/workers/activitypub/delivery_worker_spec.rb'
  152. - 'spec/workers/web/push_notification_worker_spec.rb'
  153. # Configuration parameters: CountAsOne.
  154. RSpec/ExampleLength:
  155. Max: 22
  156. # This cop supports safe autocorrection (--autocorrect).
  157. # Configuration parameters: EnforcedStyle.
  158. # SupportedStyles: implicit, each, example
  159. RSpec/HookArgument:
  160. Exclude:
  161. - 'spec/controllers/api/v1/streaming_controller_spec.rb'
  162. - 'spec/controllers/well_known/webfinger_controller_spec.rb'
  163. - 'spec/helpers/instance_helper_spec.rb'
  164. - 'spec/models/user_spec.rb'
  165. - 'spec/rails_helper.rb'
  166. - 'spec/serializers/activitypub/note_serializer_spec.rb'
  167. - 'spec/serializers/activitypub/update_poll_serializer_spec.rb'
  168. - 'spec/services/import_service_spec.rb'
  169. # Configuration parameters: AssignmentOnly.
  170. RSpec/InstanceVariable:
  171. Exclude:
  172. - 'spec/controllers/api/v1/streaming_controller_spec.rb'
  173. - 'spec/controllers/auth/confirmations_controller_spec.rb'
  174. - 'spec/controllers/auth/passwords_controller_spec.rb'
  175. - 'spec/controllers/auth/sessions_controller_spec.rb'
  176. - 'spec/controllers/concerns/export_controller_concern_spec.rb'
  177. - 'spec/controllers/home_controller_spec.rb'
  178. - 'spec/controllers/settings/two_factor_authentication/webauthn_credentials_controller_spec.rb'
  179. - 'spec/controllers/statuses_cleanup_controller_spec.rb'
  180. - 'spec/models/concerns/account_finder_concern_spec.rb'
  181. - 'spec/models/concerns/account_interactions_spec.rb'
  182. - 'spec/models/public_feed_spec.rb'
  183. - 'spec/serializers/activitypub/note_serializer_spec.rb'
  184. - 'spec/serializers/activitypub/update_poll_serializer_spec.rb'
  185. - 'spec/services/remove_status_service_spec.rb'
  186. - 'spec/services/search_service_spec.rb'
  187. - 'spec/services/unblock_domain_service_spec.rb'
  188. RSpec/LetSetup:
  189. Exclude:
  190. - 'spec/controllers/admin/accounts_controller_spec.rb'
  191. - 'spec/controllers/admin/action_logs_controller_spec.rb'
  192. - 'spec/controllers/admin/instances_controller_spec.rb'
  193. - 'spec/controllers/admin/reports/actions_controller_spec.rb'
  194. - 'spec/controllers/admin/statuses_controller_spec.rb'
  195. - 'spec/controllers/api/v1/accounts/statuses_controller_spec.rb'
  196. - 'spec/controllers/api/v1/admin/accounts_controller_spec.rb'
  197. - 'spec/controllers/api/v1/filters_controller_spec.rb'
  198. - 'spec/controllers/api/v1/followed_tags_controller_spec.rb'
  199. - 'spec/controllers/api/v2/admin/accounts_controller_spec.rb'
  200. - 'spec/controllers/api/v2/filters/keywords_controller_spec.rb'
  201. - 'spec/controllers/api/v2/filters/statuses_controller_spec.rb'
  202. - 'spec/controllers/auth/confirmations_controller_spec.rb'
  203. - 'spec/controllers/auth/passwords_controller_spec.rb'
  204. - 'spec/controllers/auth/sessions_controller_spec.rb'
  205. - 'spec/controllers/follower_accounts_controller_spec.rb'
  206. - 'spec/controllers/following_accounts_controller_spec.rb'
  207. - 'spec/controllers/oauth/authorized_applications_controller_spec.rb'
  208. - 'spec/controllers/oauth/tokens_controller_spec.rb'
  209. - 'spec/controllers/settings/imports_controller_spec.rb'
  210. - 'spec/lib/activitypub/activity/delete_spec.rb'
  211. - 'spec/lib/vacuum/applications_vacuum_spec.rb'
  212. - 'spec/lib/vacuum/preview_cards_vacuum_spec.rb'
  213. - 'spec/models/account_spec.rb'
  214. - 'spec/models/account_statuses_cleanup_policy_spec.rb'
  215. - 'spec/models/canonical_email_block_spec.rb'
  216. - 'spec/models/status_spec.rb'
  217. - 'spec/models/user_spec.rb'
  218. - 'spec/services/account_statuses_cleanup_service_spec.rb'
  219. - 'spec/services/activitypub/fetch_featured_collection_service_spec.rb'
  220. - 'spec/services/activitypub/fetch_remote_status_service_spec.rb'
  221. - 'spec/services/activitypub/process_account_service_spec.rb'
  222. - 'spec/services/activitypub/process_collection_service_spec.rb'
  223. - 'spec/services/batched_remove_status_service_spec.rb'
  224. - 'spec/services/block_domain_service_spec.rb'
  225. - 'spec/services/bulk_import_service_spec.rb'
  226. - 'spec/services/delete_account_service_spec.rb'
  227. - 'spec/services/import_service_spec.rb'
  228. - 'spec/services/notify_service_spec.rb'
  229. - 'spec/services/remove_status_service_spec.rb'
  230. - 'spec/services/report_service_spec.rb'
  231. - 'spec/services/resolve_account_service_spec.rb'
  232. - 'spec/services/suspend_account_service_spec.rb'
  233. - 'spec/services/unallow_domain_service_spec.rb'
  234. - 'spec/services/unsuspend_account_service_spec.rb'
  235. - 'spec/workers/scheduler/user_cleanup_scheduler_spec.rb'
  236. RSpec/MessageChain:
  237. Exclude:
  238. - 'spec/controllers/api/v1/media_controller_spec.rb'
  239. - 'spec/models/concerns/remotable_spec.rb'
  240. - 'spec/models/session_activation_spec.rb'
  241. - 'spec/models/setting_spec.rb'
  242. # Configuration parameters: EnforcedStyle.
  243. # SupportedStyles: have_received, receive
  244. RSpec/MessageSpies:
  245. Exclude:
  246. - 'spec/controllers/admin/accounts_controller_spec.rb'
  247. - 'spec/helpers/admin/account_moderation_notes_helper_spec.rb'
  248. - 'spec/lib/webfinger_resource_spec.rb'
  249. - 'spec/models/admin/account_action_spec.rb'
  250. - 'spec/models/concerns/remotable_spec.rb'
  251. - 'spec/models/follow_request_spec.rb'
  252. - 'spec/models/identity_spec.rb'
  253. - 'spec/models/session_activation_spec.rb'
  254. - 'spec/models/setting_spec.rb'
  255. - 'spec/services/activitypub/fetch_replies_service_spec.rb'
  256. - 'spec/services/activitypub/process_collection_service_spec.rb'
  257. - 'spec/spec_helper.rb'
  258. - 'spec/validators/status_length_validator_spec.rb'
  259. RSpec/MultipleExpectations:
  260. Max: 8
  261. # Configuration parameters: AllowSubject.
  262. RSpec/MultipleMemoizedHelpers:
  263. Max: 21
  264. # Configuration parameters: AllowedGroups.
  265. RSpec/NestedGroups:
  266. Max: 6
  267. RSpec/RepeatedDescription:
  268. Exclude:
  269. - 'spec/controllers/activitypub/outboxes_controller_spec.rb'
  270. RSpec/RepeatedExample:
  271. Exclude:
  272. - 'spec/controllers/activitypub/outboxes_controller_spec.rb'
  273. # This cop supports unsafe autocorrection (--autocorrect-all).
  274. Rails/ApplicationController:
  275. Exclude:
  276. - 'app/controllers/health_controller.rb'
  277. # Configuration parameters: Include.
  278. # Include: db/**/*.rb
  279. Rails/CreateTableWithTimestamps:
  280. Exclude:
  281. - 'db/migrate/20170508230434_create_conversation_mutes.rb'
  282. - 'db/migrate/20170823162448_create_status_pins.rb'
  283. - 'db/migrate/20171116161857_create_list_accounts.rb'
  284. - 'db/migrate/20180929222014_create_account_conversations.rb'
  285. - 'db/migrate/20181007025445_create_pghero_space_stats.rb'
  286. - 'db/migrate/20190103124649_create_scheduled_statuses.rb'
  287. - 'db/migrate/20220824233535_create_status_trends.rb'
  288. - 'db/migrate/20221006061337_create_preview_card_trends.rb'
  289. # This cop supports safe autocorrection (--autocorrect).
  290. # Configuration parameters: Severity.
  291. Rails/DuplicateAssociation:
  292. Exclude:
  293. - 'app/serializers/activitypub/collection_serializer.rb'
  294. - 'app/serializers/activitypub/note_serializer.rb'
  295. # Configuration parameters: Include.
  296. # Include: app/**/*.rb, config/**/*.rb, lib/**/*.rb
  297. Rails/Exit:
  298. Exclude:
  299. - 'config/initializers/sidekiq.rb'
  300. # Configuration parameters: Include.
  301. # Include: app/models/**/*.rb
  302. Rails/HasAndBelongsToMany:
  303. Exclude:
  304. - 'app/models/concerns/account_associations.rb'
  305. - 'app/models/preview_card.rb'
  306. - 'app/models/status.rb'
  307. - 'app/models/tag.rb'
  308. # Configuration parameters: Include.
  309. # Include: app/models/**/*.rb
  310. Rails/HasManyOrHasOneDependent:
  311. Exclude:
  312. - 'app/models/concerns/account_counters.rb'
  313. - 'app/models/conversation.rb'
  314. - 'app/models/custom_emoji.rb'
  315. - 'app/models/custom_emoji_category.rb'
  316. - 'app/models/domain_block.rb'
  317. - 'app/models/invite.rb'
  318. - 'app/models/status.rb'
  319. - 'app/models/user.rb'
  320. - 'app/models/web/push_subscription.rb'
  321. Rails/I18nLocaleTexts:
  322. Exclude:
  323. - 'lib/tasks/mastodon.rake'
  324. - 'spec/helpers/flashes_helper_spec.rb'
  325. # Configuration parameters: Include.
  326. # Include: app/controllers/**/*.rb, app/mailers/**/*.rb
  327. Rails/LexicallyScopedActionFilter:
  328. Exclude:
  329. - 'app/controllers/auth/passwords_controller.rb'
  330. - 'app/controllers/auth/registrations_controller.rb'
  331. - 'app/controllers/auth/sessions_controller.rb'
  332. # This cop supports unsafe autocorrection (--autocorrect-all).
  333. Rails/NegateInclude:
  334. Exclude:
  335. - 'app/controllers/concerns/signature_verification.rb'
  336. - 'app/helpers/jsonld_helper.rb'
  337. - 'app/lib/activitypub/activity/create.rb'
  338. - 'app/lib/activitypub/activity/move.rb'
  339. - 'app/lib/feed_manager.rb'
  340. - 'app/lib/link_details_extractor.rb'
  341. - 'app/models/concerns/attachmentable.rb'
  342. - 'app/models/concerns/remotable.rb'
  343. - 'app/models/custom_filter.rb'
  344. - 'app/services/activitypub/process_status_update_service.rb'
  345. - 'app/services/fetch_link_card_service.rb'
  346. - 'app/workers/web/push_notification_worker.rb'
  347. - 'lib/paperclip/color_extractor.rb'
  348. Rails/OutputSafety:
  349. Exclude:
  350. - 'config/initializers/simple_form.rb'
  351. # This cop supports unsafe autocorrection (--autocorrect-all).
  352. # Configuration parameters: Include.
  353. # Include: **/Rakefile, **/*.rake
  354. Rails/RakeEnvironment:
  355. Exclude:
  356. - 'lib/tasks/auto_annotate_models.rake'
  357. - 'lib/tasks/db.rake'
  358. - 'lib/tasks/emojis.rake'
  359. - 'lib/tasks/mastodon.rake'
  360. - 'lib/tasks/repo.rake'
  361. - 'lib/tasks/statistics.rake'
  362. # Configuration parameters: Include.
  363. # Include: db/**/*.rb
  364. Rails/ReversibleMigration:
  365. Exclude:
  366. - 'db/migrate/20160223164502_make_uris_nullable_in_statuses.rb'
  367. - 'db/migrate/20161122163057_remove_unneeded_indexes.rb'
  368. - 'db/migrate/20170205175257_remove_devices.rb'
  369. - 'db/migrate/20170322143850_change_primary_key_to_bigint_on_statuses.rb'
  370. - 'db/migrate/20170520145338_change_language_filter_to_opt_out.rb'
  371. - 'db/migrate/20170609145826_remove_default_language_from_statuses.rb'
  372. - 'db/migrate/20170711225116_fix_null_booleans.rb'
  373. - 'db/migrate/20171129172043_add_index_on_stream_entries.rb'
  374. - 'db/migrate/20171212195226_remove_duplicate_indexes_in_lists.rb'
  375. - 'db/migrate/20171226094803_more_faster_index_on_notifications.rb'
  376. - 'db/migrate/20180106000232_add_index_on_statuses_for_api_v1_accounts_account_id_statuses.rb'
  377. - 'db/migrate/20180617162849_remove_unused_indexes.rb'
  378. - 'db/migrate/20190726034905_add_is_exclusive_to_lists.rb'
  379. - 'db/migrate/20220827195229_change_canonical_email_blocks_nullable.rb'
  380. - 'db/migrate/20221202035831_add_keep_local_to_account_statuses_cleanup_policies.rb'
  381. # Configuration parameters: ForbiddenMethods, AllowedMethods.
  382. # ForbiddenMethods: decrement!, decrement_counter, increment!, increment_counter, insert, insert!, insert_all, insert_all!, toggle!, touch, touch_all, update_all, update_attribute, update_column, update_columns, update_counters, upsert, upsert_all
  383. Rails/SkipsModelValidations:
  384. Exclude:
  385. - 'app/controllers/admin/invites_controller.rb'
  386. - 'app/controllers/concerns/session_tracking_concern.rb'
  387. - 'app/models/concerns/account_merging.rb'
  388. - 'app/models/concerns/expireable.rb'
  389. - 'app/models/status.rb'
  390. - 'app/models/trends/links.rb'
  391. - 'app/models/trends/preview_card_batch.rb'
  392. - 'app/models/trends/preview_card_provider_batch.rb'
  393. - 'app/models/trends/status_batch.rb'
  394. - 'app/models/trends/statuses.rb'
  395. - 'app/models/trends/tag_batch.rb'
  396. - 'app/models/trends/tags.rb'
  397. - 'app/models/user.rb'
  398. - 'app/services/activitypub/process_status_update_service.rb'
  399. - 'app/services/approve_appeal_service.rb'
  400. - 'app/services/block_domain_service.rb'
  401. - 'app/services/delete_account_service.rb'
  402. - 'app/services/process_mentions_service.rb'
  403. - 'app/services/unallow_domain_service.rb'
  404. - 'app/services/unblock_domain_service.rb'
  405. - 'app/services/update_status_service.rb'
  406. - 'app/workers/activitypub/post_upgrade_worker.rb'
  407. - 'app/workers/move_worker.rb'
  408. - 'app/workers/scheduler/ip_cleanup_scheduler.rb'
  409. - 'app/workers/scheduler/scheduled_statuses_scheduler.rb'
  410. - 'db/migrate/20161203164520_add_from_account_id_to_notifications.rb'
  411. - 'db/migrate/20170105224407_add_shortcode_to_media_attachments.rb'
  412. - 'db/migrate/20170209184350_add_reply_to_statuses.rb'
  413. - 'db/migrate/20170304202101_add_type_to_media_attachments.rb'
  414. - 'db/migrate/20180528141303_fix_accounts_unique_index.rb'
  415. - 'db/migrate/20180609104432_migrate_web_push_subscriptions2.rb'
  416. - 'db/migrate/20181207011115_downcase_custom_emoji_domains.rb'
  417. - 'db/migrate/20190511134027_add_silenced_at_suspended_at_to_accounts.rb'
  418. - 'db/migrate/20191007013357_update_pt_locales.rb'
  419. - 'db/migrate/20220316233212_update_kurdish_locales.rb'
  420. - 'db/post_migrate/20190511152737_remove_suspended_silenced_account_fields.rb'
  421. - 'db/post_migrate/20200917193528_migrate_notifications_type.rb'
  422. - 'db/post_migrate/20201017234926_fill_account_suspension_origin.rb'
  423. - 'db/post_migrate/20220617202502_migrate_roles.rb'
  424. - 'db/post_migrate/20221101190723_backfill_admin_action_logs.rb'
  425. - 'db/post_migrate/20221206114142_backfill_admin_action_logs_again.rb'
  426. - 'lib/mastodon/cli/accounts.rb'
  427. - 'lib/mastodon/cli/main.rb'
  428. - 'lib/mastodon/cli/maintenance.rb'
  429. - 'spec/controllers/api/v1/admin/accounts_controller_spec.rb'
  430. - 'spec/lib/activitypub/activity/follow_spec.rb'
  431. - 'spec/services/follow_service_spec.rb'
  432. - 'spec/services/update_account_service_spec.rb'
  433. # Configuration parameters: Include.
  434. # Include: db/**/*.rb
  435. Rails/ThreeStateBooleanColumn:
  436. Exclude:
  437. - 'db/migrate/20160325130944_add_admin_to_users.rb'
  438. - 'db/migrate/20161123093447_add_sensitive_to_statuses.rb'
  439. - 'db/migrate/20170123203248_add_reject_media_to_domain_blocks.rb'
  440. - 'db/migrate/20170127165745_add_devise_two_factor_to_users.rb'
  441. - 'db/migrate/20170209184350_add_reply_to_statuses.rb'
  442. - 'db/migrate/20170330163835_create_imports.rb'
  443. - 'db/migrate/20170905165803_add_local_to_statuses.rb'
  444. - 'db/migrate/20171210213213_add_local_only_flag_to_statuses.rb'
  445. - 'db/migrate/20181203021853_add_discoverable_to_accounts.rb'
  446. - 'db/migrate/20190509164208_add_by_moderator_to_tombstone.rb'
  447. - 'db/migrate/20190726034905_add_is_exclusive_to_lists.rb'
  448. - 'db/migrate/20190805123746_add_capabilities_to_tags.rb'
  449. - 'db/migrate/20191212163405_add_hide_collections_to_accounts.rb'
  450. - 'db/migrate/20200309150742_add_forwarded_to_reports.rb'
  451. - 'db/migrate/20210609202149_create_login_activities.rb'
  452. - 'db/migrate/20210621221010_add_skip_sign_in_token_to_users.rb'
  453. - 'db/migrate/20211031031021_create_preview_card_providers.rb'
  454. - 'db/migrate/20211115032527_add_trendable_to_preview_cards.rb'
  455. - 'db/migrate/20220202200743_add_trendable_to_accounts.rb'
  456. - 'db/migrate/20220202200926_add_trendable_to_statuses.rb'
  457. - 'db/migrate/20220303000827_add_ordered_media_attachment_ids_to_status_edits.rb'
  458. - 'db/migrate/20221202035831_add_keep_local_to_account_statuses_cleanup_policies.rb'
  459. # Configuration parameters: Include.
  460. # Include: app/models/**/*.rb
  461. Rails/UniqueValidationWithoutIndex:
  462. Exclude:
  463. - 'app/models/account_alias.rb'
  464. - 'app/models/custom_filter_status.rb'
  465. - 'app/models/identity.rb'
  466. - 'app/models/webauthn_credential.rb'
  467. # Configuration parameters: Include.
  468. # Include: app/models/**/*.rb
  469. Rails/UnusedIgnoredColumns:
  470. Exclude:
  471. - 'app/models/account.rb'
  472. - 'app/models/account_stat.rb'
  473. - 'app/models/admin/action_log.rb'
  474. - 'app/models/custom_filter.rb'
  475. - 'app/models/email_domain_block.rb'
  476. - 'app/models/report.rb'
  477. - 'app/models/status_edit.rb'
  478. - 'app/models/user.rb'
  479. # This cop supports unsafe autocorrection (--autocorrect-all).
  480. # Configuration parameters: EnforcedStyle.
  481. # SupportedStyles: exists, where
  482. Rails/WhereExists:
  483. Exclude:
  484. - 'app/controllers/activitypub/inboxes_controller.rb'
  485. - 'app/controllers/admin/email_domain_blocks_controller.rb'
  486. - 'app/controllers/auth/registrations_controller.rb'
  487. - 'app/lib/activitypub/activity/create.rb'
  488. - 'app/lib/delivery_failure_tracker.rb'
  489. - 'app/lib/feed_manager.rb'
  490. - 'app/lib/status_cache_hydrator.rb'
  491. - 'app/lib/suspicious_sign_in_detector.rb'
  492. - 'app/models/concerns/account_interactions.rb'
  493. - 'app/models/featured_tag.rb'
  494. - 'app/models/poll.rb'
  495. - 'app/models/session_activation.rb'
  496. - 'app/models/status.rb'
  497. - 'app/models/user.rb'
  498. - 'app/policies/status_policy.rb'
  499. - 'app/serializers/rest/announcement_serializer.rb'
  500. - 'app/serializers/rest/tag_serializer.rb'
  501. - 'app/services/activitypub/fetch_remote_status_service.rb'
  502. - 'app/services/app_sign_up_service.rb'
  503. - 'app/services/vote_service.rb'
  504. - 'app/validators/reaction_validator.rb'
  505. - 'app/validators/vote_validator.rb'
  506. - 'app/workers/move_worker.rb'
  507. - 'db/migrate/20190529143559_preserve_old_layout_for_existing_users.rb'
  508. - 'lib/tasks/tests.rake'
  509. - 'spec/models/account_spec.rb'
  510. - 'spec/services/activitypub/process_collection_service_spec.rb'
  511. - 'spec/services/purge_domain_service_spec.rb'
  512. - 'spec/services/unallow_domain_service_spec.rb'
  513. # This cop supports safe autocorrection (--autocorrect).
  514. # Configuration parameters: AllowOnConstant, AllowOnSelfClass.
  515. Style/CaseEquality:
  516. Exclude:
  517. - 'config/initializers/trusted_proxies.rb'
  518. # This cop supports safe autocorrection (--autocorrect).
  519. # Configuration parameters: AllowedMethods, AllowedPatterns.
  520. # AllowedMethods: ==, equal?, eql?
  521. Style/ClassEqualityComparison:
  522. Exclude:
  523. - 'app/helpers/jsonld_helper.rb'
  524. - 'app/serializers/activitypub/outbox_serializer.rb'
  525. Style/ClassVars:
  526. Exclude:
  527. - 'config/initializers/devise.rb'
  528. # This cop supports unsafe autocorrection (--autocorrect-all).
  529. Style/CombinableLoops:
  530. Exclude:
  531. - 'app/models/form/custom_emoji_batch.rb'
  532. - 'app/models/form/ip_block_batch.rb'
  533. # This cop supports safe autocorrection (--autocorrect).
  534. # Configuration parameters: AllowedVars.
  535. Style/FetchEnvVar:
  536. Exclude:
  537. - 'app/lib/redis_configuration.rb'
  538. - 'app/lib/translation_service.rb'
  539. - 'config/environments/development.rb'
  540. - 'config/environments/production.rb'
  541. - 'config/initializers/2_limited_federation_mode.rb'
  542. - 'config/initializers/3_omniauth.rb'
  543. - 'config/initializers/blacklists.rb'
  544. - 'config/initializers/cache_buster.rb'
  545. - 'config/initializers/content_security_policy.rb'
  546. - 'config/initializers/devise.rb'
  547. - 'config/initializers/paperclip.rb'
  548. - 'config/initializers/vapid.rb'
  549. - 'lib/mastodon/premailer_webpack_strategy.rb'
  550. - 'lib/mastodon/redis_config.rb'
  551. - 'lib/tasks/repo.rake'
  552. - 'spec/features/profile_spec.rb'
  553. # This cop supports safe autocorrection (--autocorrect).
  554. # Configuration parameters: EnforcedStyle, MaxUnannotatedPlaceholdersAllowed, AllowedMethods, AllowedPatterns.
  555. # SupportedStyles: annotated, template, unannotated
  556. # AllowedMethods: redirect
  557. Style/FormatStringToken:
  558. Exclude:
  559. - 'app/models/privacy_policy.rb'
  560. - 'config/initializers/devise.rb'
  561. - 'lib/paperclip/color_extractor.rb'
  562. # This cop supports unsafe autocorrection (--autocorrect-all).
  563. Style/GlobalStdStream:
  564. Exclude:
  565. - 'config/boot.rb'
  566. - 'config/environments/development.rb'
  567. - 'config/environments/production.rb'
  568. # This cop supports safe autocorrection (--autocorrect).
  569. # Configuration parameters: MinBodyLength, AllowConsecutiveConditionals.
  570. Style/GuardClause:
  571. Exclude:
  572. - 'app/controllers/admin/confirmations_controller.rb'
  573. - 'app/controllers/auth/confirmations_controller.rb'
  574. - 'app/controllers/auth/passwords_controller.rb'
  575. - 'app/controllers/settings/two_factor_authentication/webauthn_credentials_controller.rb'
  576. - 'app/lib/activitypub/activity/block.rb'
  577. - 'app/lib/request.rb'
  578. - 'app/lib/request_pool.rb'
  579. - 'app/lib/webfinger.rb'
  580. - 'app/lib/webfinger_resource.rb'
  581. - 'app/models/concerns/account_counters.rb'
  582. - 'app/models/concerns/ldap_authenticable.rb'
  583. - 'app/models/tag.rb'
  584. - 'app/models/user.rb'
  585. - 'app/services/fan_out_on_write_service.rb'
  586. - 'app/services/post_status_service.rb'
  587. - 'app/services/process_hashtags_service.rb'
  588. - 'app/workers/move_worker.rb'
  589. - 'app/workers/redownload_avatar_worker.rb'
  590. - 'app/workers/redownload_header_worker.rb'
  591. - 'app/workers/redownload_media_worker.rb'
  592. - 'app/workers/remote_account_refresh_worker.rb'
  593. - 'config/initializers/devise.rb'
  594. - 'db/migrate/20170901141119_truncate_preview_cards.rb'
  595. - 'db/post_migrate/20220704024901_migrate_settings_to_user_roles.rb'
  596. - 'lib/devise/two_factor_ldap_authenticatable.rb'
  597. - 'lib/devise/two_factor_pam_authenticatable.rb'
  598. - 'lib/mastodon/cli/accounts.rb'
  599. - 'lib/mastodon/cli/maintenance.rb'
  600. - 'lib/mastodon/cli/media.rb'
  601. - 'lib/paperclip/attachment_extensions.rb'
  602. - 'lib/tasks/repo.rake'
  603. # This cop supports safe autocorrection (--autocorrect).
  604. # Configuration parameters: EnforcedStyle.
  605. # SupportedStyles: braces, no_braces
  606. Style/HashAsLastArrayItem:
  607. Exclude:
  608. - 'app/controllers/admin/statuses_controller.rb'
  609. - 'app/controllers/api/v1/statuses_controller.rb'
  610. - 'app/models/concerns/account_counters.rb'
  611. - 'app/models/concerns/status_threading_concern.rb'
  612. - 'app/models/status.rb'
  613. - 'app/services/batched_remove_status_service.rb'
  614. - 'app/services/notify_service.rb'
  615. - 'db/migrate/20181024224956_migrate_account_conversations.rb'
  616. # This cop supports unsafe autocorrection (--autocorrect-all).
  617. Style/HashTransformValues:
  618. Exclude:
  619. - 'app/serializers/rest/web_push_subscription_serializer.rb'
  620. - 'app/services/import_service.rb'
  621. # This cop supports safe autocorrection (--autocorrect).
  622. Style/IfUnlessModifier:
  623. Exclude:
  624. - 'config/environments/production.rb'
  625. - 'config/initializers/devise.rb'
  626. - 'config/initializers/ffmpeg.rb'
  627. # This cop supports unsafe autocorrection (--autocorrect-all).
  628. # Configuration parameters: InverseMethods, InverseBlocks.
  629. Style/InverseMethods:
  630. Exclude:
  631. - 'app/models/custom_filter.rb'
  632. - 'app/services/update_account_service.rb'
  633. - 'spec/controllers/activitypub/replies_controller_spec.rb'
  634. # This cop supports safe autocorrection (--autocorrect).
  635. # Configuration parameters: EnforcedStyle.
  636. # SupportedStyles: line_count_dependent, lambda, literal
  637. Style/Lambda:
  638. Exclude:
  639. - 'config/initializers/simple_form.rb'
  640. - 'config/routes.rb'
  641. # This cop supports unsafe autocorrection (--autocorrect-all).
  642. Style/MapToHash:
  643. Exclude:
  644. - 'app/models/status.rb'
  645. # This cop supports unsafe autocorrection (--autocorrect-all).
  646. # Configuration parameters: EnforcedStyle.
  647. # SupportedStyles: literals, strict
  648. Style/MutableConstant:
  649. Exclude:
  650. - 'app/models/tag.rb'
  651. - 'app/services/delete_account_service.rb'
  652. - 'lib/mastodon/migration_warning.rb'
  653. # This cop supports safe autocorrection (--autocorrect).
  654. Style/NilLambda:
  655. Exclude:
  656. - 'config/initializers/paperclip.rb'
  657. # Configuration parameters: AllowedMethods.
  658. # AllowedMethods: respond_to_missing?
  659. Style/OptionalBooleanParameter:
  660. Exclude:
  661. - 'app/helpers/admin/account_moderation_notes_helper.rb'
  662. - 'app/helpers/jsonld_helper.rb'
  663. - 'app/lib/admin/system_check/message.rb'
  664. - 'app/lib/request.rb'
  665. - 'app/lib/webfinger.rb'
  666. - 'app/services/block_domain_service.rb'
  667. - 'app/services/fetch_resource_service.rb'
  668. - 'app/workers/domain_block_worker.rb'
  669. - 'app/workers/unfollow_follow_worker.rb'
  670. - 'lib/mastodon/redis_config.rb'
  671. # This cop supports safe autocorrection (--autocorrect).
  672. # Configuration parameters: PreferredDelimiters.
  673. Style/PercentLiteralDelimiters:
  674. Exclude:
  675. - 'config/deploy.rb'
  676. - 'config/initializers/doorkeeper.rb'
  677. # This cop supports unsafe autocorrection (--autocorrect-all).
  678. # Configuration parameters: EnforcedStyle.
  679. # SupportedStyles: short, verbose
  680. Style/PreferredHashMethods:
  681. Exclude:
  682. - 'config/initializers/paperclip.rb'
  683. # This cop supports safe autocorrection (--autocorrect).
  684. Style/RedundantConstantBase:
  685. Exclude:
  686. - 'config/environments/production.rb'
  687. - 'config/initializers/sidekiq.rb'
  688. # This cop supports unsafe autocorrection (--autocorrect-all).
  689. # Configuration parameters: SafeForConstants.
  690. Style/RedundantFetchBlock:
  691. Exclude:
  692. - 'config/initializers/1_hosts.rb'
  693. - 'config/initializers/chewy.rb'
  694. - 'config/initializers/devise.rb'
  695. - 'config/initializers/paperclip.rb'
  696. - 'config/puma.rb'
  697. # This cop supports safe autocorrection (--autocorrect).
  698. # Configuration parameters: AllowMultipleReturnValues.
  699. Style/RedundantReturn:
  700. Exclude:
  701. - 'app/controllers/api/v1/directories_controller.rb'
  702. - 'app/controllers/auth/confirmations_controller.rb'
  703. - 'app/lib/ostatus/tag_manager.rb'
  704. - 'app/models/form/import.rb'
  705. # This cop supports unsafe autocorrection (--autocorrect-all).
  706. # Configuration parameters: ConvertCodeThatCanStartToReturnNil, AllowedMethods, MaxChainLength.
  707. # AllowedMethods: present?, blank?, presence, try, try!
  708. Style/SafeNavigation:
  709. Exclude:
  710. - 'app/models/concerns/account_finder_concern.rb'
  711. # This cop supports safe autocorrection (--autocorrect).
  712. # Configuration parameters: EnforcedStyle.
  713. # SupportedStyles: only_raise, only_fail, semantic
  714. Style/SignalException:
  715. Exclude:
  716. - 'lib/devise/two_factor_ldap_authenticatable.rb'
  717. - 'lib/devise/two_factor_pam_authenticatable.rb'
  718. # This cop supports unsafe autocorrection (--autocorrect-all).
  719. Style/SingleArgumentDig:
  720. Exclude:
  721. - 'lib/webpacker/manifest_extensions.rb'
  722. # This cop supports safe autocorrection (--autocorrect).
  723. # Configuration parameters: EnforcedStyle.
  724. # SupportedStyles: require_parentheses, require_no_parentheses
  725. Style/StabbyLambdaParentheses:
  726. Exclude:
  727. - 'config/environments/production.rb'
  728. - 'config/initializers/content_security_policy.rb'
  729. # This cop supports safe autocorrection (--autocorrect).
  730. Style/StderrPuts:
  731. Exclude:
  732. - 'config/boot.rb'
  733. # This cop supports unsafe autocorrection (--autocorrect-all).
  734. # Configuration parameters: Mode.
  735. Style/StringConcatenation:
  736. Exclude:
  737. - 'config/initializers/paperclip.rb'
  738. # This cop supports safe autocorrection (--autocorrect).
  739. # Configuration parameters: EnforcedStyle, ConsistentQuotesInMultiline.
  740. # SupportedStyles: single_quotes, double_quotes
  741. Style/StringLiterals:
  742. Exclude:
  743. - 'config/environments/production.rb'
  744. - 'config/initializers/backtrace_silencers.rb'
  745. - 'config/initializers/http_client_proxy.rb'
  746. - 'config/initializers/rack_attack.rb'
  747. - 'config/initializers/webauthn.rb'
  748. - 'config/routes.rb'
  749. # This cop supports unsafe autocorrection (--autocorrect-all).
  750. # Configuration parameters: AllowMethodsWithArguments, AllowedMethods, AllowedPatterns, AllowComments.
  751. # AllowedMethods: define_method, mail, respond_to
  752. Style/SymbolProc:
  753. Exclude:
  754. - 'config/initializers/3_omniauth.rb'
  755. # This cop supports safe autocorrection (--autocorrect).
  756. # Configuration parameters: EnforcedStyle, AllowSafeAssignment.
  757. # SupportedStyles: require_parentheses, require_no_parentheses, require_parentheses_when_complex
  758. Style/TernaryParentheses:
  759. Exclude:
  760. - 'config/environments/development.rb'
  761. # This cop supports safe autocorrection (--autocorrect).
  762. # Configuration parameters: EnforcedStyleForMultiline.
  763. # SupportedStylesForMultiline: comma, consistent_comma, no_comma
  764. Style/TrailingCommaInArguments:
  765. Exclude:
  766. - 'config/initializers/paperclip.rb'
  767. # This cop supports safe autocorrection (--autocorrect).
  768. # Configuration parameters: EnforcedStyleForMultiline.
  769. # SupportedStylesForMultiline: comma, consistent_comma, no_comma
  770. Style/TrailingCommaInHashLiteral:
  771. Exclude:
  772. - 'config/environments/production.rb'
  773. - 'config/environments/test.rb'
  774. # This cop supports safe autocorrection (--autocorrect).
  775. # Configuration parameters: EnforcedStyle, MinSize, WordRegex.
  776. # SupportedStyles: percent, brackets
  777. Style/WordArray:
  778. Exclude:
  779. - 'app/helpers/languages_helper.rb'
  780. - 'config/initializers/cors.rb'
  781. - 'spec/controllers/settings/imports_controller_spec.rb'
  782. - 'spec/models/form/import_spec.rb'