From 3cd21e328680c8cd932bb0571dbe9487eb7a0869 Mon Sep 17 00:00:00 2001 From: Nobuyoshi Nakada Date: Mon, 28 Nov 2022 01:50:44 +0900 Subject: [PATCH 1/2] Use `rubcop:autocorrect` task --- Gemfile | 2 +- Rakefile | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/Gemfile b/Gemfile index b7bd49a8cf..de6bd3af6f 100644 --- a/Gemfile +++ b/Gemfile @@ -7,6 +7,6 @@ group :development do gem 'racc', '> 1.4.10' gem 'kpeg', github: 'evanphx/kpeg' gem 'test-unit' - gem 'rubocop' + gem 'rubocop', '>= 1.31.0' gem 'gettext' end diff --git a/Rakefile b/Rakefile index ba4a342d2d..d05714bbd3 100644 --- a/Rakefile +++ b/Rakefile @@ -105,5 +105,5 @@ else RuboCop::RakeTask.new(:rubocop) do |t| t.options = [*parsed_files] end - task :build => [:generate, "rubocop:auto_correct"] + task :build => [:generate, "rubocop:autocorrect"] end From 4058cdcf0958c6a53873ade59b089ca03df153b7 Mon Sep 17 00:00:00 2001 From: Nobuyoshi Nakada Date: Mon, 28 Nov 2022 01:56:01 +0900 Subject: [PATCH 2/2] Run rubocop task --- .github/workflows/test.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 1ea1d84435..02b9f74067 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -28,4 +28,6 @@ jobs: run: bundle exec rake env: RUBYOPT: --enable-frozen_string_literal + - if: ${{ matrix.ruby == 'head' && startsWith(matrix.os, 'ubuntu') }} + run: bundle exec rake rubocop