From d0ef331087faecfaa1251613f6ec2e3b52c2428c Mon Sep 17 00:00:00 2001 From: Koichi ITO Date: Mon, 14 Nov 2022 15:58:38 +0900 Subject: [PATCH] Enable `Lint/DuplicateMagicComment` cop This PR enables `Lint/DuplicateMagicComment` cop to resolve the background of https://github.com/rubocop/rubocop/issues/11043. And this PR bumps RuboCop version because the cop was introduced in RuboCop 1.37.0: https://github.com/rubocop/rubocop/blob/master/CHANGELOG.md#1370-2022-10-20 --- .rubocop.yml | 3 +++ Gemfile.lock | 19 ++++++++++--------- 2 files changed, 13 insertions(+), 9 deletions(-) diff --git a/.rubocop.yml b/.rubocop.yml index 0fde1c29c7ab1..76f7f8c7054e2 100644 --- a/.rubocop.yml +++ b/.rubocop.yml @@ -211,6 +211,9 @@ Lint/AmbiguousRegexpLiteral: Lint/DuplicateRequire: Enabled: true +Lint/DuplicateMagicComment: + Enabled: true + Lint/DuplicateMethods: Enabled: true diff --git a/Gemfile.lock b/Gemfile.lock index d05f1383c6145..56bed773f9ed8 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -365,8 +365,8 @@ GEM nokogiri (1.13.3-x86_64-linux) racc (~> 1.4) os (1.1.4) - parallel (1.21.0) - parser (3.1.1.0) + parallel (1.22.1) + parser (3.1.2.1) ast (~> 2.4.1) path_expander (1.1.0) pg (1.3.0) @@ -408,7 +408,7 @@ GEM connection_pool redis-namespace (1.8.1) redis (>= 3.0.4) - regexp_parser (2.2.1) + regexp_parser (2.6.0) reline (0.3.1) io-console (~> 0.5) representable (3.1.1) @@ -428,16 +428,17 @@ GEM retriable (3.1.2) rexml (3.2.5) rouge (3.27.0) - rubocop (1.25.1) + rubocop (1.39.0) + json (~> 2.3) parallel (~> 1.10) - parser (>= 3.1.0.0) + parser (>= 3.1.2.1) rainbow (>= 2.2.2, < 4.0) regexp_parser (>= 1.8, < 3.0) - rexml - rubocop-ast (>= 1.15.1, < 2.0) + rexml (>= 3.2.5, < 4.0) + rubocop-ast (>= 1.23.0, < 2.0) ruby-progressbar (~> 1.7) unicode-display_width (>= 1.4.0, < 3.0) - rubocop-ast (1.16.0) + rubocop-ast (1.23.0) parser (>= 3.1.1.0) rubocop-minitest (0.22.0) rubocop (>= 0.90, < 2.0) @@ -529,7 +530,7 @@ GEM tzinfo (2.0.4) concurrent-ruby (~> 1.0) uber (0.1.0) - unicode-display_width (2.1.0) + unicode-display_width (2.3.0) useragent (0.16.10) w3c_validators (1.3.6) json (>= 1.8)