Skip to content

Commit 166227c

Browse files
authored
Merge pull request #1432 from dvandersluis/use-node-groups
Use node groups in node patterns to replace unions of types
2 parents 428a452 + 487fafa commit 166227c

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

lib/rubocop/cop/rails/belongs_to.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@ class BelongsTo < Base
6666

6767
def_node_matcher :match_belongs_to_with_options, <<~PATTERN
6868
(send _ :belongs_to ...
69-
(hash <$(pair (sym :required) ${true false}) ...>)
69+
(hash <$(pair (sym :required) $boolean) ...>)
7070
)
7171
PATTERN
7272

lib/rubocop/cop/rails/skips_model_validations.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@ class SkipsModelValidations < Base
6161
def_node_matcher :good_touch?, <<~PATTERN
6262
{
6363
(send (const {nil? cbase} :FileUtils) :touch ...)
64-
(send _ :touch {true false})
64+
(send _ :touch boolean)
6565
}
6666
PATTERN
6767

0 commit comments

Comments
 (0)