config/default.yml in rubocop-rails-2.14.2 vs config/default.yml in rubocop-rails-2.15.0

- old
+ new

@@ -58,10 +58,11 @@ SupportedStyles: - action - filter Include: - app/controllers/**/*.rb + - app/mailers/**/*.rb Rails/ActiveRecordAliases: Description: >- Avoid Active Record aliases: Use `update` instead of `update_attributes`. @@ -105,11 +106,11 @@ Include: - db/migrate/*.rb Rails/AfterCommitOverride: Description: >- - This cop enforces that there is only one call to `after_commit` + Enforces that there is only one call to `after_commit` (and its aliases - `after_create_commit`, `after_update_commit`, and `after_destroy_commit`) with the same callback name per model. Enabled: 'pending' VersionAdded: '2.8' @@ -269,11 +270,18 @@ Rails/DeprecatedActiveModelErrorsMethods: Description: 'Avoid manipulating ActiveModel errors hash directly.' Enabled: pending Safe: false VersionAdded: '2.14' + VersionChanged: '2.15' +Rails/DotSeparatedKeys: + Description: 'Enforces the use of dot-separated keys instead of `:scope` options in `I18n` translation methods.' + StyleGuide: 'https://rails.rubystyle.guide/#dot-separated-keys' + Enabled: pending + VersionAdded: '2.15' + Rails/DuplicateAssociation: Description: "Don't repeat associations in a model." Enabled: pending VersionAdded: '2.14' @@ -474,10 +482,11 @@ Reference: 'https://api.rubyonrails.org/classes/AbstractController/Callbacks/ClassMethods.html#method-i-_normalize_callback_options' Enabled: true VersionAdded: '0.63' Include: - app/controllers/**/*.rb + - app/mailers/**/*.rb Rails/IndexBy: Description: 'Prefer `index_by` over `each_with_object`, `to_h`, or `map`.' Enabled: true VersionAdded: '2.5' @@ -502,17 +511,18 @@ IgnoreScopes: false Include: - app/models/**/*.rb Rails/LexicallyScopedActionFilter: - Description: "Checks that methods specified in the filter's `only` or `except` options are explicitly defined in the controller." + Description: "Checks that methods specified in the filter's `only` or `except` options are explicitly defined in the class." StyleGuide: 'https://rails.rubystyle.guide#lexically-scoped-action-filter' Enabled: true Safe: false VersionAdded: '0.52' Include: - app/controllers/**/*.rb + - app/mailers/**/*.rb Rails/LinkToBlank: Description: 'Checks that `link_to` with a `target: "_blank"` have a `rel: "noopener"` option passed to them.' Reference: - https://mathiasbynens.github.io/rel-noopener/ @@ -688,11 +698,11 @@ Description: 'Checks for redundant receiver in `with_options`.' Enabled: true VersionAdded: '0.52' Rails/RedundantTravelBack: - Description: This cop checks for redundant `travel_back` calls. + Description: Checks for redundant `travel_back` calls. Enabled: pending VersionAdded: '2.12' Include: - spec/**/*.rb - test/**/*.rb @@ -772,10 +782,15 @@ Rails/RootJoinChain: Description: 'Use a single `#join` instead of chaining on `Rails.root` or `Rails.public_path`.' Enabled: pending VersionAdded: '2.13' +Rails/RootPublicPath: + Description: "Favor `Rails.public_path` over `Rails.root` with `'public'`." + Enabled: pending + VersionAdded: '2.15' + Rails/SafeNavigation: Description: "Use Ruby's safe navigation operator (`&.`) instead of `try!`." Enabled: true VersionAdded: '0.43' # This will convert usages of `try` to use safe navigation as well as `try!`. @@ -806,11 +821,11 @@ AllowedReceivers: [] SafeAutoCorrect: false Rails/SchemaComment: Description: >- - This cop enforces the use of the `comment` option when adding a new table or column + Enforces the use of the `comment` option when adding a new table or column to the database during a migration. Enabled: false VersionAdded: '2.13' Rails/ScopeArgs: @@ -865,13 +880,19 @@ StyleGuide: 'https://rails.rubystyle.guide/#squished-heredocs' Enabled: 'pending' VersionAdded: '2.8' VersionChanged: '2.9' # Some SQL syntax (e.g. PostgreSQL comments and functions) requires newlines - # to be preserved in order to work, thus auto-correction is not safe. + # to be preserved in order to work, thus autocorrection is not safe. SafeAutoCorrect: false +Rails/StripHeredoc: + Description: 'Enforces the use of squiggly heredoc over `strip_heredoc`.' + StyleGuide: 'https://rails.rubystyle.guide/#prefer-squiggly-heredoc' + Enabled: pending + VersionAdded: '2.15' + Rails/TableNameAssignment: Description: >- Do not use `self.table_name =`. Use Inflections or `table_name_prefix` instead. StyleGuide: 'https://rails.rubystyle.guide/#keep-ar-defaults' Enabled: false @@ -902,9 +923,19 @@ Enabled: 'pending' VersionAdded: '2.10' Include: - spec/**/*.rb - test/**/*.rb + +Rails/ToFormattedS: + Description: 'Checks for consistent uses of `to_fs` or `to_formatted_s`.' + StyleGuide: 'https://rails.rubystyle.guide/#prefer-to-fs' + Enabled: pending + EnforcedStyle: to_fs + SupportedStyles: + - to_fs + - to_formatted_s + VersionAdded: '2.15' Rails/TransactionExitStatement: Description: 'Avoid the usage of `return`, `break` and `throw` in transaction blocks.' Enabled: pending VersionAdded: '2.14'