rubocop-rails.yml in gitlab-styles-10.0.0 vs rubocop-rails.yml in gitlab-styles-10.1.0

- old
+ new

@@ -138,11 +138,11 @@ - 'lib/tasks/**/*' # This cop checks for the use of output safety calls like html_safe and # raw. Rails/OutputSafety: - Enabled: false + Enabled: true # Enforces the use of pluck over map. # https://docs.rubocop.org/rubocop-rails/2.8/cops_rails.html#railspluck Rails/Pluck: Enabled: true @@ -193,9 +193,16 @@ Enabled: true # This cop checks for the use of Time methods without zone. Rails/TimeZone: Enabled: false + +# Checks for the use of exit statements (namely return, break and throw) in +# transactions. This is due to the eventual unexpected behavior when using +# ActiveRecord >= 7, where transactions exited using these statements are being +# rollbacked rather than committed (pre ActiveRecord 7 behavior). +Rails/TransactionExitStatement: + Enabled: true # This cop checks for the use of old-style attribute validation macros. Rails/Validation: Enabled: true