.rubocop_todo.yml 9.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290
  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.62.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. 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: 18
  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/production.rb'
  76. - 'config/initializers/2_limited_federation_mode.rb'
  77. - 'config/initializers/3_omniauth.rb'
  78. - 'config/initializers/blacklists.rb'
  79. - 'config/initializers/cache_buster.rb'
  80. - 'config/initializers/devise.rb'
  81. - 'config/initializers/paperclip.rb'
  82. - 'config/initializers/vapid.rb'
  83. - 'lib/mastodon/redis_config.rb'
  84. - 'lib/tasks/repo.rake'
  85. - 'spec/features/profile_spec.rb'
  86. # This cop supports safe autocorrection (--autocorrect).
  87. # Configuration parameters: EnforcedStyle, MaxUnannotatedPlaceholdersAllowed, AllowedMethods, AllowedPatterns.
  88. # SupportedStyles: annotated, template, unannotated
  89. # AllowedMethods: redirect
  90. Style/FormatStringToken:
  91. Exclude:
  92. - 'config/initializers/devise.rb'
  93. - 'lib/paperclip/color_extractor.rb'
  94. # This cop supports unsafe autocorrection (--autocorrect-all).
  95. Style/GlobalStdStream:
  96. Exclude:
  97. - 'config/environments/development.rb'
  98. - 'config/environments/production.rb'
  99. # This cop supports safe autocorrection (--autocorrect).
  100. # Configuration parameters: MinBodyLength, AllowConsecutiveConditionals.
  101. Style/GuardClause:
  102. Exclude:
  103. - 'app/lib/activitypub/activity/block.rb'
  104. - 'app/lib/request.rb'
  105. - 'app/lib/request_pool.rb'
  106. - 'app/lib/webfinger.rb'
  107. - 'app/lib/webfinger_resource.rb'
  108. - 'app/models/concerns/account/counters.rb'
  109. - 'app/models/concerns/user/ldap_authenticable.rb'
  110. - 'app/models/tag.rb'
  111. - 'app/models/user.rb'
  112. - 'app/services/fan_out_on_write_service.rb'
  113. - 'app/services/post_status_service.rb'
  114. - 'app/services/process_hashtags_service.rb'
  115. - 'app/workers/move_worker.rb'
  116. - 'app/workers/redownload_avatar_worker.rb'
  117. - 'app/workers/redownload_header_worker.rb'
  118. - 'app/workers/redownload_media_worker.rb'
  119. - 'app/workers/remote_account_refresh_worker.rb'
  120. - 'config/initializers/devise.rb'
  121. - 'lib/devise/strategies/two_factor_ldap_authenticatable.rb'
  122. - 'lib/devise/strategies/two_factor_pam_authenticatable.rb'
  123. - 'lib/mastodon/cli/accounts.rb'
  124. - 'lib/mastodon/cli/maintenance.rb'
  125. - 'lib/mastodon/cli/media.rb'
  126. - 'lib/tasks/repo.rake'
  127. # This cop supports safe autocorrection (--autocorrect).
  128. # Configuration parameters: EnforcedStyle.
  129. # SupportedStyles: braces, no_braces
  130. Style/HashAsLastArrayItem:
  131. Exclude:
  132. - 'app/controllers/admin/statuses_controller.rb'
  133. - 'app/controllers/api/v1/statuses_controller.rb'
  134. - 'app/models/concerns/account/counters.rb'
  135. - 'app/models/concerns/status/threading_concern.rb'
  136. - 'app/models/status.rb'
  137. - 'app/services/batched_remove_status_service.rb'
  138. - 'app/services/notify_service.rb'
  139. # This cop supports unsafe autocorrection (--autocorrect-all).
  140. Style/HashTransformValues:
  141. Exclude:
  142. - 'app/serializers/rest/web_push_subscription_serializer.rb'
  143. - 'app/services/import_service.rb'
  144. # This cop supports safe autocorrection (--autocorrect).
  145. Style/IfUnlessModifier:
  146. Exclude:
  147. - 'config/environments/production.rb'
  148. - 'config/initializers/devise.rb'
  149. - 'config/initializers/ffmpeg.rb'
  150. # This cop supports unsafe autocorrection (--autocorrect-all).
  151. Style/MapToHash:
  152. Exclude:
  153. - 'app/models/status.rb'
  154. # This cop supports unsafe autocorrection (--autocorrect-all).
  155. # Configuration parameters: EnforcedStyle.
  156. # SupportedStyles: literals, strict
  157. Style/MutableConstant:
  158. Exclude:
  159. - 'app/models/tag.rb'
  160. - 'app/services/delete_account_service.rb'
  161. - 'lib/mastodon/migration_warning.rb'
  162. # This cop supports safe autocorrection (--autocorrect).
  163. Style/NilLambda:
  164. Exclude:
  165. - 'config/initializers/paperclip.rb'
  166. # Configuration parameters: AllowedMethods.
  167. # AllowedMethods: respond_to_missing?
  168. Style/OptionalBooleanParameter:
  169. Exclude:
  170. - 'app/helpers/admin/account_moderation_notes_helper.rb'
  171. - 'app/helpers/jsonld_helper.rb'
  172. - 'app/lib/admin/system_check/message.rb'
  173. - 'app/lib/request.rb'
  174. - 'app/lib/webfinger.rb'
  175. - 'app/services/block_domain_service.rb'
  176. - 'app/services/fetch_resource_service.rb'
  177. - 'app/workers/domain_block_worker.rb'
  178. - 'app/workers/unfollow_follow_worker.rb'
  179. - 'lib/mastodon/redis_config.rb'
  180. # This cop supports safe autocorrection (--autocorrect).
  181. # Configuration parameters: PreferredDelimiters.
  182. Style/PercentLiteralDelimiters:
  183. Exclude:
  184. - 'config/deploy.rb'
  185. - 'config/initializers/doorkeeper.rb'
  186. # This cop supports unsafe autocorrection (--autocorrect-all).
  187. # Configuration parameters: EnforcedStyle.
  188. # SupportedStyles: short, verbose
  189. Style/PreferredHashMethods:
  190. Exclude:
  191. - 'config/initializers/paperclip.rb'
  192. # This cop supports safe autocorrection (--autocorrect).
  193. Style/RedundantConstantBase:
  194. Exclude:
  195. - 'config/environments/production.rb'
  196. - 'config/initializers/sidekiq.rb'
  197. # This cop supports unsafe autocorrection (--autocorrect-all).
  198. # Configuration parameters: SafeForConstants.
  199. Style/RedundantFetchBlock:
  200. Exclude:
  201. - 'config/initializers/1_hosts.rb'
  202. - 'config/initializers/chewy.rb'
  203. - 'config/initializers/devise.rb'
  204. - 'config/initializers/paperclip.rb'
  205. - 'config/puma.rb'
  206. # This cop supports unsafe autocorrection (--autocorrect-all).
  207. # Configuration parameters: ConvertCodeThatCanStartToReturnNil, AllowedMethods, MaxChainLength.
  208. # AllowedMethods: present?, blank?, presence, try, try!
  209. Style/SafeNavigation:
  210. Exclude:
  211. - 'app/models/concerns/account/finder_concern.rb'
  212. # This cop supports safe autocorrection (--autocorrect).
  213. # Configuration parameters: EnforcedStyle.
  214. # SupportedStyles: only_raise, only_fail, semantic
  215. Style/SignalException:
  216. Exclude:
  217. - 'lib/devise/strategies/two_factor_ldap_authenticatable.rb'
  218. - 'lib/devise/strategies/two_factor_pam_authenticatable.rb'
  219. # This cop supports unsafe autocorrection (--autocorrect-all).
  220. # Configuration parameters: Mode.
  221. Style/StringConcatenation:
  222. Exclude:
  223. - 'config/initializers/paperclip.rb'
  224. # This cop supports safe autocorrection (--autocorrect).
  225. # Configuration parameters: EnforcedStyle, ConsistentQuotesInMultiline.
  226. # SupportedStyles: single_quotes, double_quotes
  227. Style/StringLiterals:
  228. Exclude:
  229. - 'config/environments/production.rb'
  230. - 'config/initializers/backtrace_silencers.rb'
  231. - 'config/initializers/http_client_proxy.rb'
  232. - 'config/initializers/rack_attack.rb'
  233. - 'config/initializers/webauthn.rb'
  234. - 'config/routes.rb'
  235. # This cop supports safe autocorrection (--autocorrect).
  236. # Configuration parameters: EnforcedStyleForMultiline.
  237. # SupportedStylesForMultiline: comma, consistent_comma, no_comma
  238. Style/TrailingCommaInArguments:
  239. Exclude:
  240. - 'config/initializers/paperclip.rb'
  241. # This cop supports safe autocorrection (--autocorrect).
  242. # Configuration parameters: EnforcedStyleForMultiline.
  243. # SupportedStylesForMultiline: comma, consistent_comma, no_comma
  244. Style/TrailingCommaInHashLiteral:
  245. Exclude:
  246. - 'config/environments/production.rb'
  247. - 'config/environments/test.rb'
  248. # This cop supports safe autocorrection (--autocorrect).
  249. # Configuration parameters: WordRegex.
  250. # SupportedStyles: percent, brackets
  251. Style/WordArray:
  252. EnforcedStyle: percent
  253. MinSize: 3