.rubocop_todo.yml 24 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628
  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.57.2.
  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: Max, AllowHeredoc, AllowURI, URISchemes, IgnoreCopDirectives, AllowedPatterns.
  16. # URISchemes: http, https
  17. Layout/LineLength:
  18. Exclude:
  19. - 'app/models/account.rb'
  20. Lint/NonLocalExitFromIterator:
  21. Exclude:
  22. - 'app/helpers/jsonld_helper.rb'
  23. # This cop supports safe autocorrection (--autocorrect).
  24. # Configuration parameters: IgnoreEmptyBlocks, AllowUnusedKeywordArguments.
  25. Lint/UnusedBlockArgument:
  26. Exclude:
  27. - 'config/initializers/content_security_policy.rb'
  28. - 'config/initializers/doorkeeper.rb'
  29. - 'config/initializers/paperclip.rb'
  30. - 'config/initializers/simple_form.rb'
  31. # Configuration parameters: AllowedMethods, AllowedPatterns, CountRepeatedAttributes.
  32. Metrics/AbcSize:
  33. Max: 144
  34. # Configuration parameters: CountBlocks, Max.
  35. Metrics/BlockNesting:
  36. Exclude:
  37. - 'lib/tasks/mastodon.rake'
  38. # Configuration parameters: AllowedMethods, AllowedPatterns.
  39. Metrics/CyclomaticComplexity:
  40. Max: 25
  41. # Configuration parameters: AllowedMethods, AllowedPatterns.
  42. Metrics/PerceivedComplexity:
  43. Max: 27
  44. RSpec/AnyInstance:
  45. Exclude:
  46. - 'spec/controllers/activitypub/inboxes_controller_spec.rb'
  47. - 'spec/controllers/admin/accounts_controller_spec.rb'
  48. - 'spec/controllers/admin/resets_controller_spec.rb'
  49. - 'spec/controllers/auth/sessions_controller_spec.rb'
  50. - 'spec/controllers/settings/two_factor_authentication/confirmations_controller_spec.rb'
  51. - 'spec/controllers/settings/two_factor_authentication/recovery_codes_controller_spec.rb'
  52. - 'spec/lib/request_spec.rb'
  53. - 'spec/lib/status_filter_spec.rb'
  54. - 'spec/models/account_spec.rb'
  55. - 'spec/models/setting_spec.rb'
  56. - 'spec/services/activitypub/process_collection_service_spec.rb'
  57. - 'spec/validators/follow_limit_validator_spec.rb'
  58. - 'spec/workers/activitypub/delivery_worker_spec.rb'
  59. - 'spec/workers/web/push_notification_worker_spec.rb'
  60. # Configuration parameters: CountAsOne.
  61. RSpec/ExampleLength:
  62. Max: 22
  63. # Configuration parameters: AssignmentOnly.
  64. RSpec/InstanceVariable:
  65. Exclude:
  66. - 'spec/controllers/api/v1/streaming_controller_spec.rb'
  67. - 'spec/controllers/auth/confirmations_controller_spec.rb'
  68. - 'spec/controllers/auth/passwords_controller_spec.rb'
  69. - 'spec/controllers/auth/sessions_controller_spec.rb'
  70. - 'spec/controllers/concerns/export_controller_concern_spec.rb'
  71. - 'spec/controllers/home_controller_spec.rb'
  72. - 'spec/controllers/settings/two_factor_authentication/webauthn_credentials_controller_spec.rb'
  73. - 'spec/controllers/statuses_cleanup_controller_spec.rb'
  74. - 'spec/models/concerns/account_finder_concern_spec.rb'
  75. - 'spec/models/concerns/account_interactions_spec.rb'
  76. - 'spec/models/public_feed_spec.rb'
  77. - 'spec/serializers/activitypub/note_serializer_spec.rb'
  78. - 'spec/serializers/activitypub/update_poll_serializer_spec.rb'
  79. - 'spec/services/remove_status_service_spec.rb'
  80. - 'spec/services/search_service_spec.rb'
  81. - 'spec/services/unblock_domain_service_spec.rb'
  82. RSpec/LetSetup:
  83. Exclude:
  84. - 'spec/controllers/api/v1/accounts/statuses_controller_spec.rb'
  85. - 'spec/controllers/api/v1/filters_controller_spec.rb'
  86. - 'spec/controllers/api/v2/admin/accounts_controller_spec.rb'
  87. - 'spec/controllers/api/v2/filters/keywords_controller_spec.rb'
  88. - 'spec/controllers/api/v2/filters/statuses_controller_spec.rb'
  89. - 'spec/controllers/auth/confirmations_controller_spec.rb'
  90. - 'spec/controllers/auth/passwords_controller_spec.rb'
  91. - 'spec/controllers/auth/sessions_controller_spec.rb'
  92. - 'spec/controllers/follower_accounts_controller_spec.rb'
  93. - 'spec/controllers/following_accounts_controller_spec.rb'
  94. - 'spec/controllers/oauth/authorized_applications_controller_spec.rb'
  95. - 'spec/controllers/oauth/tokens_controller_spec.rb'
  96. - 'spec/controllers/settings/imports_controller_spec.rb'
  97. - 'spec/lib/activitypub/activity/delete_spec.rb'
  98. - 'spec/lib/vacuum/applications_vacuum_spec.rb'
  99. - 'spec/lib/vacuum/preview_cards_vacuum_spec.rb'
  100. - 'spec/models/account_spec.rb'
  101. - 'spec/models/account_statuses_cleanup_policy_spec.rb'
  102. - 'spec/models/canonical_email_block_spec.rb'
  103. - 'spec/models/status_spec.rb'
  104. - 'spec/models/user_spec.rb'
  105. - 'spec/services/account_statuses_cleanup_service_spec.rb'
  106. - 'spec/services/activitypub/fetch_featured_collection_service_spec.rb'
  107. - 'spec/services/activitypub/fetch_remote_status_service_spec.rb'
  108. - 'spec/services/activitypub/process_account_service_spec.rb'
  109. - 'spec/services/activitypub/process_collection_service_spec.rb'
  110. - 'spec/services/batched_remove_status_service_spec.rb'
  111. - 'spec/services/block_domain_service_spec.rb'
  112. - 'spec/services/bulk_import_service_spec.rb'
  113. - 'spec/services/delete_account_service_spec.rb'
  114. - 'spec/services/import_service_spec.rb'
  115. - 'spec/services/notify_service_spec.rb'
  116. - 'spec/services/remove_status_service_spec.rb'
  117. - 'spec/services/report_service_spec.rb'
  118. - 'spec/services/resolve_account_service_spec.rb'
  119. - 'spec/services/suspend_account_service_spec.rb'
  120. - 'spec/services/unallow_domain_service_spec.rb'
  121. - 'spec/services/unsuspend_account_service_spec.rb'
  122. - 'spec/workers/scheduler/user_cleanup_scheduler_spec.rb'
  123. RSpec/MessageChain:
  124. Exclude:
  125. - 'spec/models/concerns/remotable_spec.rb'
  126. - 'spec/models/session_activation_spec.rb'
  127. - 'spec/models/setting_spec.rb'
  128. RSpec/MultipleExpectations:
  129. Max: 8
  130. # Configuration parameters: AllowSubject.
  131. RSpec/MultipleMemoizedHelpers:
  132. Max: 21
  133. # Configuration parameters: AllowedGroups.
  134. RSpec/NestedGroups:
  135. Max: 6
  136. # This cop supports unsafe autocorrection (--autocorrect-all).
  137. Rails/ApplicationController:
  138. Exclude:
  139. - 'app/controllers/health_controller.rb'
  140. # Configuration parameters: Include.
  141. # Include: app/models/**/*.rb
  142. Rails/HasAndBelongsToMany:
  143. Exclude:
  144. - 'app/models/concerns/account_associations.rb'
  145. - 'app/models/preview_card.rb'
  146. - 'app/models/status.rb'
  147. - 'app/models/tag.rb'
  148. # Configuration parameters: Include.
  149. # Include: app/models/**/*.rb
  150. Rails/HasManyOrHasOneDependent:
  151. Exclude:
  152. - 'app/models/concerns/account_counters.rb'
  153. - 'app/models/conversation.rb'
  154. - 'app/models/custom_emoji.rb'
  155. - 'app/models/custom_emoji_category.rb'
  156. - 'app/models/domain_block.rb'
  157. - 'app/models/invite.rb'
  158. - 'app/models/status.rb'
  159. - 'app/models/user.rb'
  160. - 'app/models/web/push_subscription.rb'
  161. Rails/I18nLocaleTexts:
  162. Exclude:
  163. - 'lib/tasks/mastodon.rake'
  164. - 'spec/helpers/flashes_helper_spec.rb'
  165. # Configuration parameters: Include.
  166. # Include: app/controllers/**/*.rb, app/mailers/**/*.rb
  167. Rails/LexicallyScopedActionFilter:
  168. Exclude:
  169. - 'app/controllers/auth/passwords_controller.rb'
  170. - 'app/controllers/auth/registrations_controller.rb'
  171. # This cop supports unsafe autocorrection (--autocorrect-all).
  172. Rails/NegateInclude:
  173. Exclude:
  174. - 'app/controllers/concerns/signature_verification.rb'
  175. - 'app/helpers/jsonld_helper.rb'
  176. - 'app/lib/activitypub/activity/create.rb'
  177. - 'app/lib/activitypub/activity/move.rb'
  178. - 'app/lib/feed_manager.rb'
  179. - 'app/lib/link_details_extractor.rb'
  180. - 'app/models/concerns/attachmentable.rb'
  181. - 'app/models/concerns/remotable.rb'
  182. - 'app/models/custom_filter.rb'
  183. - 'app/services/activitypub/process_status_update_service.rb'
  184. - 'app/services/fetch_link_card_service.rb'
  185. - 'app/workers/web/push_notification_worker.rb'
  186. - 'lib/paperclip/color_extractor.rb'
  187. Rails/OutputSafety:
  188. Exclude:
  189. - 'config/initializers/simple_form.rb'
  190. # This cop supports unsafe autocorrection (--autocorrect-all).
  191. # Configuration parameters: Include.
  192. # Include: **/Rakefile, **/*.rake
  193. Rails/RakeEnvironment:
  194. Exclude:
  195. - 'lib/tasks/auto_annotate_models.rake'
  196. - 'lib/tasks/db.rake'
  197. - 'lib/tasks/emojis.rake'
  198. - 'lib/tasks/mastodon.rake'
  199. - 'lib/tasks/repo.rake'
  200. - 'lib/tasks/statistics.rake'
  201. # Configuration parameters: ForbiddenMethods, AllowedMethods.
  202. # 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
  203. Rails/SkipsModelValidations:
  204. Exclude:
  205. - 'app/controllers/admin/invites_controller.rb'
  206. - 'app/controllers/concerns/session_tracking_concern.rb'
  207. - 'app/models/concerns/account_merging.rb'
  208. - 'app/models/concerns/expireable.rb'
  209. - 'app/models/status.rb'
  210. - 'app/models/trends/links.rb'
  211. - 'app/models/trends/preview_card_batch.rb'
  212. - 'app/models/trends/preview_card_provider_batch.rb'
  213. - 'app/models/trends/status_batch.rb'
  214. - 'app/models/trends/statuses.rb'
  215. - 'app/models/trends/tag_batch.rb'
  216. - 'app/models/trends/tags.rb'
  217. - 'app/models/user.rb'
  218. - 'app/services/activitypub/process_status_update_service.rb'
  219. - 'app/services/approve_appeal_service.rb'
  220. - 'app/services/block_domain_service.rb'
  221. - 'app/services/delete_account_service.rb'
  222. - 'app/services/process_mentions_service.rb'
  223. - 'app/services/unallow_domain_service.rb'
  224. - 'app/services/unblock_domain_service.rb'
  225. - 'app/services/update_status_service.rb'
  226. - 'app/workers/activitypub/post_upgrade_worker.rb'
  227. - 'app/workers/move_worker.rb'
  228. - 'app/workers/scheduler/ip_cleanup_scheduler.rb'
  229. - 'app/workers/scheduler/scheduled_statuses_scheduler.rb'
  230. - 'db/migrate/20161203164520_add_from_account_id_to_notifications.rb'
  231. - 'db/migrate/20170105224407_add_shortcode_to_media_attachments.rb'
  232. - 'db/migrate/20170209184350_add_reply_to_statuses.rb'
  233. - 'db/migrate/20170304202101_add_type_to_media_attachments.rb'
  234. - 'db/migrate/20180528141303_fix_accounts_unique_index.rb'
  235. - 'db/migrate/20180609104432_migrate_web_push_subscriptions2.rb'
  236. - 'db/migrate/20181207011115_downcase_custom_emoji_domains.rb'
  237. - 'db/migrate/20190511134027_add_silenced_at_suspended_at_to_accounts.rb'
  238. - 'db/migrate/20191007013357_update_pt_locales.rb'
  239. - 'db/migrate/20220316233212_update_kurdish_locales.rb'
  240. - 'db/post_migrate/20190511152737_remove_suspended_silenced_account_fields.rb'
  241. - 'db/post_migrate/20200917193528_migrate_notifications_type.rb'
  242. - 'db/post_migrate/20201017234926_fill_account_suspension_origin.rb'
  243. - 'db/post_migrate/20220617202502_migrate_roles.rb'
  244. - 'db/post_migrate/20221101190723_backfill_admin_action_logs.rb'
  245. - 'db/post_migrate/20221206114142_backfill_admin_action_logs_again.rb'
  246. - 'lib/mastodon/cli/accounts.rb'
  247. - 'lib/mastodon/cli/maintenance.rb'
  248. - 'spec/lib/activitypub/activity/follow_spec.rb'
  249. - 'spec/services/follow_service_spec.rb'
  250. - 'spec/services/update_account_service_spec.rb'
  251. # Configuration parameters: Include.
  252. # Include: app/models/**/*.rb
  253. Rails/UniqueValidationWithoutIndex:
  254. Exclude:
  255. - 'app/models/account_alias.rb'
  256. - 'app/models/custom_filter_status.rb'
  257. - 'app/models/identity.rb'
  258. - 'app/models/webauthn_credential.rb'
  259. # Configuration parameters: Include.
  260. # Include: app/models/**/*.rb
  261. Rails/UnusedIgnoredColumns:
  262. Exclude:
  263. - 'app/models/account.rb'
  264. - 'app/models/account_stat.rb'
  265. - 'app/models/admin/action_log.rb'
  266. - 'app/models/custom_filter.rb'
  267. - 'app/models/email_domain_block.rb'
  268. - 'app/models/report.rb'
  269. - 'app/models/status_edit.rb'
  270. - 'app/models/user.rb'
  271. # This cop supports unsafe autocorrection (--autocorrect-all).
  272. # Configuration parameters: EnforcedStyle.
  273. # SupportedStyles: exists, where
  274. Rails/WhereExists:
  275. Exclude:
  276. - 'app/controllers/activitypub/inboxes_controller.rb'
  277. - 'app/controllers/admin/email_domain_blocks_controller.rb'
  278. - 'app/controllers/auth/registrations_controller.rb'
  279. - 'app/lib/activitypub/activity/create.rb'
  280. - 'app/lib/delivery_failure_tracker.rb'
  281. - 'app/lib/feed_manager.rb'
  282. - 'app/lib/status_cache_hydrator.rb'
  283. - 'app/lib/suspicious_sign_in_detector.rb'
  284. - 'app/models/concerns/account_interactions.rb'
  285. - 'app/models/featured_tag.rb'
  286. - 'app/models/poll.rb'
  287. - 'app/models/session_activation.rb'
  288. - 'app/models/status.rb'
  289. - 'app/models/user.rb'
  290. - 'app/policies/status_policy.rb'
  291. - 'app/serializers/rest/announcement_serializer.rb'
  292. - 'app/serializers/rest/tag_serializer.rb'
  293. - 'app/services/activitypub/fetch_remote_status_service.rb'
  294. - 'app/services/app_sign_up_service.rb'
  295. - 'app/services/vote_service.rb'
  296. - 'app/validators/reaction_validator.rb'
  297. - 'app/validators/vote_validator.rb'
  298. - 'app/workers/move_worker.rb'
  299. - 'db/migrate/20190529143559_preserve_old_layout_for_existing_users.rb'
  300. - 'lib/tasks/tests.rake'
  301. - 'spec/models/account_spec.rb'
  302. - 'spec/services/activitypub/process_collection_service_spec.rb'
  303. - 'spec/services/purge_domain_service_spec.rb'
  304. - 'spec/services/unallow_domain_service_spec.rb'
  305. # This cop supports safe autocorrection (--autocorrect).
  306. # Configuration parameters: AllowOnConstant, AllowOnSelfClass.
  307. Style/CaseEquality:
  308. Exclude:
  309. - 'config/initializers/trusted_proxies.rb'
  310. # This cop supports unsafe autocorrection (--autocorrect-all).
  311. # Configuration parameters: AllowedMethods, AllowedPatterns.
  312. # AllowedMethods: ==, equal?, eql?
  313. Style/ClassEqualityComparison:
  314. Exclude:
  315. - 'app/helpers/jsonld_helper.rb'
  316. - 'app/serializers/activitypub/outbox_serializer.rb'
  317. Style/ClassVars:
  318. Exclude:
  319. - 'config/initializers/devise.rb'
  320. # This cop supports safe autocorrection (--autocorrect).
  321. # Configuration parameters: AllowedVars.
  322. Style/FetchEnvVar:
  323. Exclude:
  324. - 'app/lib/redis_configuration.rb'
  325. - 'app/lib/translation_service.rb'
  326. - 'config/environments/development.rb'
  327. - 'config/environments/production.rb'
  328. - 'config/initializers/2_limited_federation_mode.rb'
  329. - 'config/initializers/3_omniauth.rb'
  330. - 'config/initializers/blacklists.rb'
  331. - 'config/initializers/cache_buster.rb'
  332. - 'config/initializers/devise.rb'
  333. - 'config/initializers/paperclip.rb'
  334. - 'config/initializers/vapid.rb'
  335. - 'lib/mastodon/premailer_webpack_strategy.rb'
  336. - 'lib/mastodon/redis_config.rb'
  337. - 'lib/tasks/repo.rake'
  338. - 'spec/features/profile_spec.rb'
  339. # This cop supports safe autocorrection (--autocorrect).
  340. # Configuration parameters: EnforcedStyle, MaxUnannotatedPlaceholdersAllowed, AllowedMethods, AllowedPatterns.
  341. # SupportedStyles: annotated, template, unannotated
  342. # AllowedMethods: redirect
  343. Style/FormatStringToken:
  344. Exclude:
  345. - 'app/models/privacy_policy.rb'
  346. - 'config/initializers/devise.rb'
  347. - 'lib/paperclip/color_extractor.rb'
  348. # This cop supports unsafe autocorrection (--autocorrect-all).
  349. Style/GlobalStdStream:
  350. Exclude:
  351. - 'config/boot.rb'
  352. - 'config/environments/development.rb'
  353. - 'config/environments/production.rb'
  354. # This cop supports safe autocorrection (--autocorrect).
  355. # Configuration parameters: MinBodyLength, AllowConsecutiveConditionals.
  356. Style/GuardClause:
  357. Exclude:
  358. - 'app/controllers/admin/confirmations_controller.rb'
  359. - 'app/controllers/auth/confirmations_controller.rb'
  360. - 'app/controllers/auth/passwords_controller.rb'
  361. - 'app/controllers/settings/two_factor_authentication/webauthn_credentials_controller.rb'
  362. - 'app/lib/activitypub/activity/block.rb'
  363. - 'app/lib/request.rb'
  364. - 'app/lib/request_pool.rb'
  365. - 'app/lib/webfinger.rb'
  366. - 'app/lib/webfinger_resource.rb'
  367. - 'app/models/concerns/account_counters.rb'
  368. - 'app/models/concerns/ldap_authenticable.rb'
  369. - 'app/models/tag.rb'
  370. - 'app/models/user.rb'
  371. - 'app/services/fan_out_on_write_service.rb'
  372. - 'app/services/post_status_service.rb'
  373. - 'app/services/process_hashtags_service.rb'
  374. - 'app/workers/move_worker.rb'
  375. - 'app/workers/redownload_avatar_worker.rb'
  376. - 'app/workers/redownload_header_worker.rb'
  377. - 'app/workers/redownload_media_worker.rb'
  378. - 'app/workers/remote_account_refresh_worker.rb'
  379. - 'config/initializers/devise.rb'
  380. - 'db/migrate/20170901141119_truncate_preview_cards.rb'
  381. - 'db/post_migrate/20220704024901_migrate_settings_to_user_roles.rb'
  382. - 'lib/devise/two_factor_ldap_authenticatable.rb'
  383. - 'lib/devise/two_factor_pam_authenticatable.rb'
  384. - 'lib/mastodon/cli/accounts.rb'
  385. - 'lib/mastodon/cli/maintenance.rb'
  386. - 'lib/mastodon/cli/media.rb'
  387. - 'lib/paperclip/attachment_extensions.rb'
  388. - 'lib/tasks/repo.rake'
  389. # This cop supports safe autocorrection (--autocorrect).
  390. # Configuration parameters: EnforcedStyle.
  391. # SupportedStyles: braces, no_braces
  392. Style/HashAsLastArrayItem:
  393. Exclude:
  394. - 'app/controllers/admin/statuses_controller.rb'
  395. - 'app/controllers/api/v1/statuses_controller.rb'
  396. - 'app/models/concerns/account_counters.rb'
  397. - 'app/models/concerns/status_threading_concern.rb'
  398. - 'app/models/status.rb'
  399. - 'app/services/batched_remove_status_service.rb'
  400. - 'app/services/notify_service.rb'
  401. - 'db/migrate/20181024224956_migrate_account_conversations.rb'
  402. # This cop supports unsafe autocorrection (--autocorrect-all).
  403. Style/HashTransformValues:
  404. Exclude:
  405. - 'app/serializers/rest/web_push_subscription_serializer.rb'
  406. - 'app/services/import_service.rb'
  407. # This cop supports safe autocorrection (--autocorrect).
  408. Style/IfUnlessModifier:
  409. Exclude:
  410. - 'config/environments/production.rb'
  411. - 'config/initializers/devise.rb'
  412. - 'config/initializers/ffmpeg.rb'
  413. # This cop supports unsafe autocorrection (--autocorrect-all).
  414. # Configuration parameters: InverseMethods, InverseBlocks.
  415. Style/InverseMethods:
  416. Exclude:
  417. - 'app/models/custom_filter.rb'
  418. - 'app/services/update_account_service.rb'
  419. - 'spec/controllers/activitypub/replies_controller_spec.rb'
  420. # This cop supports safe autocorrection (--autocorrect).
  421. # Configuration parameters: EnforcedStyle.
  422. # SupportedStyles: line_count_dependent, lambda, literal
  423. Style/Lambda:
  424. Exclude:
  425. - 'config/initializers/simple_form.rb'
  426. - 'config/routes.rb'
  427. # This cop supports unsafe autocorrection (--autocorrect-all).
  428. Style/MapToHash:
  429. Exclude:
  430. - 'app/models/status.rb'
  431. # This cop supports unsafe autocorrection (--autocorrect-all).
  432. # Configuration parameters: EnforcedStyle.
  433. # SupportedStyles: literals, strict
  434. Style/MutableConstant:
  435. Exclude:
  436. - 'app/models/tag.rb'
  437. - 'app/services/delete_account_service.rb'
  438. - 'lib/mastodon/migration_warning.rb'
  439. # This cop supports safe autocorrection (--autocorrect).
  440. Style/NilLambda:
  441. Exclude:
  442. - 'config/initializers/paperclip.rb'
  443. # Configuration parameters: AllowedMethods.
  444. # AllowedMethods: respond_to_missing?
  445. Style/OptionalBooleanParameter:
  446. Exclude:
  447. - 'app/helpers/admin/account_moderation_notes_helper.rb'
  448. - 'app/helpers/jsonld_helper.rb'
  449. - 'app/lib/admin/system_check/message.rb'
  450. - 'app/lib/request.rb'
  451. - 'app/lib/webfinger.rb'
  452. - 'app/services/block_domain_service.rb'
  453. - 'app/services/fetch_resource_service.rb'
  454. - 'app/workers/domain_block_worker.rb'
  455. - 'app/workers/unfollow_follow_worker.rb'
  456. - 'lib/mastodon/redis_config.rb'
  457. # This cop supports safe autocorrection (--autocorrect).
  458. # Configuration parameters: PreferredDelimiters.
  459. Style/PercentLiteralDelimiters:
  460. Exclude:
  461. - 'config/deploy.rb'
  462. - 'config/initializers/doorkeeper.rb'
  463. # This cop supports unsafe autocorrection (--autocorrect-all).
  464. # Configuration parameters: EnforcedStyle.
  465. # SupportedStyles: short, verbose
  466. Style/PreferredHashMethods:
  467. Exclude:
  468. - 'config/initializers/paperclip.rb'
  469. # This cop supports safe autocorrection (--autocorrect).
  470. Style/RedundantConstantBase:
  471. Exclude:
  472. - 'config/environments/production.rb'
  473. - 'config/initializers/sidekiq.rb'
  474. # This cop supports unsafe autocorrection (--autocorrect-all).
  475. # Configuration parameters: SafeForConstants.
  476. Style/RedundantFetchBlock:
  477. Exclude:
  478. - 'config/initializers/1_hosts.rb'
  479. - 'config/initializers/chewy.rb'
  480. - 'config/initializers/devise.rb'
  481. - 'config/initializers/paperclip.rb'
  482. - 'config/puma.rb'
  483. # This cop supports safe autocorrection (--autocorrect).
  484. # Configuration parameters: AllowMultipleReturnValues.
  485. Style/RedundantReturn:
  486. Exclude:
  487. - 'app/controllers/api/v1/directories_controller.rb'
  488. - 'app/controllers/auth/confirmations_controller.rb'
  489. - 'app/lib/ostatus/tag_manager.rb'
  490. - 'app/models/form/import.rb'
  491. # This cop supports unsafe autocorrection (--autocorrect-all).
  492. # Configuration parameters: ConvertCodeThatCanStartToReturnNil, AllowedMethods, MaxChainLength.
  493. # AllowedMethods: present?, blank?, presence, try, try!
  494. Style/SafeNavigation:
  495. Exclude:
  496. - 'app/models/concerns/account_finder_concern.rb'
  497. # This cop supports safe autocorrection (--autocorrect).
  498. # Configuration parameters: EnforcedStyle.
  499. # SupportedStyles: only_raise, only_fail, semantic
  500. Style/SignalException:
  501. Exclude:
  502. - 'lib/devise/two_factor_ldap_authenticatable.rb'
  503. - 'lib/devise/two_factor_pam_authenticatable.rb'
  504. # This cop supports unsafe autocorrection (--autocorrect-all).
  505. Style/SingleArgumentDig:
  506. Exclude:
  507. - 'lib/webpacker/manifest_extensions.rb'
  508. # This cop supports safe autocorrection (--autocorrect).
  509. # Configuration parameters: EnforcedStyle.
  510. # SupportedStyles: require_parentheses, require_no_parentheses
  511. Style/StabbyLambdaParentheses:
  512. Exclude:
  513. - 'config/environments/production.rb'
  514. - 'config/initializers/content_security_policy.rb'
  515. # This cop supports safe autocorrection (--autocorrect).
  516. Style/StderrPuts:
  517. Exclude:
  518. - 'config/boot.rb'
  519. # This cop supports unsafe autocorrection (--autocorrect-all).
  520. # Configuration parameters: Mode.
  521. Style/StringConcatenation:
  522. Exclude:
  523. - 'config/initializers/paperclip.rb'
  524. # This cop supports safe autocorrection (--autocorrect).
  525. # Configuration parameters: EnforcedStyle, ConsistentQuotesInMultiline.
  526. # SupportedStyles: single_quotes, double_quotes
  527. Style/StringLiterals:
  528. Exclude:
  529. - 'config/environments/production.rb'
  530. - 'config/initializers/backtrace_silencers.rb'
  531. - 'config/initializers/http_client_proxy.rb'
  532. - 'config/initializers/rack_attack.rb'
  533. - 'config/initializers/webauthn.rb'
  534. - 'config/routes.rb'
  535. # This cop supports unsafe autocorrection (--autocorrect-all).
  536. # Configuration parameters: AllowMethodsWithArguments, AllowedMethods, AllowedPatterns, AllowComments.
  537. # AllowedMethods: define_method, mail, respond_to
  538. Style/SymbolProc:
  539. Exclude:
  540. - 'config/initializers/3_omniauth.rb'
  541. # This cop supports safe autocorrection (--autocorrect).
  542. # Configuration parameters: EnforcedStyle, AllowSafeAssignment.
  543. # SupportedStyles: require_parentheses, require_no_parentheses, require_parentheses_when_complex
  544. Style/TernaryParentheses:
  545. Exclude:
  546. - 'config/environments/development.rb'
  547. # This cop supports safe autocorrection (--autocorrect).
  548. # Configuration parameters: EnforcedStyleForMultiline.
  549. # SupportedStylesForMultiline: comma, consistent_comma, no_comma
  550. Style/TrailingCommaInArguments:
  551. Exclude:
  552. - 'config/initializers/paperclip.rb'
  553. # This cop supports safe autocorrection (--autocorrect).
  554. # Configuration parameters: EnforcedStyleForMultiline.
  555. # SupportedStylesForMultiline: comma, consistent_comma, no_comma
  556. Style/TrailingCommaInHashLiteral:
  557. Exclude:
  558. - 'config/environments/production.rb'
  559. - 'config/environments/test.rb'
  560. # This cop supports safe autocorrection (--autocorrect).
  561. # Configuration parameters: EnforcedStyle, MinSize, WordRegex.
  562. # SupportedStyles: percent, brackets
  563. Style/WordArray:
  564. Exclude:
  565. - 'app/helpers/languages_helper.rb'
  566. - 'spec/controllers/settings/imports_controller_spec.rb'
  567. - 'spec/models/form/import_spec.rb'