Skip to content

Commit 796fcb3

Browse files
committed
Cut 1.56.3
1 parent 2c10ba8 commit 796fcb3

File tree

9 files changed

+69
-13
lines changed

9 files changed

+69
-13
lines changed

.github/ISSUE_TEMPLATE/bug_report.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ output by `rubocop -V`, include them as well. Here's an example:
3838

3939
```
4040
$ [bundle exec] rubocop -V
41-
1.56.2 (using Parser 3.2.2.3, rubocop-ast 1.29.0, running on ruby 3.2.2) [x86_64-linux]
41+
1.56.3 (using Parser 3.2.2.3, rubocop-ast 1.29.0, running on ruby 3.2.2) [x86_64-linux]
4242
- rubocop-performance 1.18.0
4343
- rubocop-rspec 2.23.2
4444
```

CHANGELOG.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,8 @@
1111

1212
## master (unreleased)
1313

14+
## 1.56.3 (2023-09-11)
15+
1416
### Bug fixes
1517

1618
* [#12151](https://github.com/rubocop/rubocop/issues/12151): Make `Layout/EmptyLineAfterGuardClause` allow `:nocov:` directive after guard clause. ([@koic][])

CONTRIBUTING.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ do so.
1717

1818
```console
1919
$ rubocop -V
20-
1.56.2 (using Parser 3.2.2.3, rubocop-ast 1.29.0, running on ruby 3.2.2) [x86_64-linux]
20+
1.56.3 (using Parser 3.2.2.3, rubocop-ast 1.29.0, running on ruby 3.2.2) [x86_64-linux]
2121
- rubocop-performance 1.18.0
2222
- rubocop-rspec 2.23.2
2323
```

docs/antora.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,6 @@ name: rubocop
22
title: RuboCop
33
# We always provide version without patch here (e.g. 1.1),
44
# as patch versions should not appear in the docs.
5-
version: ~
5+
version: '1.56'
66
nav:
77
- modules/ROOT/nav.adoc

docs/modules/ROOT/pages/cops_layout.adoc

Lines changed: 19 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1330,7 +1330,23 @@ end
13301330
| 0.59
13311331
|===
13321332

1333-
Enforces empty line after guard clause
1333+
Enforces empty line after guard clause.
1334+
1335+
This cop allows `# :nocov:` directive after guard clause because
1336+
SimpleCov excludes code from the coverage report by wrapping it in `# :nocov:`:
1337+
1338+
[source,ruby]
1339+
----
1340+
def foo
1341+
# :nocov:
1342+
return if condition
1343+
# :nocov:
1344+
bar
1345+
end
1346+
----
1347+
1348+
Refer to SimpleCov's documentation for more details:
1349+
https://github.com/simplecov-ruby/simplecov#ignoringskipping-code
13341350

13351351
=== Examples
13361352

@@ -3701,6 +3717,8 @@ opening HEREDOC tag.
37013717

37023718
== Layout/HeredocIndentation
37033719

3720+
NOTE: Required Ruby version: 2.3
3721+
37043722
|===
37053723
| Enabled by default | Safe | Supports autocorrection | Version Added | Version Changed
37063724

docs/modules/ROOT/pages/cops_lint.adoc

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7070,12 +7070,18 @@ Checks for every useless assignment to local variable in every
70707070
scope.
70717071
The basic idea for this cop was from the warning of `ruby -cw`:
70727072

7073-
assigned but unused variable - foo
7073+
[source,console]
7074+
----
7075+
assigned but unused variable - foo
7076+
----
70747077

70757078
Currently this cop has advanced logic that detects unreferenced
70767079
reassignments and properly handles varied cases such as branch, loop,
70777080
rescue, ensure, etc.
70787081

7082+
NOTE: Given the assignment `foo = 1, bar = 2`, removing unused variables
7083+
can lead to a syntax error, so this case is not autocorrected.
7084+
70797085
=== Safety
70807086

70817087
This cop's autocorrection is unsafe because removing assignment from

docs/modules/ROOT/pages/cops_style.adoc

Lines changed: 17 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -522,6 +522,15 @@ can be replaced by `array1.intersect?(array2)`.
522522
The `array1.intersect?(array2)` method is faster than
523523
`(array1 & array2).any?` and is more readable.
524524

525+
In cases like the following, compatibility is not ensured,
526+
so it will not be detected when using block argument.
527+
528+
[source,ruby]
529+
----
530+
([1] & [1,2]).any? { |x| false } # => false
531+
[1].intersect?([1,2]) { |x| false } # => true
532+
----
533+
525534
=== Safety
526535

527536
This cop cannot guarantee that `array1` and `array2` are
@@ -16156,25 +16165,26 @@ have the same result if reversed.
1615616165

1615716166
=== Examples
1615816167

16159-
==== SupportedOperators: ['*', '+', '&'']
16168+
==== SupportedOperators: ['*', '+', '&', '|', '^'] (default)
1616016169

1616116170
[source,ruby]
1616216171
----
1616316172
# bad
16164-
1 + x
1616516173
10 * y
16174+
1 + x
1616616175
1 & z
16176+
1 | x
16177+
1 ^ x
1616716178
1 + CONST
1616816179
1616916180
# good
16170-
60 * 24
16171-
x + 1
1617216181
y * 10
16182+
x + 1
1617316183
z & 1
16184+
x | 1
16185+
x ^ 1
1617416186
CONST + 1
16175-
16176-
# good
16177-
1 | x
16187+
60 * 24
1617816188
----
1617916189

1618016190
=== Configurable attributes

lib/rubocop/version.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
module RuboCop
44
# This module holds the RuboCop version information.
55
module Version
6-
STRING = '1.56.2'
6+
STRING = '1.56.3'
77

88
MSG = '%<version>s (using Parser %<parser_version>s, ' \
99
'rubocop-ast %<rubocop_ast_version>s, ' \

relnotes/v1.56.3.md

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
### Bug fixes
2+
3+
* [#12151](https://github.com/rubocop/rubocop/issues/12151): Make `Layout/EmptyLineAfterGuardClause` allow `:nocov:` directive after guard clause. ([@koic][])
4+
* [#12195](https://github.com/rubocop/rubocop/issues/12195): Fix a false negative for `Layout/SpaceAfterNot` when a newline is present after `!`. ([@ymap][])
5+
* [#12192](https://github.com/rubocop/rubocop/issues/12192): Fix a false positive for `Layout/RedundantLineBreak` when using quoted symbols with a single newline. ([@ymap][])
6+
* [#12190](https://github.com/rubocop/rubocop/issues/12190): Fix a false positive for `Layout/SpaceAroundOperators` when aligning operators vertically. ([@koic][])
7+
* [#12171](https://github.com/rubocop/rubocop/issues/12171): Fix a false positive for `Style/ArrayIntersect` when using block argument for `Enumerable#any?`. ([@koic][])
8+
* [#12172](https://github.com/rubocop/rubocop/issues/12172): Fix a false positive for `Style/EmptyCaseCondition` when using `return`, `break`, `next` or method call before empty case condition. ([@koic][])
9+
* [#12162](https://github.com/rubocop/rubocop/issues/12162): Fix an error for `Bundler/DuplicatedGroup` when there's a duplicate set of groups and the `group` value contains a splat. ([@koic][])
10+
* [#12182](https://github.com/rubocop/rubocop/issues/12182): Fix an error for `Lint/UselessAssignment` when variables are assigned using chained assignment and remain unreferenced. ([@koic][])
11+
* [#12181](https://github.com/rubocop/rubocop/issues/12181): Fix an incorrect autocorrect for `Lint/UselessAssignment` when variables are assigned with sequential assignment using the comma operator and unreferenced. ([@koic][])
12+
* [#12187](https://github.com/rubocop/rubocop/issues/12187): Fix an incorrect autocorrect for `Style/SoleNestedConditional` when comment is in an empty nested `if` body. ([@ymap][])
13+
* [#12183](https://github.com/rubocop/rubocop/pull/12183): Fix an incorrect autocorrect for `Style/MultilineTernaryOperator` when returning a multiline ternary operator expression with safe navigation method call. ([@koic][])
14+
* [#12168](https://github.com/rubocop/rubocop/issues/12168): Fix bug in `Style/ArgumentsForwarding` when there are repeated send nodes. ([@owst][])
15+
* [#12185](https://github.com/rubocop/rubocop/pull/12185): Set target version for `Layout/HeredocIndentation`. ([@tagliala][])
16+
17+
[@koic]: https://github.com/koic
18+
[@ymap]: https://github.com/ymap
19+
[@owst]: https://github.com/owst
20+
[@tagliala]: https://github.com/tagliala

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy