Skip to content

Commit

Permalink
Cut 2.21.0
Browse files Browse the repository at this point in the history
  • Loading branch information
koic committed Sep 9, 2023
1 parent dfa9ccc commit 1e8df6f
Show file tree
Hide file tree
Showing 7 changed files with 267 additions and 28 deletions.
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,8 @@

## master (unreleased)

## 2.21.0 (2023-09-09)

### New features

* [#1075](https://github.com/rubocop/rubocop-rails/issues/1075): Add new `Rails/SelectMap` cop that checks for uses of `select(:column_name)` with `map(&:column_name)`. ([@koic][])
Expand Down
12 changes: 6 additions & 6 deletions config/default.yml
Original file line number Diff line number Diff line change
Expand Up @@ -313,7 +313,7 @@ Rails/DangerousColumnNames:
Avoid dangerous column names.
Enabled: pending
Severity: warning
VersionAdded: '<<next>>'
VersionAdded: '2.21'
Include:
- 'db/**/*.rb'

Expand Down Expand Up @@ -484,7 +484,7 @@ Rails/FindBy:
StyleGuide: 'https://rails.rubystyle.guide#find_by'
Enabled: true
VersionAdded: '0.30'
VersionChanged: '<<next>>'
VersionChanged: '2.21'
IgnoreWhereFirst: true

Rails/FindById:
Expand All @@ -501,7 +501,7 @@ Rails/FindEach:
Enabled: true
Safe: false
VersionAdded: '0.30'
VersionChanged: '<<next>>'
VersionChanged: '2.21'
AllowedMethods:
# Methods that don't work well with `find_each`.
- order
Expand Down Expand Up @@ -801,7 +801,7 @@ Rails/RedundantActiveRecordAllMethod:
StyleGuide: 'https://rails.rubystyle.guide/#redundant-all'
Enabled: pending
Safe: false
VersionAdded: "<<next>>"
VersionAdded: '2.21'

Rails/RedundantAllowNil:
Description: >-
Expand Down Expand Up @@ -987,7 +987,7 @@ Rails/SelectMap:
Description: 'Checks for uses of `select(:column_name)` with `map(&:column_name)`.'
Enabled: pending
Safe: false
VersionAdded: '<<next>>'
VersionAdded: '2.21'

Rails/ShortI18n:
Description: 'Use the short form of the I18n methods: `t` instead of `translate` and `l` instead of `localize`.'
Expand Down Expand Up @@ -1159,7 +1159,7 @@ Rails/UnusedRenderContent:
Description: 'Do not specify body content for a response with a non-content status code.'
Enabled: pending
Severity: warning
VersionAdded: '<<next>>'
VersionAdded: '2.21'

Rails/Validation:
Description: 'Use validates :attribute, hash of validations.'
Expand Down
2 changes: 1 addition & 1 deletion docs/antora.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,6 @@ name: rubocop-rails
title: RuboCop Rails
# We always provide version without patch here (e.g. 1.1),
# as patch versions should not appear in the docs.
version: ~
version: '2.21'
nav:
- modules/ROOT/nav.adoc
4 changes: 4 additions & 0 deletions docs/modules/ROOT/pages/cops.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@ based on the https://rails.rubystyle.guide/[Rails Style Guide].
* xref:cops_rails.adoc#railscompactblank[Rails/CompactBlank]
* xref:cops_rails.adoc#railscontenttag[Rails/ContentTag]
* xref:cops_rails.adoc#railscreatetablewithtimestamps[Rails/CreateTableWithTimestamps]
* xref:cops_rails.adoc#railsdangerouscolumnnames[Rails/DangerousColumnNames]
* xref:cops_rails.adoc#railsdate[Rails/Date]
* xref:cops_rails.adoc#railsdefaultscope[Rails/DefaultScope]
* xref:cops_rails.adoc#railsdelegate[Rails/Delegate]
Expand Down Expand Up @@ -95,6 +96,7 @@ based on the https://rails.rubystyle.guide/[Rails Style Guide].
* xref:cops_rails.adoc#railspresent[Rails/Present]
* xref:cops_rails.adoc#railsrakeenvironment[Rails/RakeEnvironment]
* xref:cops_rails.adoc#railsreadwriteattribute[Rails/ReadWriteAttribute]
* xref:cops_rails.adoc#railsredundantactiverecordallmethod[Rails/RedundantActiveRecordAllMethod]
* xref:cops_rails.adoc#railsredundantallownil[Rails/RedundantAllowNil]
* xref:cops_rails.adoc#railsredundantforeignkey[Rails/RedundantForeignKey]
* xref:cops_rails.adoc#railsredundantpresencevalidationonbelongsto[Rails/RedundantPresenceValidationOnBelongsTo]
Expand All @@ -118,6 +120,7 @@ based on the https://rails.rubystyle.guide/[Rails Style Guide].
* xref:cops_rails.adoc#railssavebang[Rails/SaveBang]
* xref:cops_rails.adoc#railsschemacomment[Rails/SchemaComment]
* xref:cops_rails.adoc#railsscopeargs[Rails/ScopeArgs]
* xref:cops_rails.adoc#railsselectmap[Rails/SelectMap]
* xref:cops_rails.adoc#railsshorti18n[Rails/ShortI18n]
* xref:cops_rails.adoc#railsskipsmodelvalidations[Rails/SkipsModelValidations]
* xref:cops_rails.adoc#railssquishedsqlheredocs[Rails/SquishedSQLHeredocs]
Expand All @@ -134,6 +137,7 @@ based on the https://rails.rubystyle.guide/[Rails Style Guide].
* xref:cops_rails.adoc#railsuniquevalidationwithoutindex[Rails/UniqueValidationWithoutIndex]
* xref:cops_rails.adoc#railsunknownenv[Rails/UnknownEnv]
* xref:cops_rails.adoc#railsunusedignoredcolumns[Rails/UnusedIgnoredColumns]
* xref:cops_rails.adoc#railsunusedrendercontent[Rails/UnusedRenderContent]
* xref:cops_rails.adoc#railsvalidation[Rails/Validation]
* xref:cops_rails.adoc#railswhereequals[Rails/WhereEquals]
* xref:cops_rails.adoc#railswhereexists[Rails/WhereExists]
Expand Down
Loading

0 comments on commit 1e8df6f

Please sign in to comment.