.rubocop_todo.yml 12 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361
  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.59.0.
  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: 82
  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/MultipleExpectations:
  40. Max: 8
  41. # Configuration parameters: AllowSubject.
  42. RSpec/MultipleMemoizedHelpers:
  43. Max: 17
  44. # Configuration parameters: AllowedGroups.
  45. RSpec/NestedGroups:
  46. Max: 6
  47. # Configuration parameters: Include.
  48. # Include: app/models/**/*.rb
  49. Rails/HasAndBelongsToMany:
  50. Exclude:
  51. - 'app/models/concerns/account/associations.rb'
  52. - 'app/models/status.rb'
  53. - 'app/models/tag.rb'
  54. Rails/OutputSafety:
  55. Exclude:
  56. - 'config/initializers/simple_form.rb'
  57. # This cop supports unsafe autocorrection (--autocorrect-all).
  58. # Configuration parameters: Include.
  59. # Include: **/Rakefile, **/*.rake
  60. Rails/RakeEnvironment:
  61. Exclude:
  62. - 'lib/tasks/auto_annotate_models.rake'
  63. - 'lib/tasks/db.rake'
  64. - 'lib/tasks/emojis.rake'
  65. - 'lib/tasks/mastodon.rake'
  66. - 'lib/tasks/repo.rake'
  67. - 'lib/tasks/statistics.rake'
  68. # Configuration parameters: Include.
  69. # Include: app/models/**/*.rb
  70. Rails/UniqueValidationWithoutIndex:
  71. Exclude:
  72. - 'app/models/account_alias.rb'
  73. - 'app/models/custom_filter_status.rb'
  74. - 'app/models/identity.rb'
  75. - 'app/models/webauthn_credential.rb'
  76. # This cop supports unsafe autocorrection (--autocorrect-all).
  77. # Configuration parameters: EnforcedStyle.
  78. # SupportedStyles: exists, where
  79. Rails/WhereExists:
  80. Exclude:
  81. - 'app/controllers/activitypub/inboxes_controller.rb'
  82. - 'app/controllers/admin/email_domain_blocks_controller.rb'
  83. - 'app/lib/activitypub/activity/create.rb'
  84. - 'app/lib/delivery_failure_tracker.rb'
  85. - 'app/lib/feed_manager.rb'
  86. - 'app/lib/status_cache_hydrator.rb'
  87. - 'app/lib/suspicious_sign_in_detector.rb'
  88. - 'app/models/concerns/account/interactions.rb'
  89. - 'app/models/featured_tag.rb'
  90. - 'app/models/poll.rb'
  91. - 'app/models/session_activation.rb'
  92. - 'app/models/status.rb'
  93. - 'app/models/user.rb'
  94. - 'app/policies/status_policy.rb'
  95. - 'app/serializers/rest/announcement_serializer.rb'
  96. - 'app/serializers/rest/tag_serializer.rb'
  97. - 'app/services/activitypub/fetch_remote_status_service.rb'
  98. - 'app/services/vote_service.rb'
  99. - 'app/validators/reaction_validator.rb'
  100. - 'app/validators/vote_validator.rb'
  101. - 'app/workers/move_worker.rb'
  102. - 'lib/tasks/tests.rake'
  103. - 'spec/models/account_spec.rb'
  104. - 'spec/services/activitypub/process_collection_service_spec.rb'
  105. - 'spec/services/purge_domain_service_spec.rb'
  106. - 'spec/services/unallow_domain_service_spec.rb'
  107. # This cop supports unsafe autocorrection (--autocorrect-all).
  108. # Configuration parameters: AllowedMethods, AllowedPatterns.
  109. # AllowedMethods: ==, equal?, eql?
  110. Style/ClassEqualityComparison:
  111. Exclude:
  112. - 'app/helpers/jsonld_helper.rb'
  113. - 'app/serializers/activitypub/outbox_serializer.rb'
  114. Style/ClassVars:
  115. Exclude:
  116. - 'config/initializers/devise.rb'
  117. # This cop supports safe autocorrection (--autocorrect).
  118. # Configuration parameters: AllowedVars.
  119. Style/FetchEnvVar:
  120. Exclude:
  121. - 'app/lib/redis_configuration.rb'
  122. - 'app/lib/translation_service.rb'
  123. - 'config/environments/development.rb'
  124. - 'config/environments/production.rb'
  125. - 'config/initializers/2_limited_federation_mode.rb'
  126. - 'config/initializers/3_omniauth.rb'
  127. - 'config/initializers/blacklists.rb'
  128. - 'config/initializers/cache_buster.rb'
  129. - 'config/initializers/devise.rb'
  130. - 'config/initializers/paperclip.rb'
  131. - 'config/initializers/vapid.rb'
  132. - 'lib/mastodon/redis_config.rb'
  133. - 'lib/premailer_webpack_strategy.rb'
  134. - 'lib/tasks/repo.rake'
  135. - 'spec/features/profile_spec.rb'
  136. # This cop supports safe autocorrection (--autocorrect).
  137. # Configuration parameters: EnforcedStyle, MaxUnannotatedPlaceholdersAllowed, AllowedMethods, AllowedPatterns.
  138. # SupportedStyles: annotated, template, unannotated
  139. # AllowedMethods: redirect
  140. Style/FormatStringToken:
  141. Exclude:
  142. - 'app/models/privacy_policy.rb'
  143. - 'config/initializers/devise.rb'
  144. - 'lib/paperclip/color_extractor.rb'
  145. # This cop supports unsafe autocorrection (--autocorrect-all).
  146. Style/GlobalStdStream:
  147. Exclude:
  148. - 'config/environments/development.rb'
  149. - 'config/environments/production.rb'
  150. # This cop supports safe autocorrection (--autocorrect).
  151. # Configuration parameters: MinBodyLength, AllowConsecutiveConditionals.
  152. Style/GuardClause:
  153. Exclude:
  154. - 'app/controllers/admin/confirmations_controller.rb'
  155. - 'app/controllers/auth/confirmations_controller.rb'
  156. - 'app/controllers/auth/passwords_controller.rb'
  157. - 'app/controllers/settings/two_factor_authentication/webauthn_credentials_controller.rb'
  158. - 'app/lib/activitypub/activity/block.rb'
  159. - 'app/lib/request.rb'
  160. - 'app/lib/request_pool.rb'
  161. - 'app/lib/webfinger.rb'
  162. - 'app/lib/webfinger_resource.rb'
  163. - 'app/models/concerns/account/counters.rb'
  164. - 'app/models/concerns/user/ldap_authenticable.rb'
  165. - 'app/models/tag.rb'
  166. - 'app/models/user.rb'
  167. - 'app/services/fan_out_on_write_service.rb'
  168. - 'app/services/post_status_service.rb'
  169. - 'app/services/process_hashtags_service.rb'
  170. - 'app/workers/move_worker.rb'
  171. - 'app/workers/redownload_avatar_worker.rb'
  172. - 'app/workers/redownload_header_worker.rb'
  173. - 'app/workers/redownload_media_worker.rb'
  174. - 'app/workers/remote_account_refresh_worker.rb'
  175. - 'config/initializers/devise.rb'
  176. - 'lib/devise/strategies/two_factor_ldap_authenticatable.rb'
  177. - 'lib/devise/strategies/two_factor_pam_authenticatable.rb'
  178. - 'lib/mastodon/cli/accounts.rb'
  179. - 'lib/mastodon/cli/maintenance.rb'
  180. - 'lib/mastodon/cli/media.rb'
  181. - 'lib/paperclip/attachment_extensions.rb'
  182. - 'lib/tasks/repo.rake'
  183. # This cop supports safe autocorrection (--autocorrect).
  184. # Configuration parameters: EnforcedStyle.
  185. # SupportedStyles: braces, no_braces
  186. Style/HashAsLastArrayItem:
  187. Exclude:
  188. - 'app/controllers/admin/statuses_controller.rb'
  189. - 'app/controllers/api/v1/statuses_controller.rb'
  190. - 'app/models/concerns/account/counters.rb'
  191. - 'app/models/concerns/status/threading_concern.rb'
  192. - 'app/models/status.rb'
  193. - 'app/services/batched_remove_status_service.rb'
  194. - 'app/services/notify_service.rb'
  195. # This cop supports unsafe autocorrection (--autocorrect-all).
  196. Style/HashTransformValues:
  197. Exclude:
  198. - 'app/serializers/rest/web_push_subscription_serializer.rb'
  199. - 'app/services/import_service.rb'
  200. # This cop supports safe autocorrection (--autocorrect).
  201. Style/IfUnlessModifier:
  202. Exclude:
  203. - 'config/environments/production.rb'
  204. - 'config/initializers/devise.rb'
  205. - 'config/initializers/ffmpeg.rb'
  206. # This cop supports unsafe autocorrection (--autocorrect-all).
  207. Style/MapToHash:
  208. Exclude:
  209. - 'app/models/status.rb'
  210. # This cop supports unsafe autocorrection (--autocorrect-all).
  211. # Configuration parameters: EnforcedStyle.
  212. # SupportedStyles: literals, strict
  213. Style/MutableConstant:
  214. Exclude:
  215. - 'app/models/tag.rb'
  216. - 'app/services/delete_account_service.rb'
  217. - 'lib/mastodon/migration_warning.rb'
  218. # This cop supports safe autocorrection (--autocorrect).
  219. Style/NilLambda:
  220. Exclude:
  221. - 'config/initializers/paperclip.rb'
  222. # Configuration parameters: AllowedMethods.
  223. # AllowedMethods: respond_to_missing?
  224. Style/OptionalBooleanParameter:
  225. Exclude:
  226. - 'app/helpers/admin/account_moderation_notes_helper.rb'
  227. - 'app/helpers/jsonld_helper.rb'
  228. - 'app/lib/admin/system_check/message.rb'
  229. - 'app/lib/request.rb'
  230. - 'app/lib/webfinger.rb'
  231. - 'app/services/block_domain_service.rb'
  232. - 'app/services/fetch_resource_service.rb'
  233. - 'app/workers/domain_block_worker.rb'
  234. - 'app/workers/unfollow_follow_worker.rb'
  235. - 'lib/mastodon/redis_config.rb'
  236. # This cop supports safe autocorrection (--autocorrect).
  237. # Configuration parameters: PreferredDelimiters.
  238. Style/PercentLiteralDelimiters:
  239. Exclude:
  240. - 'config/deploy.rb'
  241. - 'config/initializers/doorkeeper.rb'
  242. # This cop supports unsafe autocorrection (--autocorrect-all).
  243. # Configuration parameters: EnforcedStyle.
  244. # SupportedStyles: short, verbose
  245. Style/PreferredHashMethods:
  246. Exclude:
  247. - 'config/initializers/paperclip.rb'
  248. # This cop supports safe autocorrection (--autocorrect).
  249. Style/RedundantConstantBase:
  250. Exclude:
  251. - 'config/environments/production.rb'
  252. - 'config/initializers/sidekiq.rb'
  253. # This cop supports unsafe autocorrection (--autocorrect-all).
  254. # Configuration parameters: SafeForConstants.
  255. Style/RedundantFetchBlock:
  256. Exclude:
  257. - 'config/initializers/1_hosts.rb'
  258. - 'config/initializers/chewy.rb'
  259. - 'config/initializers/devise.rb'
  260. - 'config/initializers/paperclip.rb'
  261. - 'config/puma.rb'
  262. # This cop supports unsafe autocorrection (--autocorrect-all).
  263. # Configuration parameters: ConvertCodeThatCanStartToReturnNil, AllowedMethods, MaxChainLength.
  264. # AllowedMethods: present?, blank?, presence, try, try!
  265. Style/SafeNavigation:
  266. Exclude:
  267. - 'app/models/concerns/account/finder_concern.rb'
  268. # This cop supports safe autocorrection (--autocorrect).
  269. # Configuration parameters: EnforcedStyle.
  270. # SupportedStyles: only_raise, only_fail, semantic
  271. Style/SignalException:
  272. Exclude:
  273. - 'lib/devise/strategies/two_factor_ldap_authenticatable.rb'
  274. - 'lib/devise/strategies/two_factor_pam_authenticatable.rb'
  275. # This cop supports unsafe autocorrection (--autocorrect-all).
  276. Style/SingleArgumentDig:
  277. Exclude:
  278. - 'lib/webpacker/manifest_extensions.rb'
  279. # This cop supports unsafe autocorrection (--autocorrect-all).
  280. # Configuration parameters: Mode.
  281. Style/StringConcatenation:
  282. Exclude:
  283. - 'config/initializers/paperclip.rb'
  284. # This cop supports safe autocorrection (--autocorrect).
  285. # Configuration parameters: EnforcedStyle, ConsistentQuotesInMultiline.
  286. # SupportedStyles: single_quotes, double_quotes
  287. Style/StringLiterals:
  288. Exclude:
  289. - 'config/environments/production.rb'
  290. - 'config/initializers/backtrace_silencers.rb'
  291. - 'config/initializers/http_client_proxy.rb'
  292. - 'config/initializers/rack_attack.rb'
  293. - 'config/initializers/webauthn.rb'
  294. - 'config/routes.rb'
  295. # This cop supports safe autocorrection (--autocorrect).
  296. # Configuration parameters: EnforcedStyle, AllowSafeAssignment.
  297. # SupportedStyles: require_parentheses, require_no_parentheses, require_parentheses_when_complex
  298. Style/TernaryParentheses:
  299. Exclude:
  300. - 'config/environments/development.rb'
  301. # This cop supports safe autocorrection (--autocorrect).
  302. # Configuration parameters: EnforcedStyleForMultiline.
  303. # SupportedStylesForMultiline: comma, consistent_comma, no_comma
  304. Style/TrailingCommaInArguments:
  305. Exclude:
  306. - 'config/initializers/paperclip.rb'
  307. # This cop supports safe autocorrection (--autocorrect).
  308. # Configuration parameters: EnforcedStyleForMultiline.
  309. # SupportedStylesForMultiline: comma, consistent_comma, no_comma
  310. Style/TrailingCommaInHashLiteral:
  311. Exclude:
  312. - 'config/environments/production.rb'
  313. - 'config/environments/test.rb'
  314. # This cop supports safe autocorrection (--autocorrect).
  315. # Configuration parameters: WordRegex.
  316. # SupportedStyles: percent, brackets
  317. Style/WordArray:
  318. EnforcedStyle: percent
  319. MinSize: 3