Skip to content

Commit

Permalink
Cut 1.32
Browse files Browse the repository at this point in the history
  • Loading branch information
bbatsov committed Jul 21, 2022
1 parent 2f9a4d0 commit 08fd23a
Show file tree
Hide file tree
Showing 15 changed files with 435 additions and 51 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.31.2 (using Parser 2.7.2.0, rubocop-ast 1.1.1, running on ruby 2.7.2 x86_64-linux)
1.32.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.32.0 (2022-07-21)

### New features

* [#10820](https://github.com/rubocop/rubocop/pull/10820): Add new `Style/EmptyHeredoc` cop. ([@koic][])
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.31.2 (using Parser 2.7.2.0, rubocop-ast 1.1.1, running on ruby 2.7.2 x86_64-linux)
1.32.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.31', require: false
gem 'rubocop', '~> 1.32', require: false
```

See [our versioning policy](https://docs.rubocop.org/rubocop/versioning.html) for further details.
Expand Down
8 changes: 4 additions & 4 deletions config/default.yml
Original file line number Diff line number Diff line change
Expand Up @@ -977,7 +977,7 @@ Layout/LineContinuationLeadingSpace:
AutoCorrect: false
SafeAutoCorrect: false
VersionAdded: '1.31'
VersionChanged: '<<next>>'
VersionChanged: '1.32'
EnforcedStyle: trailing
SupportedStyles:
- leading
Expand Down Expand Up @@ -1163,7 +1163,7 @@ Layout/MultilineMethodParameterLineBreaks:
Checks that each parameter in a multi-line method definition
starts on a separate line.
Enabled: false
VersionAdded: '<<next>>'
VersionAdded: '1.32'

Layout/MultilineOperationIndentation:
Description: >-
Expand Down Expand Up @@ -2143,7 +2143,7 @@ Lint/RequireParentheses:
Lint/RequireRangeParentheses:
Description: 'Checks that a range literal is enclosed in parentheses when the end of the range is at a line break.'
Enabled: pending
VersionAdded: '<<next>>'
VersionAdded: '1.32'

Lint/RequireRelativeSelfPath:
Description: 'Checks for uses a file requiring itself with `require_relative`.'
Expand Down Expand Up @@ -3517,7 +3517,7 @@ Style/EmptyElse:
Style/EmptyHeredoc:
Description: 'Checks for using empty heredoc to reduce redundancy.'
Enabled: pending
VersionAdded: '<<next>>'
VersionAdded: '1.32'

Style/EmptyLambdaParameter:
Description: 'Omit parens for empty lambda parameters.'
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.32'
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 @@ -157,6 +157,7 @@ In the following section you find all available cops:
* xref:cops_layout.adoc#layoutmultilinemethodcallbracelayout[Layout/MultilineMethodCallBraceLayout]
* xref:cops_layout.adoc#layoutmultilinemethodcallindentation[Layout/MultilineMethodCallIndentation]
* xref:cops_layout.adoc#layoutmultilinemethoddefinitionbracelayout[Layout/MultilineMethodDefinitionBraceLayout]
* xref:cops_layout.adoc#layoutmultilinemethodparameterlinebreaks[Layout/MultilineMethodParameterLineBreaks]
* xref:cops_layout.adoc#layoutmultilineoperationindentation[Layout/MultilineOperationIndentation]
* xref:cops_layout.adoc#layoutparameteralignment[Layout/ParameterAlignment]
* xref:cops_layout.adoc#layoutredundantlinebreak[Layout/RedundantLineBreak]
Expand Down Expand Up @@ -282,6 +283,7 @@ In the following section you find all available cops:
* xref:cops_lint.adoc#lintrefinementimportmethods[Lint/RefinementImportMethods]
* xref:cops_lint.adoc#lintregexpascondition[Lint/RegexpAsCondition]
* xref:cops_lint.adoc#lintrequireparentheses[Lint/RequireParentheses]
* xref:cops_lint.adoc#lintrequirerangeparentheses[Lint/RequireRangeParentheses]
* xref:cops_lint.adoc#lintrequirerelativeselfpath[Lint/RequireRelativeSelfPath]
* xref:cops_lint.adoc#lintrescueexception[Lint/RescueException]
* xref:cops_lint.adoc#lintrescuetype[Lint/RescueType]
Expand Down Expand Up @@ -421,6 +423,7 @@ In the following section you find all available cops:
* xref:cops_style.adoc#styleemptyblockparameter[Style/EmptyBlockParameter]
* xref:cops_style.adoc#styleemptycasecondition[Style/EmptyCaseCondition]
* xref:cops_style.adoc#styleemptyelse[Style/EmptyElse]
* xref:cops_style.adoc#styleemptyheredoc[Style/EmptyHeredoc]
* xref:cops_style.adoc#styleemptylambdaparameter[Style/EmptyLambdaParameter]
* xref:cops_style.adoc#styleemptyliteral[Style/EmptyLiteral]
* xref:cops_style.adoc#styleemptymethod[Style/EmptyMethod]
Expand Down
79 changes: 76 additions & 3 deletions docs/modules/ROOT/pages/cops_layout.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -4017,14 +4017,17 @@ end
| Yes
| No
| 1.31
| -
| 1.32
|===

Checks that strings broken over multiple lines (by a backslash) contain
trailing spaces instead of leading spaces.
trailing spaces instead of leading spaces (default) or leading spaces
instead of trailing spaces.

=== Examples

==== EnforcedStyle: trailing (default)

[source,ruby]
----
# bad
Expand All @@ -4044,6 +4047,27 @@ trailing spaces instead of leading spaces.
'long'
----

==== EnforcedStyle: leading

[source,ruby]
----
# bad
'this text contains a lot of ' \
'spaces'
# good
'this text contains a lot of' \
' spaces'
# bad
'this text is too ' \
'long'
# good
'this text is too' \
' long'
----

=== Configurable attributes

|===
Expand All @@ -4052,6 +4076,10 @@ trailing spaces instead of leading spaces.
| AutoCorrect
| `false`
| Boolean

| EnforcedStyle
| `trailing`
| `leading`, `trailing`
|===

== Layout/LineContinuationSpacing
Expand Down Expand Up @@ -4265,6 +4293,7 @@ are recommended to further format the broken lines.
* MultilineHashBraceLayout
* MultilineHashKeyLineBreaks
* MultilineMethodArgumentLineBreaks
* MultilineMethodParameterLineBreaks
* ParameterAlignment

Together, these cops will pretty print hashes, arrays,
Expand Down Expand Up @@ -4812,7 +4841,7 @@ starts on a separate line.
Ensures that each argument in a multi-line method call
starts on a separate line.

NOTE: this cop does not move the first argument, if you want that to
NOTE: This cop does not move the first argument, if you want that to
be on a separate line, see `Layout/FirstMethodArgumentLineBreak`.

=== Examples
Expand All @@ -4830,6 +4859,9 @@ foo(
b,
c
)
# good
foo(a, b, c)
----

== Layout/MultilineMethodCallBraceLayout
Expand Down Expand Up @@ -5172,6 +5204,47 @@ end
| `symmetrical`, `new_line`, `same_line`
|===

== Layout/MultilineMethodParameterLineBreaks

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

| Disabled
| Yes
| Yes
| 1.32
| -
|===

Ensures that each parameter in a multi-line method definition
starts on a separate line.

NOTE: This cop does not move the first argument, if you want that to
be on a separate line, see `Layout/FirstMethodParameterLineBreak`.

=== Examples

[source,ruby]
----
# bad
def foo(a, b,
c
)
end
# good
def foo(
a,
b,
c
)
end
# good
def foo(a, b, c)
end
----

== Layout/MultilineOperationIndentation

|===
Expand Down
Loading

0 comments on commit 08fd23a

Please sign in to comment.