diff --git a/.rubocop.yml b/.rubocop.yml index 3f20a3435..96af51a31 100644 --- a/.rubocop.yml +++ b/.rubocop.yml @@ -1,4 +1,7 @@ -require: rubocop-rubycw +require: + - rubocop-rubycw + - rubocop-on-rbs + AllCops: TargetRubyVersion: 3.0 DisabledByDefault: true @@ -9,6 +12,27 @@ Rubycw/Rubycw: Exclude: - 'test/**/*_test.rb' +RBS: + Enabled: true +RBS/Layout: + Enabled: true + Exclude: + - 'sig/**/*' + - 'test/**/*' +RBS/Layout/CommentIndentation: + Exclude: + - core/string.rbs +RBS/Lint: + Enabled: true + Exclude: + - 'sig/**/*' + - 'test/**/*' +RBS/Style: + Enabled: false + Exclude: + - 'sig/**/*' + - 'test/**/*' + Lint/DuplicateMethods: Enabled: true Include: diff --git a/Gemfile b/Gemfile index 7400b55a1..4395c821e 100644 --- a/Gemfile +++ b/Gemfile @@ -10,6 +10,7 @@ gem "test-unit" gem "rspec" gem "rubocop" gem "rubocop-rubycw" +gem "rubocop-on-rbs" gem "json" gem "json-schema" gem "goodcheck" diff --git a/Gemfile.lock b/Gemfile.lock index 2b1aca7f4..12fcf9971 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -113,6 +113,10 @@ GEM unicode-display_width (>= 2.4.0, < 3.0) rubocop-ast (1.31.3) parser (>= 3.3.1.0) + rubocop-on-rbs (0.6.0) + rbs (~> 3.5) + rubocop (~> 1.41) + zlib rubocop-rubycw (0.1.6) rubocop (~> 1.0) ruby-progressbar (1.13.0) @@ -145,6 +149,7 @@ GEM tzinfo (2.0.6) concurrent-ruby (~> 1.0) unicode-display_width (2.5.0) + zlib (3.1.1) PLATFORMS ruby @@ -175,6 +180,7 @@ DEPENDENCIES rdoc rspec rubocop + rubocop-on-rbs rubocop-rubycw stackprof steep (~> 1.7.1) diff --git a/Rakefile b/Rakefile index f4561e93e..9b1108fcb 100644 --- a/Rakefile +++ b/Rakefile @@ -110,7 +110,13 @@ task :raap => :compile do end task :rubocop do - sh "rubocop --parallel" + format = if ENV["CI"] + "github" + else + "progress" + end + + sh "rubocop --parallel --format #{format}" end namespace :generate do