.rubocop_todo.yml 17 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464
  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. # Configuration parameters: AllowedMethods, AllowedPatterns, CountRepeatedAttributes.
  24. Metrics/AbcSize:
  25. Max: 100
  26. # Configuration parameters: CountBlocks, Max.
  27. Metrics/BlockNesting:
  28. Exclude:
  29. - 'lib/tasks/mastodon.rake'
  30. # Configuration parameters: AllowedMethods, AllowedPatterns.
  31. Metrics/CyclomaticComplexity:
  32. Max: 25
  33. # Configuration parameters: AllowedMethods, AllowedPatterns.
  34. Metrics/PerceivedComplexity:
  35. Max: 27
  36. # Configuration parameters: CountAsOne.
  37. RSpec/ExampleLength:
  38. Max: 22
  39. RSpec/LetSetup:
  40. Exclude:
  41. - 'spec/controllers/api/v1/accounts/statuses_controller_spec.rb'
  42. - 'spec/controllers/api/v1/filters_controller_spec.rb'
  43. - 'spec/controllers/api/v2/admin/accounts_controller_spec.rb'
  44. - 'spec/controllers/api/v2/filters/keywords_controller_spec.rb'
  45. - 'spec/controllers/api/v2/filters/statuses_controller_spec.rb'
  46. - 'spec/controllers/auth/confirmations_controller_spec.rb'
  47. - 'spec/controllers/auth/passwords_controller_spec.rb'
  48. - 'spec/controllers/auth/sessions_controller_spec.rb'
  49. - 'spec/controllers/follower_accounts_controller_spec.rb'
  50. - 'spec/controllers/following_accounts_controller_spec.rb'
  51. - 'spec/controllers/oauth/authorized_applications_controller_spec.rb'
  52. - 'spec/controllers/oauth/tokens_controller_spec.rb'
  53. - 'spec/controllers/settings/imports_controller_spec.rb'
  54. - 'spec/lib/activitypub/activity/delete_spec.rb'
  55. - 'spec/lib/vacuum/applications_vacuum_spec.rb'
  56. - 'spec/lib/vacuum/preview_cards_vacuum_spec.rb'
  57. - 'spec/models/account_spec.rb'
  58. - 'spec/models/account_statuses_cleanup_policy_spec.rb'
  59. - 'spec/models/canonical_email_block_spec.rb'
  60. - 'spec/models/status_spec.rb'
  61. - 'spec/models/user_spec.rb'
  62. - 'spec/services/account_statuses_cleanup_service_spec.rb'
  63. - 'spec/services/activitypub/fetch_featured_collection_service_spec.rb'
  64. - 'spec/services/activitypub/fetch_remote_status_service_spec.rb'
  65. - 'spec/services/activitypub/process_account_service_spec.rb'
  66. - 'spec/services/activitypub/process_collection_service_spec.rb'
  67. - 'spec/services/batched_remove_status_service_spec.rb'
  68. - 'spec/services/block_domain_service_spec.rb'
  69. - 'spec/services/bulk_import_service_spec.rb'
  70. - 'spec/services/delete_account_service_spec.rb'
  71. - 'spec/services/import_service_spec.rb'
  72. - 'spec/services/notify_service_spec.rb'
  73. - 'spec/services/remove_status_service_spec.rb'
  74. - 'spec/services/report_service_spec.rb'
  75. - 'spec/services/resolve_account_service_spec.rb'
  76. - 'spec/services/suspend_account_service_spec.rb'
  77. - 'spec/services/unallow_domain_service_spec.rb'
  78. - 'spec/services/unsuspend_account_service_spec.rb'
  79. - 'spec/workers/scheduler/user_cleanup_scheduler_spec.rb'
  80. RSpec/MultipleExpectations:
  81. Max: 8
  82. # Configuration parameters: AllowSubject.
  83. RSpec/MultipleMemoizedHelpers:
  84. Max: 21
  85. # Configuration parameters: AllowedGroups.
  86. RSpec/NestedGroups:
  87. Max: 6
  88. # This cop supports unsafe autocorrection (--autocorrect-all).
  89. Rails/ApplicationController:
  90. Exclude:
  91. - 'app/controllers/health_controller.rb'
  92. # Configuration parameters: Include.
  93. # Include: app/models/**/*.rb
  94. Rails/HasAndBelongsToMany:
  95. Exclude:
  96. - 'app/models/concerns/account/associations.rb'
  97. - 'app/models/preview_card.rb'
  98. - 'app/models/status.rb'
  99. - 'app/models/tag.rb'
  100. # Configuration parameters: Include.
  101. # Include: app/controllers/**/*.rb, app/mailers/**/*.rb
  102. Rails/LexicallyScopedActionFilter:
  103. Exclude:
  104. - 'app/controllers/auth/passwords_controller.rb'
  105. - 'app/controllers/auth/registrations_controller.rb'
  106. Rails/OutputSafety:
  107. Exclude:
  108. - 'config/initializers/simple_form.rb'
  109. # This cop supports unsafe autocorrection (--autocorrect-all).
  110. # Configuration parameters: Include.
  111. # Include: **/Rakefile, **/*.rake
  112. Rails/RakeEnvironment:
  113. Exclude:
  114. - 'lib/tasks/auto_annotate_models.rake'
  115. - 'lib/tasks/db.rake'
  116. - 'lib/tasks/emojis.rake'
  117. - 'lib/tasks/mastodon.rake'
  118. - 'lib/tasks/repo.rake'
  119. - 'lib/tasks/statistics.rake'
  120. # Configuration parameters: ForbiddenMethods, AllowedMethods.
  121. # 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
  122. Rails/SkipsModelValidations:
  123. Exclude:
  124. - 'app/controllers/admin/invites_controller.rb'
  125. - 'app/controllers/concerns/session_tracking_concern.rb'
  126. - 'app/models/concerns/account/merging.rb'
  127. - 'app/models/concerns/expireable.rb'
  128. - 'app/models/status.rb'
  129. - 'app/models/trends/links.rb'
  130. - 'app/models/trends/preview_card_batch.rb'
  131. - 'app/models/trends/preview_card_provider_batch.rb'
  132. - 'app/models/trends/status_batch.rb'
  133. - 'app/models/trends/statuses.rb'
  134. - 'app/models/trends/tag_batch.rb'
  135. - 'app/models/trends/tags.rb'
  136. - 'app/models/user.rb'
  137. - 'app/services/activitypub/process_status_update_service.rb'
  138. - 'app/services/approve_appeal_service.rb'
  139. - 'app/services/block_domain_service.rb'
  140. - 'app/services/delete_account_service.rb'
  141. - 'app/services/process_mentions_service.rb'
  142. - 'app/services/unallow_domain_service.rb'
  143. - 'app/services/unblock_domain_service.rb'
  144. - 'app/services/update_status_service.rb'
  145. - 'app/workers/activitypub/post_upgrade_worker.rb'
  146. - 'app/workers/move_worker.rb'
  147. - 'app/workers/scheduler/ip_cleanup_scheduler.rb'
  148. - 'app/workers/scheduler/scheduled_statuses_scheduler.rb'
  149. - 'lib/mastodon/cli/accounts.rb'
  150. - 'lib/mastodon/cli/maintenance.rb'
  151. - 'spec/lib/activitypub/activity/follow_spec.rb'
  152. - 'spec/services/follow_service_spec.rb'
  153. - 'spec/services/update_account_service_spec.rb'
  154. # Configuration parameters: Include.
  155. # Include: app/models/**/*.rb
  156. Rails/UniqueValidationWithoutIndex:
  157. Exclude:
  158. - 'app/models/account_alias.rb'
  159. - 'app/models/custom_filter_status.rb'
  160. - 'app/models/identity.rb'
  161. - 'app/models/webauthn_credential.rb'
  162. # This cop supports unsafe autocorrection (--autocorrect-all).
  163. # Configuration parameters: EnforcedStyle.
  164. # SupportedStyles: exists, where
  165. Rails/WhereExists:
  166. Exclude:
  167. - 'app/controllers/activitypub/inboxes_controller.rb'
  168. - 'app/controllers/admin/email_domain_blocks_controller.rb'
  169. - 'app/controllers/auth/registrations_controller.rb'
  170. - 'app/lib/activitypub/activity/create.rb'
  171. - 'app/lib/delivery_failure_tracker.rb'
  172. - 'app/lib/feed_manager.rb'
  173. - 'app/lib/status_cache_hydrator.rb'
  174. - 'app/lib/suspicious_sign_in_detector.rb'
  175. - 'app/models/concerns/account/interactions.rb'
  176. - 'app/models/featured_tag.rb'
  177. - 'app/models/poll.rb'
  178. - 'app/models/session_activation.rb'
  179. - 'app/models/status.rb'
  180. - 'app/models/user.rb'
  181. - 'app/policies/status_policy.rb'
  182. - 'app/serializers/rest/announcement_serializer.rb'
  183. - 'app/serializers/rest/tag_serializer.rb'
  184. - 'app/services/activitypub/fetch_remote_status_service.rb'
  185. - 'app/services/app_sign_up_service.rb'
  186. - 'app/services/vote_service.rb'
  187. - 'app/validators/reaction_validator.rb'
  188. - 'app/validators/vote_validator.rb'
  189. - 'app/workers/move_worker.rb'
  190. - 'db/migrate/20190529143559_preserve_old_layout_for_existing_users.rb'
  191. - 'lib/tasks/tests.rake'
  192. - 'spec/models/account_spec.rb'
  193. - 'spec/services/activitypub/process_collection_service_spec.rb'
  194. - 'spec/services/purge_domain_service_spec.rb'
  195. - 'spec/services/unallow_domain_service_spec.rb'
  196. # This cop supports safe autocorrection (--autocorrect).
  197. # Configuration parameters: AllowOnConstant, AllowOnSelfClass.
  198. Style/CaseEquality:
  199. Exclude:
  200. - 'config/initializers/trusted_proxies.rb'
  201. # This cop supports unsafe autocorrection (--autocorrect-all).
  202. # Configuration parameters: AllowedMethods, AllowedPatterns.
  203. # AllowedMethods: ==, equal?, eql?
  204. Style/ClassEqualityComparison:
  205. Exclude:
  206. - 'app/helpers/jsonld_helper.rb'
  207. - 'app/serializers/activitypub/outbox_serializer.rb'
  208. Style/ClassVars:
  209. Exclude:
  210. - 'config/initializers/devise.rb'
  211. # This cop supports safe autocorrection (--autocorrect).
  212. # Configuration parameters: AllowedVars.
  213. Style/FetchEnvVar:
  214. Exclude:
  215. - 'app/lib/redis_configuration.rb'
  216. - 'app/lib/translation_service.rb'
  217. - 'config/environments/development.rb'
  218. - 'config/environments/production.rb'
  219. - 'config/initializers/2_limited_federation_mode.rb'
  220. - 'config/initializers/3_omniauth.rb'
  221. - 'config/initializers/blacklists.rb'
  222. - 'config/initializers/cache_buster.rb'
  223. - 'config/initializers/devise.rb'
  224. - 'config/initializers/paperclip.rb'
  225. - 'config/initializers/vapid.rb'
  226. - 'lib/premailer_webpack_strategy.rb'
  227. - 'lib/mastodon/redis_config.rb'
  228. - 'lib/tasks/repo.rake'
  229. - 'spec/features/profile_spec.rb'
  230. # This cop supports safe autocorrection (--autocorrect).
  231. # Configuration parameters: EnforcedStyle, MaxUnannotatedPlaceholdersAllowed, AllowedMethods, AllowedPatterns.
  232. # SupportedStyles: annotated, template, unannotated
  233. # AllowedMethods: redirect
  234. Style/FormatStringToken:
  235. Exclude:
  236. - 'app/models/privacy_policy.rb'
  237. - 'config/initializers/devise.rb'
  238. - 'lib/paperclip/color_extractor.rb'
  239. # This cop supports unsafe autocorrection (--autocorrect-all).
  240. Style/GlobalStdStream:
  241. Exclude:
  242. - 'config/boot.rb'
  243. - 'config/environments/development.rb'
  244. - 'config/environments/production.rb'
  245. # This cop supports safe autocorrection (--autocorrect).
  246. # Configuration parameters: MinBodyLength, AllowConsecutiveConditionals.
  247. Style/GuardClause:
  248. Exclude:
  249. - 'app/controllers/admin/confirmations_controller.rb'
  250. - 'app/controllers/auth/confirmations_controller.rb'
  251. - 'app/controllers/auth/passwords_controller.rb'
  252. - 'app/controllers/settings/two_factor_authentication/webauthn_credentials_controller.rb'
  253. - 'app/lib/activitypub/activity/block.rb'
  254. - 'app/lib/request.rb'
  255. - 'app/lib/request_pool.rb'
  256. - 'app/lib/webfinger.rb'
  257. - 'app/lib/webfinger_resource.rb'
  258. - 'app/models/concerns/account/counters.rb'
  259. - 'app/models/concerns/user/ldap_authenticable.rb'
  260. - 'app/models/tag.rb'
  261. - 'app/models/user.rb'
  262. - 'app/services/fan_out_on_write_service.rb'
  263. - 'app/services/post_status_service.rb'
  264. - 'app/services/process_hashtags_service.rb'
  265. - 'app/workers/move_worker.rb'
  266. - 'app/workers/redownload_avatar_worker.rb'
  267. - 'app/workers/redownload_header_worker.rb'
  268. - 'app/workers/redownload_media_worker.rb'
  269. - 'app/workers/remote_account_refresh_worker.rb'
  270. - 'config/initializers/devise.rb'
  271. - 'db/migrate/20170901141119_truncate_preview_cards.rb'
  272. - 'db/post_migrate/20220704024901_migrate_settings_to_user_roles.rb'
  273. - 'lib/devise/strategies/two_factor_ldap_authenticatable.rb'
  274. - 'lib/devise/strategies/two_factor_pam_authenticatable.rb'
  275. - 'lib/mastodon/cli/accounts.rb'
  276. - 'lib/mastodon/cli/maintenance.rb'
  277. - 'lib/mastodon/cli/media.rb'
  278. - 'lib/paperclip/attachment_extensions.rb'
  279. - 'lib/tasks/repo.rake'
  280. # This cop supports safe autocorrection (--autocorrect).
  281. # Configuration parameters: EnforcedStyle.
  282. # SupportedStyles: braces, no_braces
  283. Style/HashAsLastArrayItem:
  284. Exclude:
  285. - 'app/controllers/admin/statuses_controller.rb'
  286. - 'app/controllers/api/v1/statuses_controller.rb'
  287. - 'app/models/concerns/account/counters.rb'
  288. - 'app/models/concerns/status/threading_concern.rb'
  289. - 'app/models/status.rb'
  290. - 'app/services/batched_remove_status_service.rb'
  291. - 'app/services/notify_service.rb'
  292. - 'db/migrate/20181024224956_migrate_account_conversations.rb'
  293. # This cop supports unsafe autocorrection (--autocorrect-all).
  294. Style/HashTransformValues:
  295. Exclude:
  296. - 'app/serializers/rest/web_push_subscription_serializer.rb'
  297. - 'app/services/import_service.rb'
  298. # This cop supports safe autocorrection (--autocorrect).
  299. Style/IfUnlessModifier:
  300. Exclude:
  301. - 'config/environments/production.rb'
  302. - 'config/initializers/devise.rb'
  303. - 'config/initializers/ffmpeg.rb'
  304. # This cop supports unsafe autocorrection (--autocorrect-all).
  305. Style/MapToHash:
  306. Exclude:
  307. - 'app/models/status.rb'
  308. # This cop supports unsafe autocorrection (--autocorrect-all).
  309. # Configuration parameters: EnforcedStyle.
  310. # SupportedStyles: literals, strict
  311. Style/MutableConstant:
  312. Exclude:
  313. - 'app/models/tag.rb'
  314. - 'app/services/delete_account_service.rb'
  315. - 'lib/mastodon/migration_warning.rb'
  316. # This cop supports safe autocorrection (--autocorrect).
  317. Style/NilLambda:
  318. Exclude:
  319. - 'config/initializers/paperclip.rb'
  320. # Configuration parameters: AllowedMethods.
  321. # AllowedMethods: respond_to_missing?
  322. Style/OptionalBooleanParameter:
  323. Exclude:
  324. - 'app/helpers/admin/account_moderation_notes_helper.rb'
  325. - 'app/helpers/jsonld_helper.rb'
  326. - 'app/lib/admin/system_check/message.rb'
  327. - 'app/lib/request.rb'
  328. - 'app/lib/webfinger.rb'
  329. - 'app/services/block_domain_service.rb'
  330. - 'app/services/fetch_resource_service.rb'
  331. - 'app/workers/domain_block_worker.rb'
  332. - 'app/workers/unfollow_follow_worker.rb'
  333. - 'lib/mastodon/redis_config.rb'
  334. # This cop supports safe autocorrection (--autocorrect).
  335. # Configuration parameters: PreferredDelimiters.
  336. Style/PercentLiteralDelimiters:
  337. Exclude:
  338. - 'config/deploy.rb'
  339. - 'config/initializers/doorkeeper.rb'
  340. # This cop supports unsafe autocorrection (--autocorrect-all).
  341. # Configuration parameters: EnforcedStyle.
  342. # SupportedStyles: short, verbose
  343. Style/PreferredHashMethods:
  344. Exclude:
  345. - 'config/initializers/paperclip.rb'
  346. # This cop supports safe autocorrection (--autocorrect).
  347. Style/RedundantConstantBase:
  348. Exclude:
  349. - 'config/environments/production.rb'
  350. - 'config/initializers/sidekiq.rb'
  351. # This cop supports unsafe autocorrection (--autocorrect-all).
  352. # Configuration parameters: SafeForConstants.
  353. Style/RedundantFetchBlock:
  354. Exclude:
  355. - 'config/initializers/1_hosts.rb'
  356. - 'config/initializers/chewy.rb'
  357. - 'config/initializers/devise.rb'
  358. - 'config/initializers/paperclip.rb'
  359. - 'config/puma.rb'
  360. # This cop supports unsafe autocorrection (--autocorrect-all).
  361. # Configuration parameters: ConvertCodeThatCanStartToReturnNil, AllowedMethods, MaxChainLength.
  362. # AllowedMethods: present?, blank?, presence, try, try!
  363. Style/SafeNavigation:
  364. Exclude:
  365. - 'app/models/concerns/account/finder_concern.rb'
  366. # This cop supports safe autocorrection (--autocorrect).
  367. # Configuration parameters: EnforcedStyle.
  368. # SupportedStyles: only_raise, only_fail, semantic
  369. Style/SignalException:
  370. Exclude:
  371. - 'lib/devise/strategies/two_factor_ldap_authenticatable.rb'
  372. - 'lib/devise/strategies/two_factor_pam_authenticatable.rb'
  373. # This cop supports unsafe autocorrection (--autocorrect-all).
  374. Style/SingleArgumentDig:
  375. Exclude:
  376. - 'lib/webpacker/manifest_extensions.rb'
  377. # This cop supports unsafe autocorrection (--autocorrect-all).
  378. # Configuration parameters: Mode.
  379. Style/StringConcatenation:
  380. Exclude:
  381. - 'config/initializers/paperclip.rb'
  382. # This cop supports safe autocorrection (--autocorrect).
  383. # Configuration parameters: EnforcedStyle, ConsistentQuotesInMultiline.
  384. # SupportedStyles: single_quotes, double_quotes
  385. Style/StringLiterals:
  386. Exclude:
  387. - 'config/environments/production.rb'
  388. - 'config/initializers/backtrace_silencers.rb'
  389. - 'config/initializers/http_client_proxy.rb'
  390. - 'config/initializers/rack_attack.rb'
  391. - 'config/initializers/webauthn.rb'
  392. - 'config/routes.rb'
  393. # This cop supports safe autocorrection (--autocorrect).
  394. # Configuration parameters: EnforcedStyle, AllowSafeAssignment.
  395. # SupportedStyles: require_parentheses, require_no_parentheses, require_parentheses_when_complex
  396. Style/TernaryParentheses:
  397. Exclude:
  398. - 'config/environments/development.rb'
  399. # This cop supports safe autocorrection (--autocorrect).
  400. # Configuration parameters: EnforcedStyleForMultiline.
  401. # SupportedStylesForMultiline: comma, consistent_comma, no_comma
  402. Style/TrailingCommaInArguments:
  403. Exclude:
  404. - 'config/initializers/paperclip.rb'
  405. # This cop supports safe autocorrection (--autocorrect).
  406. # Configuration parameters: EnforcedStyleForMultiline.
  407. # SupportedStylesForMultiline: comma, consistent_comma, no_comma
  408. Style/TrailingCommaInHashLiteral:
  409. Exclude:
  410. - 'config/environments/production.rb'
  411. - 'config/environments/test.rb'
  412. # This cop supports safe autocorrection (--autocorrect).
  413. # Configuration parameters: EnforcedStyle, MinSize, WordRegex.
  414. # SupportedStyles: percent, brackets
  415. Style/WordArray:
  416. Exclude:
  417. - 'app/helpers/languages_helper.rb'