.rubocop_todo.yml 26 KB

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