.rubocop_todo.yml 33 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846
  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. RSpec/PendingWithoutReason:
  264. Exclude:
  265. - 'spec/models/account_spec.rb'
  266. # This cop supports unsafe autocorrection (--autocorrect-all).
  267. Rails/ApplicationController:
  268. Exclude:
  269. - 'app/controllers/health_controller.rb'
  270. # Configuration parameters: Include.
  271. # Include: db/**/*.rb
  272. Rails/CreateTableWithTimestamps:
  273. Exclude:
  274. - 'db/migrate/20170508230434_create_conversation_mutes.rb'
  275. - 'db/migrate/20170823162448_create_status_pins.rb'
  276. - 'db/migrate/20171116161857_create_list_accounts.rb'
  277. - 'db/migrate/20180929222014_create_account_conversations.rb'
  278. - 'db/migrate/20181007025445_create_pghero_space_stats.rb'
  279. - 'db/migrate/20190103124649_create_scheduled_statuses.rb'
  280. - 'db/migrate/20220824233535_create_status_trends.rb'
  281. - 'db/migrate/20221006061337_create_preview_card_trends.rb'
  282. # This cop supports safe autocorrection (--autocorrect).
  283. # Configuration parameters: Severity.
  284. Rails/DuplicateAssociation:
  285. Exclude:
  286. - 'app/serializers/activitypub/collection_serializer.rb'
  287. - 'app/serializers/activitypub/note_serializer.rb'
  288. # Configuration parameters: Include.
  289. # Include: app/models/**/*.rb
  290. Rails/HasAndBelongsToMany:
  291. Exclude:
  292. - 'app/models/concerns/account_associations.rb'
  293. - 'app/models/preview_card.rb'
  294. - 'app/models/status.rb'
  295. - 'app/models/tag.rb'
  296. # Configuration parameters: Include.
  297. # Include: app/models/**/*.rb
  298. Rails/HasManyOrHasOneDependent:
  299. Exclude:
  300. - 'app/models/concerns/account_counters.rb'
  301. - 'app/models/conversation.rb'
  302. - 'app/models/custom_emoji.rb'
  303. - 'app/models/custom_emoji_category.rb'
  304. - 'app/models/domain_block.rb'
  305. - 'app/models/invite.rb'
  306. - 'app/models/status.rb'
  307. - 'app/models/user.rb'
  308. - 'app/models/web/push_subscription.rb'
  309. Rails/I18nLocaleTexts:
  310. Exclude:
  311. - 'lib/tasks/mastodon.rake'
  312. - 'spec/helpers/flashes_helper_spec.rb'
  313. # Configuration parameters: Include.
  314. # Include: app/controllers/**/*.rb, app/mailers/**/*.rb
  315. Rails/LexicallyScopedActionFilter:
  316. Exclude:
  317. - 'app/controllers/auth/passwords_controller.rb'
  318. - 'app/controllers/auth/registrations_controller.rb'
  319. - 'app/controllers/auth/sessions_controller.rb'
  320. # This cop supports unsafe autocorrection (--autocorrect-all).
  321. Rails/NegateInclude:
  322. Exclude:
  323. - 'app/controllers/concerns/signature_verification.rb'
  324. - 'app/helpers/jsonld_helper.rb'
  325. - 'app/lib/activitypub/activity/create.rb'
  326. - 'app/lib/activitypub/activity/move.rb'
  327. - 'app/lib/feed_manager.rb'
  328. - 'app/lib/link_details_extractor.rb'
  329. - 'app/models/concerns/attachmentable.rb'
  330. - 'app/models/concerns/remotable.rb'
  331. - 'app/models/custom_filter.rb'
  332. - 'app/services/activitypub/process_status_update_service.rb'
  333. - 'app/services/fetch_link_card_service.rb'
  334. - 'app/services/search_service.rb'
  335. - 'app/workers/web/push_notification_worker.rb'
  336. - 'lib/paperclip/color_extractor.rb'
  337. Rails/OutputSafety:
  338. Exclude:
  339. - 'config/initializers/simple_form.rb'
  340. # This cop supports unsafe autocorrection (--autocorrect-all).
  341. # Configuration parameters: Include.
  342. # Include: **/Rakefile, **/*.rake
  343. Rails/RakeEnvironment:
  344. Exclude:
  345. - 'lib/tasks/auto_annotate_models.rake'
  346. - 'lib/tasks/db.rake'
  347. - 'lib/tasks/emojis.rake'
  348. - 'lib/tasks/mastodon.rake'
  349. - 'lib/tasks/repo.rake'
  350. - 'lib/tasks/statistics.rake'
  351. # Configuration parameters: Include.
  352. # Include: db/**/*.rb
  353. Rails/ReversibleMigration:
  354. Exclude:
  355. - 'db/migrate/20160223164502_make_uris_nullable_in_statuses.rb'
  356. - 'db/migrate/20161122163057_remove_unneeded_indexes.rb'
  357. - 'db/migrate/20170205175257_remove_devices.rb'
  358. - 'db/migrate/20170322143850_change_primary_key_to_bigint_on_statuses.rb'
  359. - 'db/migrate/20170520145338_change_language_filter_to_opt_out.rb'
  360. - 'db/migrate/20170609145826_remove_default_language_from_statuses.rb'
  361. - 'db/migrate/20170711225116_fix_null_booleans.rb'
  362. - 'db/migrate/20171129172043_add_index_on_stream_entries.rb'
  363. - 'db/migrate/20171212195226_remove_duplicate_indexes_in_lists.rb'
  364. - 'db/migrate/20171226094803_more_faster_index_on_notifications.rb'
  365. - 'db/migrate/20180106000232_add_index_on_statuses_for_api_v1_accounts_account_id_statuses.rb'
  366. - 'db/migrate/20180617162849_remove_unused_indexes.rb'
  367. - 'db/migrate/20220827195229_change_canonical_email_blocks_nullable.rb'
  368. # Configuration parameters: ForbiddenMethods, AllowedMethods.
  369. # 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
  370. Rails/SkipsModelValidations:
  371. Exclude:
  372. - 'app/controllers/admin/invites_controller.rb'
  373. - 'app/controllers/concerns/session_tracking_concern.rb'
  374. - 'app/models/concerns/account_merging.rb'
  375. - 'app/models/concerns/expireable.rb'
  376. - 'app/models/status.rb'
  377. - 'app/models/trends/links.rb'
  378. - 'app/models/trends/preview_card_batch.rb'
  379. - 'app/models/trends/preview_card_provider_batch.rb'
  380. - 'app/models/trends/status_batch.rb'
  381. - 'app/models/trends/statuses.rb'
  382. - 'app/models/trends/tag_batch.rb'
  383. - 'app/models/trends/tags.rb'
  384. - 'app/models/user.rb'
  385. - 'app/services/activitypub/process_status_update_service.rb'
  386. - 'app/services/approve_appeal_service.rb'
  387. - 'app/services/block_domain_service.rb'
  388. - 'app/services/delete_account_service.rb'
  389. - 'app/services/process_mentions_service.rb'
  390. - 'app/services/unallow_domain_service.rb'
  391. - 'app/services/unblock_domain_service.rb'
  392. - 'app/services/update_status_service.rb'
  393. - 'app/workers/activitypub/post_upgrade_worker.rb'
  394. - 'app/workers/move_worker.rb'
  395. - 'app/workers/scheduler/ip_cleanup_scheduler.rb'
  396. - 'app/workers/scheduler/scheduled_statuses_scheduler.rb'
  397. - 'db/migrate/20161203164520_add_from_account_id_to_notifications.rb'
  398. - 'db/migrate/20170105224407_add_shortcode_to_media_attachments.rb'
  399. - 'db/migrate/20170209184350_add_reply_to_statuses.rb'
  400. - 'db/migrate/20170304202101_add_type_to_media_attachments.rb'
  401. - 'db/migrate/20180528141303_fix_accounts_unique_index.rb'
  402. - 'db/migrate/20180609104432_migrate_web_push_subscriptions2.rb'
  403. - 'db/migrate/20181207011115_downcase_custom_emoji_domains.rb'
  404. - 'db/migrate/20190511134027_add_silenced_at_suspended_at_to_accounts.rb'
  405. - 'db/migrate/20191007013357_update_pt_locales.rb'
  406. - 'db/migrate/20220316233212_update_kurdish_locales.rb'
  407. - 'db/post_migrate/20190511152737_remove_suspended_silenced_account_fields.rb'
  408. - 'db/post_migrate/20200917193528_migrate_notifications_type.rb'
  409. - 'db/post_migrate/20201017234926_fill_account_suspension_origin.rb'
  410. - 'db/post_migrate/20220617202502_migrate_roles.rb'
  411. - 'db/post_migrate/20221101190723_backfill_admin_action_logs.rb'
  412. - 'db/post_migrate/20221206114142_backfill_admin_action_logs_again.rb'
  413. - 'lib/mastodon/cli/accounts.rb'
  414. - 'lib/mastodon/cli/main.rb'
  415. - 'lib/mastodon/cli/maintenance.rb'
  416. - 'spec/controllers/api/v1/admin/accounts_controller_spec.rb'
  417. - 'spec/lib/activitypub/activity/follow_spec.rb'
  418. - 'spec/services/follow_service_spec.rb'
  419. - 'spec/services/update_account_service_spec.rb'
  420. # Configuration parameters: Include.
  421. # Include: db/**/*.rb
  422. Rails/ThreeStateBooleanColumn:
  423. Exclude:
  424. - 'db/migrate/20160325130944_add_admin_to_users.rb'
  425. - 'db/migrate/20161123093447_add_sensitive_to_statuses.rb'
  426. - 'db/migrate/20170123203248_add_reject_media_to_domain_blocks.rb'
  427. - 'db/migrate/20170127165745_add_devise_two_factor_to_users.rb'
  428. - 'db/migrate/20170209184350_add_reply_to_statuses.rb'
  429. - 'db/migrate/20170330163835_create_imports.rb'
  430. - 'db/migrate/20170905165803_add_local_to_statuses.rb'
  431. - 'db/migrate/20181203021853_add_discoverable_to_accounts.rb'
  432. - 'db/migrate/20190509164208_add_by_moderator_to_tombstone.rb'
  433. - 'db/migrate/20190805123746_add_capabilities_to_tags.rb'
  434. - 'db/migrate/20191212163405_add_hide_collections_to_accounts.rb'
  435. - 'db/migrate/20200309150742_add_forwarded_to_reports.rb'
  436. - 'db/migrate/20210609202149_create_login_activities.rb'
  437. - 'db/migrate/20210621221010_add_skip_sign_in_token_to_users.rb'
  438. - 'db/migrate/20211031031021_create_preview_card_providers.rb'
  439. - 'db/migrate/20211115032527_add_trendable_to_preview_cards.rb'
  440. - 'db/migrate/20220202200743_add_trendable_to_accounts.rb'
  441. - 'db/migrate/20220202200926_add_trendable_to_statuses.rb'
  442. - 'db/migrate/20220303000827_add_ordered_media_attachment_ids_to_status_edits.rb'
  443. # Configuration parameters: Include.
  444. # Include: app/models/**/*.rb
  445. Rails/UniqueValidationWithoutIndex:
  446. Exclude:
  447. - 'app/models/account_alias.rb'
  448. - 'app/models/custom_filter_status.rb'
  449. - 'app/models/identity.rb'
  450. - 'app/models/webauthn_credential.rb'
  451. # Configuration parameters: Include.
  452. # Include: app/models/**/*.rb
  453. Rails/UnusedIgnoredColumns:
  454. Exclude:
  455. - 'app/models/account.rb'
  456. - 'app/models/account_stat.rb'
  457. - 'app/models/admin/action_log.rb'
  458. - 'app/models/custom_filter.rb'
  459. - 'app/models/email_domain_block.rb'
  460. - 'app/models/report.rb'
  461. - 'app/models/status_edit.rb'
  462. - 'app/models/user.rb'
  463. # This cop supports unsafe autocorrection (--autocorrect-all).
  464. # Configuration parameters: EnforcedStyle.
  465. # SupportedStyles: exists, where
  466. Rails/WhereExists:
  467. Exclude:
  468. - 'app/controllers/activitypub/inboxes_controller.rb'
  469. - 'app/controllers/admin/email_domain_blocks_controller.rb'
  470. - 'app/controllers/auth/registrations_controller.rb'
  471. - 'app/lib/activitypub/activity/create.rb'
  472. - 'app/lib/delivery_failure_tracker.rb'
  473. - 'app/lib/feed_manager.rb'
  474. - 'app/lib/status_cache_hydrator.rb'
  475. - 'app/lib/suspicious_sign_in_detector.rb'
  476. - 'app/models/concerns/account_interactions.rb'
  477. - 'app/models/featured_tag.rb'
  478. - 'app/models/poll.rb'
  479. - 'app/models/session_activation.rb'
  480. - 'app/models/status.rb'
  481. - 'app/models/user.rb'
  482. - 'app/policies/status_policy.rb'
  483. - 'app/serializers/rest/announcement_serializer.rb'
  484. - 'app/serializers/rest/tag_serializer.rb'
  485. - 'app/services/activitypub/fetch_remote_status_service.rb'
  486. - 'app/services/app_sign_up_service.rb'
  487. - 'app/services/vote_service.rb'
  488. - 'app/validators/reaction_validator.rb'
  489. - 'app/validators/vote_validator.rb'
  490. - 'app/workers/move_worker.rb'
  491. - 'db/migrate/20190529143559_preserve_old_layout_for_existing_users.rb'
  492. - 'lib/tasks/tests.rake'
  493. - 'spec/models/account_spec.rb'
  494. - 'spec/services/activitypub/process_collection_service_spec.rb'
  495. - 'spec/services/purge_domain_service_spec.rb'
  496. - 'spec/services/unallow_domain_service_spec.rb'
  497. # This cop supports safe autocorrection (--autocorrect).
  498. # Configuration parameters: AllowOnConstant, AllowOnSelfClass.
  499. Style/CaseEquality:
  500. Exclude:
  501. - 'config/initializers/trusted_proxies.rb'
  502. # This cop supports safe autocorrection (--autocorrect).
  503. # Configuration parameters: AllowedMethods, AllowedPatterns.
  504. # AllowedMethods: ==, equal?, eql?
  505. Style/ClassEqualityComparison:
  506. Exclude:
  507. - 'app/helpers/jsonld_helper.rb'
  508. - 'app/serializers/activitypub/outbox_serializer.rb'
  509. Style/ClassVars:
  510. Exclude:
  511. - 'config/initializers/devise.rb'
  512. # This cop supports unsafe autocorrection (--autocorrect-all).
  513. Style/CombinableLoops:
  514. Exclude:
  515. - 'app/models/form/custom_emoji_batch.rb'
  516. - 'app/models/form/ip_block_batch.rb'
  517. # This cop supports safe autocorrection (--autocorrect).
  518. # Configuration parameters: AllowedVars.
  519. Style/FetchEnvVar:
  520. Exclude:
  521. - 'app/lib/redis_configuration.rb'
  522. - 'app/lib/translation_service.rb'
  523. - 'config/environments/development.rb'
  524. - 'config/environments/production.rb'
  525. - 'config/initializers/2_limited_federation_mode.rb'
  526. - 'config/initializers/3_omniauth.rb'
  527. - 'config/initializers/blacklists.rb'
  528. - 'config/initializers/cache_buster.rb'
  529. - 'config/initializers/content_security_policy.rb'
  530. - 'config/initializers/devise.rb'
  531. - 'config/initializers/paperclip.rb'
  532. - 'config/initializers/vapid.rb'
  533. - 'lib/mastodon/premailer_webpack_strategy.rb'
  534. - 'lib/mastodon/redis_config.rb'
  535. - 'lib/tasks/repo.rake'
  536. - 'spec/features/profile_spec.rb'
  537. # This cop supports safe autocorrection (--autocorrect).
  538. # Configuration parameters: EnforcedStyle, MaxUnannotatedPlaceholdersAllowed, AllowedMethods, AllowedPatterns.
  539. # SupportedStyles: annotated, template, unannotated
  540. # AllowedMethods: redirect
  541. Style/FormatStringToken:
  542. Exclude:
  543. - 'app/models/privacy_policy.rb'
  544. - 'config/initializers/devise.rb'
  545. - 'lib/paperclip/color_extractor.rb'
  546. # This cop supports unsafe autocorrection (--autocorrect-all).
  547. Style/GlobalStdStream:
  548. Exclude:
  549. - 'config/boot.rb'
  550. - 'config/environments/development.rb'
  551. - 'config/environments/production.rb'
  552. # This cop supports safe autocorrection (--autocorrect).
  553. # Configuration parameters: MinBodyLength, AllowConsecutiveConditionals.
  554. Style/GuardClause:
  555. Exclude:
  556. - 'app/controllers/admin/confirmations_controller.rb'
  557. - 'app/controllers/auth/confirmations_controller.rb'
  558. - 'app/controllers/auth/passwords_controller.rb'
  559. - 'app/controllers/settings/two_factor_authentication/webauthn_credentials_controller.rb'
  560. - 'app/lib/activitypub/activity/block.rb'
  561. - 'app/lib/request.rb'
  562. - 'app/lib/request_pool.rb'
  563. - 'app/lib/webfinger.rb'
  564. - 'app/lib/webfinger_resource.rb'
  565. - 'app/models/concerns/account_counters.rb'
  566. - 'app/models/concerns/ldap_authenticable.rb'
  567. - 'app/models/tag.rb'
  568. - 'app/models/user.rb'
  569. - 'app/services/fan_out_on_write_service.rb'
  570. - 'app/services/post_status_service.rb'
  571. - 'app/services/process_hashtags_service.rb'
  572. - 'app/workers/move_worker.rb'
  573. - 'app/workers/redownload_avatar_worker.rb'
  574. - 'app/workers/redownload_header_worker.rb'
  575. - 'app/workers/redownload_media_worker.rb'
  576. - 'app/workers/remote_account_refresh_worker.rb'
  577. - 'config/initializers/devise.rb'
  578. - 'db/migrate/20170901141119_truncate_preview_cards.rb'
  579. - 'db/post_migrate/20220704024901_migrate_settings_to_user_roles.rb'
  580. - 'lib/devise/two_factor_ldap_authenticatable.rb'
  581. - 'lib/devise/two_factor_pam_authenticatable.rb'
  582. - 'lib/mastodon/cli/accounts.rb'
  583. - 'lib/mastodon/cli/maintenance.rb'
  584. - 'lib/mastodon/cli/media.rb'
  585. - 'lib/paperclip/attachment_extensions.rb'
  586. - 'lib/tasks/repo.rake'
  587. # This cop supports safe autocorrection (--autocorrect).
  588. # Configuration parameters: EnforcedStyle.
  589. # SupportedStyles: braces, no_braces
  590. Style/HashAsLastArrayItem:
  591. Exclude:
  592. - 'app/controllers/admin/statuses_controller.rb'
  593. - 'app/controllers/api/v1/statuses_controller.rb'
  594. - 'app/models/concerns/account_counters.rb'
  595. - 'app/models/concerns/status_threading_concern.rb'
  596. - 'app/models/status.rb'
  597. - 'app/services/batched_remove_status_service.rb'
  598. - 'app/services/notify_service.rb'
  599. - 'db/migrate/20181024224956_migrate_account_conversations.rb'
  600. # This cop supports unsafe autocorrection (--autocorrect-all).
  601. Style/HashTransformValues:
  602. Exclude:
  603. - 'app/serializers/rest/web_push_subscription_serializer.rb'
  604. - 'app/services/import_service.rb'
  605. # This cop supports safe autocorrection (--autocorrect).
  606. Style/IfUnlessModifier:
  607. Exclude:
  608. - 'config/environments/production.rb'
  609. - 'config/initializers/devise.rb'
  610. - 'config/initializers/ffmpeg.rb'
  611. # This cop supports unsafe autocorrection (--autocorrect-all).
  612. # Configuration parameters: InverseMethods, InverseBlocks.
  613. Style/InverseMethods:
  614. Exclude:
  615. - 'app/models/custom_filter.rb'
  616. - 'app/services/update_account_service.rb'
  617. - 'spec/controllers/activitypub/replies_controller_spec.rb'
  618. # This cop supports safe autocorrection (--autocorrect).
  619. # Configuration parameters: EnforcedStyle.
  620. # SupportedStyles: line_count_dependent, lambda, literal
  621. Style/Lambda:
  622. Exclude:
  623. - 'config/initializers/simple_form.rb'
  624. - 'config/routes.rb'
  625. # This cop supports unsafe autocorrection (--autocorrect-all).
  626. Style/MapToHash:
  627. Exclude:
  628. - 'app/models/status.rb'
  629. # This cop supports unsafe autocorrection (--autocorrect-all).
  630. # Configuration parameters: EnforcedStyle.
  631. # SupportedStyles: literals, strict
  632. Style/MutableConstant:
  633. Exclude:
  634. - 'app/models/tag.rb'
  635. - 'app/services/delete_account_service.rb'
  636. - 'lib/mastodon/migration_warning.rb'
  637. # This cop supports safe autocorrection (--autocorrect).
  638. Style/NilLambda:
  639. Exclude:
  640. - 'config/initializers/paperclip.rb'
  641. # Configuration parameters: AllowedMethods.
  642. # AllowedMethods: respond_to_missing?
  643. Style/OptionalBooleanParameter:
  644. Exclude:
  645. - 'app/helpers/admin/account_moderation_notes_helper.rb'
  646. - 'app/helpers/jsonld_helper.rb'
  647. - 'app/lib/admin/system_check/message.rb'
  648. - 'app/lib/request.rb'
  649. - 'app/lib/webfinger.rb'
  650. - 'app/services/block_domain_service.rb'
  651. - 'app/services/fetch_resource_service.rb'
  652. - 'app/workers/domain_block_worker.rb'
  653. - 'app/workers/unfollow_follow_worker.rb'
  654. - 'lib/mastodon/redis_config.rb'
  655. # This cop supports safe autocorrection (--autocorrect).
  656. # Configuration parameters: PreferredDelimiters.
  657. Style/PercentLiteralDelimiters:
  658. Exclude:
  659. - 'config/deploy.rb'
  660. - 'config/initializers/doorkeeper.rb'
  661. # This cop supports unsafe autocorrection (--autocorrect-all).
  662. # Configuration parameters: EnforcedStyle.
  663. # SupportedStyles: short, verbose
  664. Style/PreferredHashMethods:
  665. Exclude:
  666. - 'config/initializers/paperclip.rb'
  667. # This cop supports safe autocorrection (--autocorrect).
  668. Style/RedundantConstantBase:
  669. Exclude:
  670. - 'config/environments/production.rb'
  671. - 'config/initializers/sidekiq.rb'
  672. # This cop supports unsafe autocorrection (--autocorrect-all).
  673. # Configuration parameters: SafeForConstants.
  674. Style/RedundantFetchBlock:
  675. Exclude:
  676. - 'config/initializers/1_hosts.rb'
  677. - 'config/initializers/chewy.rb'
  678. - 'config/initializers/devise.rb'
  679. - 'config/initializers/paperclip.rb'
  680. - 'config/puma.rb'
  681. # This cop supports safe autocorrection (--autocorrect).
  682. # Configuration parameters: AllowMultipleReturnValues.
  683. Style/RedundantReturn:
  684. Exclude:
  685. - 'app/controllers/api/v1/directories_controller.rb'
  686. - 'app/controllers/auth/confirmations_controller.rb'
  687. - 'app/lib/ostatus/tag_manager.rb'
  688. - 'app/models/form/import.rb'
  689. # This cop supports unsafe autocorrection (--autocorrect-all).
  690. # Configuration parameters: ConvertCodeThatCanStartToReturnNil, AllowedMethods, MaxChainLength.
  691. # AllowedMethods: present?, blank?, presence, try, try!
  692. Style/SafeNavigation:
  693. Exclude:
  694. - 'app/models/concerns/account_finder_concern.rb'
  695. - 'app/models/status.rb'
  696. # This cop supports safe autocorrection (--autocorrect).
  697. # Configuration parameters: EnforcedStyle.
  698. # SupportedStyles: only_raise, only_fail, semantic
  699. Style/SignalException:
  700. Exclude:
  701. - 'lib/devise/two_factor_ldap_authenticatable.rb'
  702. - 'lib/devise/two_factor_pam_authenticatable.rb'
  703. # This cop supports unsafe autocorrection (--autocorrect-all).
  704. Style/SingleArgumentDig:
  705. Exclude:
  706. - 'lib/webpacker/manifest_extensions.rb'
  707. # This cop supports safe autocorrection (--autocorrect).
  708. # Configuration parameters: EnforcedStyle.
  709. # SupportedStyles: require_parentheses, require_no_parentheses
  710. Style/StabbyLambdaParentheses:
  711. Exclude:
  712. - 'config/environments/production.rb'
  713. - 'config/initializers/content_security_policy.rb'
  714. # This cop supports safe autocorrection (--autocorrect).
  715. Style/StderrPuts:
  716. Exclude:
  717. - 'config/boot.rb'
  718. # This cop supports unsafe autocorrection (--autocorrect-all).
  719. # Configuration parameters: Mode.
  720. Style/StringConcatenation:
  721. Exclude:
  722. - 'config/initializers/paperclip.rb'
  723. # This cop supports safe autocorrection (--autocorrect).
  724. # Configuration parameters: EnforcedStyle, ConsistentQuotesInMultiline.
  725. # SupportedStyles: single_quotes, double_quotes
  726. Style/StringLiterals:
  727. Exclude:
  728. - 'config/environments/production.rb'
  729. - 'config/initializers/backtrace_silencers.rb'
  730. - 'config/initializers/http_client_proxy.rb'
  731. - 'config/initializers/rack_attack.rb'
  732. - 'config/initializers/webauthn.rb'
  733. - 'config/routes.rb'
  734. # This cop supports unsafe autocorrection (--autocorrect-all).
  735. # Configuration parameters: AllowMethodsWithArguments, AllowedMethods, AllowedPatterns, AllowComments.
  736. # AllowedMethods: define_method, mail, respond_to
  737. Style/SymbolProc:
  738. Exclude:
  739. - 'config/initializers/3_omniauth.rb'
  740. # This cop supports safe autocorrection (--autocorrect).
  741. # Configuration parameters: EnforcedStyle, AllowSafeAssignment.
  742. # SupportedStyles: require_parentheses, require_no_parentheses, require_parentheses_when_complex
  743. Style/TernaryParentheses:
  744. Exclude:
  745. - 'config/environments/development.rb'
  746. # This cop supports safe autocorrection (--autocorrect).
  747. # Configuration parameters: EnforcedStyleForMultiline.
  748. # SupportedStylesForMultiline: comma, consistent_comma, no_comma
  749. Style/TrailingCommaInArguments:
  750. Exclude:
  751. - 'config/initializers/paperclip.rb'
  752. # This cop supports safe autocorrection (--autocorrect).
  753. # Configuration parameters: EnforcedStyleForMultiline.
  754. # SupportedStylesForMultiline: comma, consistent_comma, no_comma
  755. Style/TrailingCommaInHashLiteral:
  756. Exclude:
  757. - 'config/environments/production.rb'
  758. - 'config/environments/test.rb'
  759. # This cop supports safe autocorrection (--autocorrect).
  760. # Configuration parameters: EnforcedStyle, MinSize, WordRegex.
  761. # SupportedStyles: percent, brackets
  762. Style/WordArray:
  763. Exclude:
  764. - 'app/helpers/languages_helper.rb'
  765. - 'config/initializers/cors.rb'
  766. - 'spec/controllers/settings/imports_controller_spec.rb'
  767. - 'spec/models/form/import_spec.rb'