Skip to content

Commit

Permalink
Cut 1.22.0
Browse files Browse the repository at this point in the history
  • Loading branch information
bbatsov committed Sep 29, 2021
1 parent 2c9664d commit 1bdcf65
Show file tree
Hide file tree
Showing 19 changed files with 1,411 additions and 610 deletions.
2 changes: 1 addition & 1 deletion .github/ISSUE_TEMPLATE/bug_report.md
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ output by `rubocop -V`, include them as well. Here's an example:

```
$ [bundle exec] rubocop -V
1.21.0 (using Parser 2.7.2.0, rubocop-ast 1.1.1, running on ruby 2.7.2 x86_64-linux)
1.22.0 (using Parser 2.7.2.0, rubocop-ast 1.1.1, running on ruby 2.7.2 x86_64-linux)
- rubocop-performance 1.9.1
- rubocop-rspec 2.0.0
```
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@

## master (unreleased)

## 1.22.0 (2021-09-29)

### New features

* [#10111](https://github.com/rubocop/rubocop/pull/10111): Add new `Style/NumberedParametersLimit` cop. ([@dvandersluis][])
Expand Down
2 changes: 1 addition & 1 deletion CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ do so.

```
$ rubocop -V
1.21.0 (using Parser 2.7.2.0, rubocop-ast 1.1.1, running on ruby 2.7.2 x86_64-linux)
1.22.0 (using Parser 2.7.2.0, rubocop-ast 1.1.1, running on ruby 2.7.2 x86_64-linux)
- rubocop-performance 1.9.1
- rubocop-rspec 2.0.0
```
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ To prevent an unwanted RuboCop update you might want to use a conservative versi
in your `Gemfile`:

```rb
gem 'rubocop', '~> 1.21', require: false
gem 'rubocop', '~> 1.22', require: false
```

See [our versioning policy](https://docs.rubocop.org/rubocop/versioning.html) for further details.
Expand Down
16 changes: 8 additions & 8 deletions config/default.yml
Original file line number Diff line number Diff line change
Expand Up @@ -1361,7 +1361,7 @@ Layout/SpaceInsideParens:
StyleGuide: '#spaces-braces'
Enabled: true
VersionAdded: '0.49'
VersionChanged: '<<next>>'
VersionChanged: '1.22'
EnforcedStyle: no_space
SupportedStyles:
- space
Expand Down Expand Up @@ -1495,7 +1495,7 @@ Lint/BooleanSymbol:
Enabled: true
SafeAutoCorrect: false
VersionAdded: '0.50'
VersionChanged: '<<next>>'
VersionChanged: '1.22'

Lint/CircularArgumentReference:
Description: "Default values in optional keyword arguments and optional ordinal arguments should not refer back to the name of the argument."
Expand Down Expand Up @@ -2050,7 +2050,7 @@ Lint/RequireParentheses:
Lint/RequireRelativeSelfPath:
Description: 'Checks for uses a file requiring itself with `require_relative`.'
Enabled: pending
VersionAdded: '<<next>>'
VersionAdded: '1.22'

Lint/RescueException:
Description: 'Avoid rescuing the Exception class.'
Expand Down Expand Up @@ -2745,7 +2745,7 @@ Security/IoMethods:
`IO.foreach`, and `IO.readlines`.
Enabled: pending
Safe: false
VersionAdded: '<<next>>'
VersionAdded: '1.22'

Security/JSONLoad:
Description: >-
Expand Down Expand Up @@ -4147,7 +4147,7 @@ Style/Not:
Style/NumberedParameters:
Description: 'Restrict the usage of numbered parameters.'
Enabled: pending
VersionAdded: '<<next>>'
VersionAdded: '1.22'
EnforcedStyle: allow_single_line
SupportedStyles:
- allow_single_line
Expand All @@ -4156,7 +4156,7 @@ Style/NumberedParameters:
Style/NumberedParametersLimit:
Description: 'Avoid excessive numbered params in a single block.'
Enabled: pending
VersionAdded: '<<next>>'
VersionAdded: '1.22'
Max: 1

Style/NumericLiteralPrefix:
Expand Down Expand Up @@ -4489,7 +4489,7 @@ Style/RedundantSort:
`max_by` instead of `sort_by...last`, etc.
Enabled: true
VersionAdded: '0.76'
VersionChanged: <<next>>
VersionChanged: '1.22'
Safe: false

Style/RedundantSortBy:
Expand Down Expand Up @@ -4575,7 +4575,7 @@ Style/SelectByRegexp:
Description: 'Prefer grep/grep_v to select/reject with a regexp match.'
Enabled: pending
SafeAutoCorrect: false
VersionAdded: '<<next>>'
VersionAdded: '1.22'

Style/SelfAssignment:
Description: >-
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
title: RuboCop
# We always provide version without patch here (e.g. 1.1),
# as patch versions should not appear in the docs.
version: 'master'
version: '1.22'
nav:
- modules/ROOT/nav.adoc
5 changes: 5 additions & 0 deletions docs/modules/ROOT/pages/cops.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -275,6 +275,7 @@ In the following section you find all available cops:
* xref:cops_lint.adoc#lintredundantwithobject[Lint/RedundantWithObject]
* xref:cops_lint.adoc#lintregexpascondition[Lint/RegexpAsCondition]
* xref:cops_lint.adoc#lintrequireparentheses[Lint/RequireParentheses]
* xref:cops_lint.adoc#lintrequirerelativeselfpath[Lint/RequireRelativeSelfPath]
* xref:cops_lint.adoc#lintrescueexception[Lint/RescueException]
* xref:cops_lint.adoc#lintrescuetype[Lint/RescueType]
* xref:cops_lint.adoc#lintreturninvoidcontext[Lint/ReturnInVoidContext]
Expand Down Expand Up @@ -353,6 +354,7 @@ In the following section you find all available cops:
=== Department xref:cops_security.adoc[Security]

* xref:cops_security.adoc#securityeval[Security/Eval]
* xref:cops_security.adoc#securityiomethods[Security/IoMethods]
* xref:cops_security.adoc#securityjsonload[Security/JSONLoad]
* xref:cops_security.adoc#securitymarshalload[Security/MarshalLoad]
* xref:cops_security.adoc#securityopen[Security/Open]
Expand Down Expand Up @@ -484,6 +486,8 @@ In the following section you find all available cops:
* xref:cops_style.adoc#stylenillambda[Style/NilLambda]
* xref:cops_style.adoc#stylenonnilcheck[Style/NonNilCheck]
* xref:cops_style.adoc#stylenot[Style/Not]
* xref:cops_style.adoc#stylenumberedparameters[Style/NumberedParameters]
* xref:cops_style.adoc#stylenumberedparameterslimit[Style/NumberedParametersLimit]
* xref:cops_style.adoc#stylenumericliteralprefix[Style/NumericLiteralPrefix]
* xref:cops_style.adoc#stylenumericliterals[Style/NumericLiterals]
* xref:cops_style.adoc#stylenumericpredicate[Style/NumericPredicate]
Expand Down Expand Up @@ -529,6 +533,7 @@ In the following section you find all available cops:
* xref:cops_style.adoc#stylereturnnil[Style/ReturnNil]
* xref:cops_style.adoc#stylesafenavigation[Style/SafeNavigation]
* xref:cops_style.adoc#stylesample[Style/Sample]
* xref:cops_style.adoc#styleselectbyregexp[Style/SelectByRegexp]
* xref:cops_style.adoc#styleselfassignment[Style/SelfAssignment]
* xref:cops_style.adoc#stylesemicolon[Style/Semicolon]
* xref:cops_style.adoc#stylesend[Style/Send]
Expand Down
34 changes: 28 additions & 6 deletions docs/modules/ROOT/pages/cops_bundler.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
== Bundler/DuplicatedGem

|===
| Enabled by default | Safe | Supports autocorrection | VersionAdded | VersionChanged
| Enabled by default | Safe | Supports autocorrection | Version Added | Version Changed

| Enabled
| Yes
Expand Down Expand Up @@ -62,7 +62,7 @@ end
== Bundler/GemComment

|===
| Enabled by default | Safe | Supports autocorrection | VersionAdded | VersionChanged
| Enabled by default | Safe | Supports autocorrection | Version Added | Version Changed

| Disabled
| Yes
Expand Down Expand Up @@ -187,7 +187,7 @@ gem 'bar', '< 2.1'
== Bundler/GemFilename

|===
| Enabled by default | Safe | Supports autocorrection | VersionAdded | VersionChanged
| Enabled by default | Safe | Supports autocorrection | Version Added | Version Changed

| Enabled
| Yes
Expand Down Expand Up @@ -246,7 +246,7 @@ Project contains gems.rb and gems.locked files
== Bundler/GemVersion

|===
| Enabled by default | Safe | Supports autocorrection | VersionAdded | VersionChanged
| Enabled by default | Safe | Supports autocorrection | Version Added | Version Changed

| Disabled
| Yes
Expand Down Expand Up @@ -333,7 +333,7 @@ gem 'rubocop', tag: 'v1.17.0'
== Bundler/InsecureProtocolSource

|===
| Enabled by default | Safe | Supports autocorrection | VersionAdded | VersionChanged
| Enabled by default | Safe | Supports autocorrection | Version Added | Version Changed

| Enabled
| Yes
Expand All @@ -355,6 +355,9 @@ internal gem server via an intranet, or where HTTPS is prohibited.
However, you should strongly prefer `https://` where possible, as it is
more secure.

If you don't allow `http://`, please set `false` to `AllowHttpProtocol`.
This option is `true` by default for safe autocorrection.

=== Examples

[source,ruby]
Expand All @@ -366,14 +369,33 @@ source :rubyforge
# good
source 'https://rubygems.org' # strongly recommended
----

==== AllowHttpProtocol: true (default)

[source,ruby]
----
# good
source 'http://rubygems.org' # use only if HTTPS is unavailable
----

==== AllowHttpProtocol: false

[source,ruby]
----
# bad
source 'http://rubygems.org'
----

=== Configurable attributes

|===
| Name | Default value | Configurable values

| AllowHttpProtocol
| `true`
| Boolean

| Include
| `+**/*.gemfile+`, `+**/Gemfile+`, `+**/gems.rb+`
| Array
Expand All @@ -382,7 +404,7 @@ source 'http://rubygems.org' # use only if HTTPS is unavailable
== Bundler/OrderedGems

|===
| Enabled by default | Safe | Supports autocorrection | VersionAdded | VersionChanged
| Enabled by default | Safe | Supports autocorrection | Version Added | Version Changed

| Enabled
| Yes
Expand Down
10 changes: 5 additions & 5 deletions docs/modules/ROOT/pages/cops_gemspec.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
== Gemspec/DateAssignment

|===
| Enabled by default | Safe | Supports autocorrection | VersionAdded | VersionChanged
| Enabled by default | Safe | Supports autocorrection | Version Added | Version Changed

| Pending
| Yes
Expand Down Expand Up @@ -44,7 +44,7 @@ end
== Gemspec/DuplicatedAssignment

|===
| Enabled by default | Safe | Supports autocorrection | VersionAdded | VersionChanged
| Enabled by default | Safe | Supports autocorrection | Version Added | Version Changed

| Enabled
| Yes
Expand Down Expand Up @@ -102,7 +102,7 @@ end
== Gemspec/OrderedDependencies

|===
| Enabled by default | Safe | Supports autocorrection | VersionAdded | VersionChanged
| Enabled by default | Safe | Supports autocorrection | Version Added | Version Changed

| Enabled
| Yes
Expand Down Expand Up @@ -184,7 +184,7 @@ spec.add_dependency 'rspec'
== Gemspec/RequiredRubyVersion

|===
| Enabled by default | Safe | Supports autocorrection | VersionAdded | VersionChanged
| Enabled by default | Safe | Supports autocorrection | Version Added | Version Changed

| Enabled
| Yes
Expand Down Expand Up @@ -254,7 +254,7 @@ end
== Gemspec/RubyVersionGlobalsUsage

|===
| Enabled by default | Safe | Supports autocorrection | VersionAdded | VersionChanged
| Enabled by default | Safe | Supports autocorrection | Version Added | Version Changed

| Enabled
| Yes
Expand Down
Loading

0 comments on commit 1bdcf65

Please sign in to comment.