.rubocop_todo.yml 33 KB

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