From 60d5caa46f6f37e2b8f04c408bbe45d274d409b4 Mon Sep 17 00:00:00 2001 From: Koichi ITO Date: Sat, 2 Mar 2024 02:55:48 +0900 Subject: [PATCH] Require RuboCop 1.61 to use `AutoCorrect: Contextual` Follow up https://github.com/rubocop/rubocop-minitest/pull/302#issuecomment-1945308338. This PR updates the dependency version to RuboCop 1.61, which supports `AutoCorrect: contextual`, and updates `Minitest/Focus`'s config. https://github.com/rubocop/rubocop/releases/tag/v1.61.0 --- .github/workflows/test.yml | 2 +- changelog/change_require_rubocop_1_61.md | 1 + config/default.yml | 1 + rubocop-minitest.gemspec | 2 +- 4 files changed, 4 insertions(+), 2 deletions(-) create mode 100644 changelog/change_require_rubocop_1_61.md diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 62c95cd..18c9f79 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -75,7 +75,7 @@ jobs: run: | sed -e "/gem 'rubocop', github: 'rubocop\/rubocop'/d" -i Gemfile cat << EOF > Gemfile.local - gem 'rubocop', '1.39.0' # Specify the oldest supported RuboCop version + gem 'rubocop', '1.61.0' # Specify the oldest supported RuboCop version EOF - name: set up Ruby uses: ruby/setup-ruby@v1 diff --git a/changelog/change_require_rubocop_1_61.md b/changelog/change_require_rubocop_1_61.md new file mode 100644 index 0000000..1cd49da --- /dev/null +++ b/changelog/change_require_rubocop_1_61.md @@ -0,0 +1 @@ +* [#303](https://github.com/rubocop/rubocop-minitest/pull/303): Require RuboCop 1.61 to use `AutoCorrect: Contextual`. ([@koic][]) diff --git a/config/default.yml b/config/default.yml index 8062233..fc52e4e 100644 --- a/config/default.yml +++ b/config/default.yml @@ -149,6 +149,7 @@ Minitest/EmptyLineBeforeAssertionMethods: Minitest/Focus: Description: 'Checks for focused tests.' Enabled: pending + AutoCorrect: contextual VersionAdded: '<>' Minitest/GlobalExpectations: diff --git a/rubocop-minitest.gemspec b/rubocop-minitest.gemspec index c4642c5..0992db4 100644 --- a/rubocop-minitest.gemspec +++ b/rubocop-minitest.gemspec @@ -32,6 +32,6 @@ Gem::Specification.new do |spec| spec.executables = spec.files.grep(%r{^exe/}) { |f| File.basename(f) } spec.require_paths = ['lib'] - spec.add_runtime_dependency 'rubocop', '>= 1.39', '< 2.0' + spec.add_runtime_dependency 'rubocop', '>= 1.61', '< 2.0' spec.add_runtime_dependency 'rubocop-ast', '>= 1.30.0', '< 2.0' end