.rubocop_todo.yml 9.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298
  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.60.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. Lint/NonLocalExitFromIterator:
  15. Exclude:
  16. - 'app/helpers/jsonld_helper.rb'
  17. # Configuration parameters: AllowedMethods, AllowedPatterns, CountRepeatedAttributes.
  18. Metrics/AbcSize:
  19. Max: 82
  20. # Configuration parameters: CountBlocks, Max.
  21. Metrics/BlockNesting:
  22. Exclude:
  23. - 'lib/tasks/mastodon.rake'
  24. # Configuration parameters: AllowedMethods, AllowedPatterns.
  25. Metrics/CyclomaticComplexity:
  26. Max: 25
  27. # Configuration parameters: AllowedMethods, AllowedPatterns.
  28. Metrics/PerceivedComplexity:
  29. Max: 27
  30. # Configuration parameters: CountAsOne.
  31. RSpec/ExampleLength:
  32. Max: 20 # Override default of 5
  33. RSpec/MultipleExpectations:
  34. Max: 7
  35. # Configuration parameters: AllowSubject.
  36. RSpec/MultipleMemoizedHelpers:
  37. Max: 17
  38. # Configuration parameters: AllowedGroups.
  39. RSpec/NestedGroups:
  40. Max: 6
  41. # Configuration parameters: Include.
  42. # Include: app/models/**/*.rb
  43. Rails/HasAndBelongsToMany:
  44. Exclude:
  45. - 'app/models/concerns/account/associations.rb'
  46. - 'app/models/status.rb'
  47. - 'app/models/tag.rb'
  48. Rails/OutputSafety:
  49. Exclude:
  50. - 'config/initializers/simple_form.rb'
  51. # Configuration parameters: Include.
  52. # Include: app/models/**/*.rb
  53. Rails/UniqueValidationWithoutIndex:
  54. Exclude:
  55. - 'app/models/account_alias.rb'
  56. - 'app/models/custom_filter_status.rb'
  57. - 'app/models/identity.rb'
  58. - 'app/models/webauthn_credential.rb'
  59. # This cop supports unsafe autocorrection (--autocorrect-all).
  60. # Configuration parameters: AllowedMethods, AllowedPatterns.
  61. # AllowedMethods: ==, equal?, eql?
  62. Style/ClassEqualityComparison:
  63. Exclude:
  64. - 'app/helpers/jsonld_helper.rb'
  65. - 'app/serializers/activitypub/outbox_serializer.rb'
  66. Style/ClassVars:
  67. Exclude:
  68. - 'config/initializers/devise.rb'
  69. # This cop supports safe autocorrection (--autocorrect).
  70. # Configuration parameters: AllowedVars.
  71. Style/FetchEnvVar:
  72. Exclude:
  73. - 'app/lib/redis_configuration.rb'
  74. - 'app/lib/translation_service.rb'
  75. - 'config/environments/development.rb'
  76. - 'config/environments/production.rb'
  77. - 'config/initializers/2_limited_federation_mode.rb'
  78. - 'config/initializers/3_omniauth.rb'
  79. - 'config/initializers/blacklists.rb'
  80. - 'config/initializers/cache_buster.rb'
  81. - 'config/initializers/devise.rb'
  82. - 'config/initializers/paperclip.rb'
  83. - 'config/initializers/vapid.rb'
  84. - 'lib/mastodon/redis_config.rb'
  85. - 'lib/premailer_webpack_strategy.rb'
  86. - 'lib/tasks/repo.rake'
  87. - 'spec/features/profile_spec.rb'
  88. # This cop supports safe autocorrection (--autocorrect).
  89. # Configuration parameters: EnforcedStyle, MaxUnannotatedPlaceholdersAllowed, AllowedMethods, AllowedPatterns.
  90. # SupportedStyles: annotated, template, unannotated
  91. # AllowedMethods: redirect
  92. Style/FormatStringToken:
  93. Exclude:
  94. - 'config/initializers/devise.rb'
  95. - 'lib/paperclip/color_extractor.rb'
  96. # This cop supports unsafe autocorrection (--autocorrect-all).
  97. Style/GlobalStdStream:
  98. Exclude:
  99. - 'config/environments/development.rb'
  100. - 'config/environments/production.rb'
  101. # This cop supports safe autocorrection (--autocorrect).
  102. # Configuration parameters: MinBodyLength, AllowConsecutiveConditionals.
  103. Style/GuardClause:
  104. Exclude:
  105. - 'app/lib/activitypub/activity/block.rb'
  106. - 'app/lib/request.rb'
  107. - 'app/lib/request_pool.rb'
  108. - 'app/lib/webfinger.rb'
  109. - 'app/lib/webfinger_resource.rb'
  110. - 'app/models/concerns/account/counters.rb'
  111. - 'app/models/concerns/user/ldap_authenticable.rb'
  112. - 'app/models/tag.rb'
  113. - 'app/models/user.rb'
  114. - 'app/services/fan_out_on_write_service.rb'
  115. - 'app/services/post_status_service.rb'
  116. - 'app/services/process_hashtags_service.rb'
  117. - 'app/workers/move_worker.rb'
  118. - 'app/workers/redownload_avatar_worker.rb'
  119. - 'app/workers/redownload_header_worker.rb'
  120. - 'app/workers/redownload_media_worker.rb'
  121. - 'app/workers/remote_account_refresh_worker.rb'
  122. - 'config/initializers/devise.rb'
  123. - 'lib/devise/strategies/two_factor_ldap_authenticatable.rb'
  124. - 'lib/devise/strategies/two_factor_pam_authenticatable.rb'
  125. - 'lib/mastodon/cli/accounts.rb'
  126. - 'lib/mastodon/cli/maintenance.rb'
  127. - 'lib/mastodon/cli/media.rb'
  128. - 'lib/paperclip/attachment_extensions.rb'
  129. - 'lib/tasks/repo.rake'
  130. # This cop supports safe autocorrection (--autocorrect).
  131. # Configuration parameters: EnforcedStyle.
  132. # SupportedStyles: braces, no_braces
  133. Style/HashAsLastArrayItem:
  134. Exclude:
  135. - 'app/controllers/admin/statuses_controller.rb'
  136. - 'app/controllers/api/v1/statuses_controller.rb'
  137. - 'app/models/concerns/account/counters.rb'
  138. - 'app/models/concerns/status/threading_concern.rb'
  139. - 'app/models/status.rb'
  140. - 'app/services/batched_remove_status_service.rb'
  141. - 'app/services/notify_service.rb'
  142. # This cop supports unsafe autocorrection (--autocorrect-all).
  143. Style/HashTransformValues:
  144. Exclude:
  145. - 'app/serializers/rest/web_push_subscription_serializer.rb'
  146. - 'app/services/import_service.rb'
  147. # This cop supports safe autocorrection (--autocorrect).
  148. Style/IfUnlessModifier:
  149. Exclude:
  150. - 'config/environments/production.rb'
  151. - 'config/initializers/devise.rb'
  152. - 'config/initializers/ffmpeg.rb'
  153. # This cop supports unsafe autocorrection (--autocorrect-all).
  154. Style/MapToHash:
  155. Exclude:
  156. - 'app/models/status.rb'
  157. # This cop supports unsafe autocorrection (--autocorrect-all).
  158. # Configuration parameters: EnforcedStyle.
  159. # SupportedStyles: literals, strict
  160. Style/MutableConstant:
  161. Exclude:
  162. - 'app/models/tag.rb'
  163. - 'app/services/delete_account_service.rb'
  164. - 'lib/mastodon/migration_warning.rb'
  165. # This cop supports safe autocorrection (--autocorrect).
  166. Style/NilLambda:
  167. Exclude:
  168. - 'config/initializers/paperclip.rb'
  169. # Configuration parameters: AllowedMethods.
  170. # AllowedMethods: respond_to_missing?
  171. Style/OptionalBooleanParameter:
  172. Exclude:
  173. - 'app/helpers/admin/account_moderation_notes_helper.rb'
  174. - 'app/helpers/jsonld_helper.rb'
  175. - 'app/lib/admin/system_check/message.rb'
  176. - 'app/lib/request.rb'
  177. - 'app/lib/webfinger.rb'
  178. - 'app/services/block_domain_service.rb'
  179. - 'app/services/fetch_resource_service.rb'
  180. - 'app/workers/domain_block_worker.rb'
  181. - 'app/workers/unfollow_follow_worker.rb'
  182. - 'lib/mastodon/redis_config.rb'
  183. # This cop supports safe autocorrection (--autocorrect).
  184. # Configuration parameters: PreferredDelimiters.
  185. Style/PercentLiteralDelimiters:
  186. Exclude:
  187. - 'config/deploy.rb'
  188. - 'config/initializers/doorkeeper.rb'
  189. # This cop supports unsafe autocorrection (--autocorrect-all).
  190. # Configuration parameters: EnforcedStyle.
  191. # SupportedStyles: short, verbose
  192. Style/PreferredHashMethods:
  193. Exclude:
  194. - 'config/initializers/paperclip.rb'
  195. # This cop supports safe autocorrection (--autocorrect).
  196. Style/RedundantConstantBase:
  197. Exclude:
  198. - 'config/environments/production.rb'
  199. - 'config/initializers/sidekiq.rb'
  200. # This cop supports unsafe autocorrection (--autocorrect-all).
  201. # Configuration parameters: SafeForConstants.
  202. Style/RedundantFetchBlock:
  203. Exclude:
  204. - 'config/initializers/1_hosts.rb'
  205. - 'config/initializers/chewy.rb'
  206. - 'config/initializers/devise.rb'
  207. - 'config/initializers/paperclip.rb'
  208. - 'config/puma.rb'
  209. # This cop supports unsafe autocorrection (--autocorrect-all).
  210. # Configuration parameters: ConvertCodeThatCanStartToReturnNil, AllowedMethods, MaxChainLength.
  211. # AllowedMethods: present?, blank?, presence, try, try!
  212. Style/SafeNavigation:
  213. Exclude:
  214. - 'app/models/concerns/account/finder_concern.rb'
  215. # This cop supports safe autocorrection (--autocorrect).
  216. # Configuration parameters: EnforcedStyle.
  217. # SupportedStyles: only_raise, only_fail, semantic
  218. Style/SignalException:
  219. Exclude:
  220. - 'lib/devise/strategies/two_factor_ldap_authenticatable.rb'
  221. - 'lib/devise/strategies/two_factor_pam_authenticatable.rb'
  222. # This cop supports unsafe autocorrection (--autocorrect-all).
  223. Style/SingleArgumentDig:
  224. Exclude:
  225. - 'lib/webpacker/manifest_extensions.rb'
  226. # This cop supports unsafe autocorrection (--autocorrect-all).
  227. # Configuration parameters: Mode.
  228. Style/StringConcatenation:
  229. Exclude:
  230. - 'config/initializers/paperclip.rb'
  231. # This cop supports safe autocorrection (--autocorrect).
  232. # Configuration parameters: EnforcedStyle, ConsistentQuotesInMultiline.
  233. # SupportedStyles: single_quotes, double_quotes
  234. Style/StringLiterals:
  235. Exclude:
  236. - 'config/environments/production.rb'
  237. - 'config/initializers/backtrace_silencers.rb'
  238. - 'config/initializers/http_client_proxy.rb'
  239. - 'config/initializers/rack_attack.rb'
  240. - 'config/initializers/webauthn.rb'
  241. - 'config/routes.rb'
  242. # This cop supports safe autocorrection (--autocorrect).
  243. # Configuration parameters: EnforcedStyleForMultiline.
  244. # SupportedStylesForMultiline: comma, consistent_comma, no_comma
  245. Style/TrailingCommaInArguments:
  246. Exclude:
  247. - 'config/initializers/paperclip.rb'
  248. # This cop supports safe autocorrection (--autocorrect).
  249. # Configuration parameters: EnforcedStyleForMultiline.
  250. # SupportedStylesForMultiline: comma, consistent_comma, no_comma
  251. Style/TrailingCommaInHashLiteral:
  252. Exclude:
  253. - 'config/environments/production.rb'
  254. - 'config/environments/test.rb'
  255. # This cop supports safe autocorrection (--autocorrect).
  256. # Configuration parameters: WordRegex.
  257. # SupportedStyles: percent, brackets
  258. Style/WordArray:
  259. EnforcedStyle: percent
  260. MinSize: 3