Skip to content

Commit

Permalink
Cut 1.40
Browse files Browse the repository at this point in the history
  • Loading branch information
bbatsov committed Dec 8, 2022
1 parent e7080e8 commit 9c682a5
Show file tree
Hide file tree
Showing 16 changed files with 348 additions and 63 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.39.0 (using Parser 2.7.2.0, rubocop-ast 1.1.1, running on ruby 2.7.2) [x86_64-linux]
1.40.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.40.0 (2022-12-08)

### New features

* [#11179](https://github.com/rubocop/rubocop/pull/11179): Add `Style/ConstantBase` cop. ([@r7kamura][])
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.

```console
$ rubocop -V
1.39.0 (using Parser 2.7.2.0, rubocop-ast 1.1.1, running on ruby 2.7.2) [x86_64-linux]
1.40.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 @@ -53,7 +53,7 @@ To prevent an unwanted RuboCop update you might want to use a conservative versi
in your `Gemfile`:

```rb
gem 'rubocop', '~> 1.39', require: false
gem 'rubocop', '~> 1.40', require: false
```

See [our versioning policy](https://docs.rubocop.org/rubocop/versioning.html) for further details.
Expand Down
30 changes: 15 additions & 15 deletions config/default.yml
Original file line number Diff line number Diff line change
Expand Up @@ -163,7 +163,7 @@ Bundler/DuplicatedGem:
Enabled: true
Severity: warning
VersionAdded: '0.46'
VersionChanged: '<<next>>'
VersionChanged: '1.40'
Include:
- '**/*.gemfile'
- '**/Gemfile'
Expand Down Expand Up @@ -217,7 +217,7 @@ Bundler/InsecureProtocolSource:
Enabled: true
Severity: warning
VersionAdded: '0.50'
VersionChanged: '<<next>>'
VersionChanged: '1.40'
AllowHttpProtocol: true
Include:
- '**/*.gemfile'
Expand Down Expand Up @@ -258,7 +258,7 @@ Gemspec/DeprecatedAttributeAssignment:
Enabled: pending
Severity: warning
VersionAdded: '1.30'
VersionChanged: '<<next>>'
VersionChanged: '1.40'
Include:
- '**/*.gemspec'

Expand All @@ -267,7 +267,7 @@ Gemspec/DuplicatedAssignment:
Enabled: true
Severity: warning
VersionAdded: '0.52'
VersionChanged: '<<next>>'
VersionChanged: '1.40'
Include:
- '**/*.gemspec'

Expand All @@ -288,7 +288,7 @@ Gemspec/RequireMFA:
Enabled: pending
Severity: warning
VersionAdded: '1.23'
VersionChanged: '<<next>>'
VersionChanged: '1.40'
Reference:
- https://guides.rubygems.org/mfa-requirement-opt-in/
Include:
Expand All @@ -299,7 +299,7 @@ Gemspec/RequiredRubyVersion:
Enabled: true
Severity: warning
VersionAdded: '0.52'
VersionChanged: '<<next>>'
VersionChanged: '1.40'
Include:
- '**/*.gemspec'

Expand All @@ -309,7 +309,7 @@ Gemspec/RubyVersionGlobalsUsage:
Enabled: true
Severity: warning
VersionAdded: '0.72'
VersionChanged: '<<next>>'
VersionChanged: '1.40'
Include:
- '**/*.gemspec'

Expand Down Expand Up @@ -393,7 +393,7 @@ Layout/AssignmentIndentation:
Enabled: true
SafeAutoCorrect: false
VersionAdded: '0.49'
VersionChanged: '<<next>>'
VersionChanged: '1.40'
# By default the indentation width from `Layout/IndentationWidth` is used,
# but it can be overridden by setting this parameter.
IndentationWidth: ~
Expand Down Expand Up @@ -1657,7 +1657,7 @@ Lint/DeprecatedConstants:
Description: 'Checks for deprecated constants.'
Enabled: pending
VersionAdded: '1.8'
VersionChanged: '<<next>>'
VersionChanged: '1.40'
# You can configure deprecated constants.
# If there is an alternative method, you can set alternative value as `Alternative`.
# And you can set the deprecated version as `DeprecatedVersion`.
Expand Down Expand Up @@ -1918,7 +1918,7 @@ Lint/InterpolationCheck:
Enabled: true
SafeAutoCorrect: false
VersionAdded: '0.50'
VersionChanged: '<<next>>'
VersionChanged: '1.40'

Lint/LambdaWithoutLiteralBlock:
Description: 'Checks uses of lambda without a literal block.'
Expand Down Expand Up @@ -3037,7 +3037,7 @@ Style/ArrayCoercion:
Style/ArrayIntersect:
Description: 'Use `array1.intersect?(array2)` instead of `(array1 & array2).any?`.'
Enabled: 'pending'
VersionAdded: '<<next>>'
VersionAdded: '1.40'

Style/ArrayJoin:
Description: 'Use Array#join instead of Array#*.'
Expand Down Expand Up @@ -4686,7 +4686,7 @@ Style/RedundantArgument:
Enabled: pending
Safe: false
VersionAdded: '1.4'
VersionChanged: '<<next>>'
VersionChanged: '1.40'
Methods:
# Array#join
join: ''
Expand Down Expand Up @@ -4729,7 +4729,7 @@ Style/RedundantConditional:
Style/RedundantConstantBase:
Description: Avoid redundant `::` prefix on constant.
Enabled: pending
VersionAdded: '<<next>>'
VersionAdded: '1.40'

Style/RedundantEach:
Description: 'Checks for redundant `each`.'
Expand Down Expand Up @@ -4875,7 +4875,7 @@ Style/RequireOrder:
Description: Sort `require` and `require_relative` in alphabetical order.
Enabled: false
SafeAutoCorrect: false
VersionAdded: '<<next>>'
VersionAdded: '1.40'

Style/RescueModifier:
Description: 'Avoid using rescue in its modifier form.'
Expand Down Expand Up @@ -5161,7 +5161,7 @@ Style/SymbolProc:
Enabled: true
Safe: false
VersionAdded: '0.26'
VersionChanged: '<<next>>'
VersionChanged: '1.40'
AllowMethodsWithArguments: false
# A list of method names to be always allowed by the check.
# The names should be fairly unique, otherwise you'll end up ignoring lots of code.
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: ~
version: '1.40'
nav:
- modules/ROOT/nav.adoc
3 changes: 3 additions & 0 deletions docs/modules/ROOT/pages/cops.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -384,6 +384,7 @@ In the following section you find all available cops:
* xref:cops_style.adoc#styleandor[Style/AndOr]
* xref:cops_style.adoc#styleargumentsforwarding[Style/ArgumentsForwarding]
* xref:cops_style.adoc#stylearraycoercion[Style/ArrayCoercion]
* xref:cops_style.adoc#stylearrayintersect[Style/ArrayIntersect]
* xref:cops_style.adoc#stylearrayjoin[Style/ArrayJoin]
* xref:cops_style.adoc#styleasciicomments[Style/AsciiComments]
* xref:cops_style.adoc#styleattr[Style/Attr]
Expand Down Expand Up @@ -540,6 +541,7 @@ In the following section you find all available cops:
* xref:cops_style.adoc#styleredundantcapitalw[Style/RedundantCapitalW]
* xref:cops_style.adoc#styleredundantcondition[Style/RedundantCondition]
* xref:cops_style.adoc#styleredundantconditional[Style/RedundantConditional]
* xref:cops_style.adoc#styleredundantconstantbase[Style/RedundantConstantBase]
* xref:cops_style.adoc#styleredundanteach[Style/RedundantEach]
* xref:cops_style.adoc#styleredundantexception[Style/RedundantException]
* xref:cops_style.adoc#styleredundantfetchblock[Style/RedundantFetchBlock]
Expand All @@ -559,6 +561,7 @@ In the following section you find all available cops:
* xref:cops_style.adoc#styleredundantsortby[Style/RedundantSortBy]
* xref:cops_style.adoc#styleredundantstringescape[Style/RedundantStringEscape]
* xref:cops_style.adoc#styleregexpliteral[Style/RegexpLiteral]
* xref:cops_style.adoc#stylerequireorder[Style/RequireOrder]
* xref:cops_style.adoc#stylerescuemodifier[Style/RescueModifier]
* xref:cops_style.adoc#stylerescuestandarderror[Style/RescueStandardError]
* xref:cops_style.adoc#stylereturnnil[Style/ReturnNil]
Expand Down
12 changes: 10 additions & 2 deletions docs/modules/ROOT/pages/cops_bundler.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
| Yes
| No
| 0.46
| -
| 1.40
|===

A Gem's requirements should be listed only once in a Gemfile.
Expand Down Expand Up @@ -54,6 +54,10 @@ end
|===
| Name | Default value | Configurable values

| Severity
| `warning`
| String

| Include
| `+**/*.gemfile+`, `+**/Gemfile+`, `+**/gems.rb+`
| Array
Expand Down Expand Up @@ -339,7 +343,7 @@ gem 'rubocop', tag: 'v1.17.0'
| Yes
| Yes
| 0.50
| -
| 1.40
|===

Passing symbol arguments to `source` (e.g. `source :rubygems`) is
Expand Down Expand Up @@ -392,6 +396,10 @@ source 'http://rubygems.org'
|===
| Name | Default value | Configurable values

| Severity
| `warning`
| String

| AllowHttpProtocol
| `true`
| Boolean
Expand Down
30 changes: 25 additions & 5 deletions docs/modules/ROOT/pages/cops_gemspec.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@ end
| Yes
| Yes
| 1.30
| -
| 1.40
|===

Checks that deprecated attribute attributes are not set in a gemspec file.
Expand Down Expand Up @@ -127,6 +127,10 @@ end
|===
| Name | Default value | Configurable values

| Severity
| `warning`
| String

| Include
| `+**/*.gemspec+`
| Array
Expand All @@ -141,7 +145,7 @@ end
| Yes
| No
| 0.52
| -
| 1.40
|===

An attribute assignment method calls should be listed only once
Expand Down Expand Up @@ -185,6 +189,10 @@ end
|===
| Name | Default value | Configurable values

| Severity
| `warning`
| String

| Include
| `+**/*.gemspec+`
| Array
Expand Down Expand Up @@ -281,7 +289,7 @@ spec.add_dependency 'rspec'
| Yes
| Yes
| 1.23
| -
| 1.40
|===

Requires a gemspec to have `rubygems_mfa_required` metadata set.
Expand Down Expand Up @@ -350,6 +358,10 @@ end
|===
| Name | Default value | Configurable values

| Severity
| `warning`
| String

| Include
| `+**/*.gemspec+`
| Array
Expand All @@ -368,7 +380,7 @@ end
| Yes
| No
| 0.52
| 1.22
| 1.40
|===

Checks that `required_ruby_version` in a gemspec file is set to a valid
Expand Down Expand Up @@ -430,6 +442,10 @@ end
|===
| Name | Default value | Configurable values

| Severity
| `warning`
| String

| Include
| `+**/*.gemspec+`
| Array
Expand All @@ -444,7 +460,7 @@ end
| Yes
| No
| 0.72
| -
| 1.40
|===

Checks that `RUBY_VERSION` constant is not used in gemspec.
Expand Down Expand Up @@ -477,6 +493,10 @@ end
|===
| Name | Default value | Configurable values

| Severity
| `warning`
| String

| Include
| `+**/*.gemspec+`
| Array
Expand Down
4 changes: 2 additions & 2 deletions docs/modules/ROOT/pages/cops_layout.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -229,9 +229,9 @@ array = [1, 2, 3,

| Enabled
| Yes
| Yes
| Yes (Unsafe)
| 0.49
| 0.77
| 1.40
|===

Checks the indentation of the first line of the
Expand Down

0 comments on commit 9c682a5

Please sign in to comment.