From 294f83644c191083a16362f52bc5cfe188ff8337 Mon Sep 17 00:00:00 2001 From: James Thompson Date: Mon, 11 May 2026 16:30:49 +1000 Subject: [PATCH] simplify yard rake task --- api/Rakefile | 5 +---- common/Rakefile | 5 +---- contrib/rubocop.yml | 10 ++++++++++ exporter/jaeger/Rakefile | 5 +---- exporter/otlp-common/Rakefile | 5 +---- exporter/otlp-grpc/Rakefile | 5 +---- exporter/otlp-http/Rakefile | 5 +---- exporter/otlp-logs/Rakefile | 5 +---- exporter/otlp-metrics/Rakefile | 5 +---- exporter/otlp/Rakefile | 5 +---- exporter/zipkin/Rakefile | 5 +---- logs_api/Rakefile | 5 +---- logs_sdk/Rakefile | 5 +---- metrics_api/Rakefile | 5 +---- metrics_sdk/Rakefile | 5 +---- propagator/b3/Rakefile | 5 +---- propagator/jaeger/Rakefile | 5 +---- registry/Rakefile | 5 +---- sdk/Rakefile | 5 +---- sdk_experimental/Rakefile | 5 +---- semantic_conventions/Rakefile | 5 +---- test_helpers/Rakefile | 5 +---- 22 files changed, 31 insertions(+), 84 deletions(-) diff --git a/api/Rakefile b/api/Rakefile index a6ac35404c..e67b406ed7 100644 --- a/api/Rakefile +++ b/api/Rakefile @@ -10,6 +10,7 @@ require 'yard' require 'rubocop/rake_task' RuboCop::RakeTask.new +YARD::Rake::YardocTask.new Rake::TestTask.new :test do |t| t.libs << 'test' @@ -17,10 +18,6 @@ Rake::TestTask.new :test do |t| t.test_files = FileList['test/**/*_test.rb'] end -YARD::Rake::YardocTask.new do |t| - t.stats_options = ['--list-undoc'] -end - default_tasks = if RUBY_ENGINE == 'truffleruby' %i[test] diff --git a/common/Rakefile b/common/Rakefile index 65b58a5670..4f84819179 100644 --- a/common/Rakefile +++ b/common/Rakefile @@ -10,6 +10,7 @@ require 'yard' require 'rubocop/rake_task' RuboCop::RakeTask.new +YARD::Rake::YardocTask.new Rake::TestTask.new :test do |t| t.libs << '../api/lib' @@ -18,10 +19,6 @@ Rake::TestTask.new :test do |t| t.test_files = FileList['test/**/*_test.rb'] end -YARD::Rake::YardocTask.new do |t| - t.stats_options = ['--list-undoc'] -end - default_tasks = if RUBY_ENGINE == 'truffleruby' %i[test] diff --git a/contrib/rubocop.yml b/contrib/rubocop.yml index 090b928235..a1aaecb57a 100644 --- a/contrib/rubocop.yml +++ b/contrib/rubocop.yml @@ -29,6 +29,16 @@ Metrics/MethodLength: Metrics/ParameterLists: Enabled: false +Style/Documentation: + Exclude: + - "**/test/**/*" + - "**/*test*" +Style/DocumentationMethod: + Enabled: true + Severity: info + Exclude: + - "**/test/**/*" + - "**/*test*" Style/ModuleFunction: Enabled: false Style/NumericPredicate: diff --git a/exporter/jaeger/Rakefile b/exporter/jaeger/Rakefile index b56c247120..6b4bf34ce0 100644 --- a/exporter/jaeger/Rakefile +++ b/exporter/jaeger/Rakefile @@ -10,6 +10,7 @@ require 'yard' require 'rubocop/rake_task' RuboCop::RakeTask.new +YARD::Rake::YardocTask.new Rake::TestTask.new :test do |t| t.libs << 'test' @@ -19,10 +20,6 @@ Rake::TestTask.new :test do |t| t.test_files = FileList['test/**/*_test.rb'] end -YARD::Rake::YardocTask.new do |t| - t.stats_options = ['--list-undoc'] -end - default_tasks = if RUBY_ENGINE == 'truffleruby' %i[test] diff --git a/exporter/otlp-common/Rakefile b/exporter/otlp-common/Rakefile index e4050d1e41..c969e0e108 100644 --- a/exporter/otlp-common/Rakefile +++ b/exporter/otlp-common/Rakefile @@ -10,6 +10,7 @@ require 'yard' require 'rubocop/rake_task' RuboCop::RakeTask.new +YARD::Rake::YardocTask.new Rake::TestTask.new :test do |t| t.libs << 'test' @@ -19,10 +20,6 @@ Rake::TestTask.new :test do |t| t.test_files = FileList['test/**/*_test.rb'] end -YARD::Rake::YardocTask.new do |t| - t.stats_options = ['--list-undoc'] -end - default_tasks = if RUBY_ENGINE == 'truffleruby' %i[test] diff --git a/exporter/otlp-grpc/Rakefile b/exporter/otlp-grpc/Rakefile index b56c247120..6b4bf34ce0 100644 --- a/exporter/otlp-grpc/Rakefile +++ b/exporter/otlp-grpc/Rakefile @@ -10,6 +10,7 @@ require 'yard' require 'rubocop/rake_task' RuboCop::RakeTask.new +YARD::Rake::YardocTask.new Rake::TestTask.new :test do |t| t.libs << 'test' @@ -19,10 +20,6 @@ Rake::TestTask.new :test do |t| t.test_files = FileList['test/**/*_test.rb'] end -YARD::Rake::YardocTask.new do |t| - t.stats_options = ['--list-undoc'] -end - default_tasks = if RUBY_ENGINE == 'truffleruby' %i[test] diff --git a/exporter/otlp-http/Rakefile b/exporter/otlp-http/Rakefile index b56c247120..6b4bf34ce0 100644 --- a/exporter/otlp-http/Rakefile +++ b/exporter/otlp-http/Rakefile @@ -10,6 +10,7 @@ require 'yard' require 'rubocop/rake_task' RuboCop::RakeTask.new +YARD::Rake::YardocTask.new Rake::TestTask.new :test do |t| t.libs << 'test' @@ -19,10 +20,6 @@ Rake::TestTask.new :test do |t| t.test_files = FileList['test/**/*_test.rb'] end -YARD::Rake::YardocTask.new do |t| - t.stats_options = ['--list-undoc'] -end - default_tasks = if RUBY_ENGINE == 'truffleruby' %i[test] diff --git a/exporter/otlp-logs/Rakefile b/exporter/otlp-logs/Rakefile index 18848eb5bd..856abd1fbf 100644 --- a/exporter/otlp-logs/Rakefile +++ b/exporter/otlp-logs/Rakefile @@ -10,6 +10,7 @@ require 'yard' require 'rubocop/rake_task' RuboCop::RakeTask.new +YARD::Rake::YardocTask.new Rake::TestTask.new :test do |t| t.libs << 'test' @@ -19,10 +20,6 @@ Rake::TestTask.new :test do |t| t.test_files = FileList['test/**/*_test.rb'] end -YARD::Rake::YardocTask.new do |t| - t.stats_options = ['--list-undoc'] -end - default_tasks = if RUBY_ENGINE == 'truffleruby' %i[test] diff --git a/exporter/otlp-metrics/Rakefile b/exporter/otlp-metrics/Rakefile index 18848eb5bd..856abd1fbf 100644 --- a/exporter/otlp-metrics/Rakefile +++ b/exporter/otlp-metrics/Rakefile @@ -10,6 +10,7 @@ require 'yard' require 'rubocop/rake_task' RuboCop::RakeTask.new +YARD::Rake::YardocTask.new Rake::TestTask.new :test do |t| t.libs << 'test' @@ -19,10 +20,6 @@ Rake::TestTask.new :test do |t| t.test_files = FileList['test/**/*_test.rb'] end -YARD::Rake::YardocTask.new do |t| - t.stats_options = ['--list-undoc'] -end - default_tasks = if RUBY_ENGINE == 'truffleruby' %i[test] diff --git a/exporter/otlp/Rakefile b/exporter/otlp/Rakefile index c8e9ceb9c6..926173fa70 100644 --- a/exporter/otlp/Rakefile +++ b/exporter/otlp/Rakefile @@ -10,6 +10,7 @@ require 'yard' require 'rubocop/rake_task' RuboCop::RakeTask.new +YARD::Rake::YardocTask.new Rake::TestTask.new :test do |t| t.libs << 'test' @@ -19,10 +20,6 @@ Rake::TestTask.new :test do |t| t.test_files = FileList['test/**/*_test.rb'] end -YARD::Rake::YardocTask.new do |t| - t.stats_options = ['--list-undoc'] -end - default_tasks = if RUBY_ENGINE == 'truffleruby' %i[test] diff --git a/exporter/zipkin/Rakefile b/exporter/zipkin/Rakefile index b56c247120..6b4bf34ce0 100644 --- a/exporter/zipkin/Rakefile +++ b/exporter/zipkin/Rakefile @@ -10,6 +10,7 @@ require 'yard' require 'rubocop/rake_task' RuboCop::RakeTask.new +YARD::Rake::YardocTask.new Rake::TestTask.new :test do |t| t.libs << 'test' @@ -19,10 +20,6 @@ Rake::TestTask.new :test do |t| t.test_files = FileList['test/**/*_test.rb'] end -YARD::Rake::YardocTask.new do |t| - t.stats_options = ['--list-undoc'] -end - default_tasks = if RUBY_ENGINE == 'truffleruby' %i[test] diff --git a/logs_api/Rakefile b/logs_api/Rakefile index a6ac35404c..e67b406ed7 100644 --- a/logs_api/Rakefile +++ b/logs_api/Rakefile @@ -10,6 +10,7 @@ require 'yard' require 'rubocop/rake_task' RuboCop::RakeTask.new +YARD::Rake::YardocTask.new Rake::TestTask.new :test do |t| t.libs << 'test' @@ -17,10 +18,6 @@ Rake::TestTask.new :test do |t| t.test_files = FileList['test/**/*_test.rb'] end -YARD::Rake::YardocTask.new do |t| - t.stats_options = ['--list-undoc'] -end - default_tasks = if RUBY_ENGINE == 'truffleruby' %i[test] diff --git a/logs_sdk/Rakefile b/logs_sdk/Rakefile index d202bf4c43..5068ab7f00 100644 --- a/logs_sdk/Rakefile +++ b/logs_sdk/Rakefile @@ -10,6 +10,7 @@ require 'yard' require 'rubocop/rake_task' RuboCop::RakeTask.new +YARD::Rake::YardocTask.new Rake::TestTask.new :test do |t| t.libs << 'test' @@ -17,10 +18,6 @@ Rake::TestTask.new :test do |t| t.test_files = FileList['test/**/*_test.rb'] end -YARD::Rake::YardocTask.new do |t| - t.stats_options = ['--list-undoc'] -end - default_tasks = if RUBY_ENGINE == 'truffleruby' %i[test] diff --git a/metrics_api/Rakefile b/metrics_api/Rakefile index a6ac35404c..e67b406ed7 100644 --- a/metrics_api/Rakefile +++ b/metrics_api/Rakefile @@ -10,6 +10,7 @@ require 'yard' require 'rubocop/rake_task' RuboCop::RakeTask.new +YARD::Rake::YardocTask.new Rake::TestTask.new :test do |t| t.libs << 'test' @@ -17,10 +18,6 @@ Rake::TestTask.new :test do |t| t.test_files = FileList['test/**/*_test.rb'] end -YARD::Rake::YardocTask.new do |t| - t.stats_options = ['--list-undoc'] -end - default_tasks = if RUBY_ENGINE == 'truffleruby' %i[test] diff --git a/metrics_sdk/Rakefile b/metrics_sdk/Rakefile index d202bf4c43..5068ab7f00 100644 --- a/metrics_sdk/Rakefile +++ b/metrics_sdk/Rakefile @@ -10,6 +10,7 @@ require 'yard' require 'rubocop/rake_task' RuboCop::RakeTask.new +YARD::Rake::YardocTask.new Rake::TestTask.new :test do |t| t.libs << 'test' @@ -17,10 +18,6 @@ Rake::TestTask.new :test do |t| t.test_files = FileList['test/**/*_test.rb'] end -YARD::Rake::YardocTask.new do |t| - t.stats_options = ['--list-undoc'] -end - default_tasks = if RUBY_ENGINE == 'truffleruby' %i[test] diff --git a/propagator/b3/Rakefile b/propagator/b3/Rakefile index c85a2fd9b4..f6abdf82ad 100644 --- a/propagator/b3/Rakefile +++ b/propagator/b3/Rakefile @@ -10,6 +10,7 @@ require 'yard' require 'rubocop/rake_task' RuboCop::RakeTask.new +YARD::Rake::YardocTask.new Rake::TestTask.new :test do |t| t.libs << 'test' @@ -17,10 +18,6 @@ Rake::TestTask.new :test do |t| t.test_files = FileList['test/**/*_test.rb'] end -YARD::Rake::YardocTask.new do |t| - t.stats_options = ['--list-undoc'] -end - default_tasks = if RUBY_ENGINE == 'truffleruby' %i[test] diff --git a/propagator/jaeger/Rakefile b/propagator/jaeger/Rakefile index c85a2fd9b4..f6abdf82ad 100644 --- a/propagator/jaeger/Rakefile +++ b/propagator/jaeger/Rakefile @@ -10,6 +10,7 @@ require 'yard' require 'rubocop/rake_task' RuboCop::RakeTask.new +YARD::Rake::YardocTask.new Rake::TestTask.new :test do |t| t.libs << 'test' @@ -17,10 +18,6 @@ Rake::TestTask.new :test do |t| t.test_files = FileList['test/**/*_test.rb'] end -YARD::Rake::YardocTask.new do |t| - t.stats_options = ['--list-undoc'] -end - default_tasks = if RUBY_ENGINE == 'truffleruby' %i[test] diff --git a/registry/Rakefile b/registry/Rakefile index c85a2fd9b4..f6abdf82ad 100644 --- a/registry/Rakefile +++ b/registry/Rakefile @@ -10,6 +10,7 @@ require 'yard' require 'rubocop/rake_task' RuboCop::RakeTask.new +YARD::Rake::YardocTask.new Rake::TestTask.new :test do |t| t.libs << 'test' @@ -17,10 +18,6 @@ Rake::TestTask.new :test do |t| t.test_files = FileList['test/**/*_test.rb'] end -YARD::Rake::YardocTask.new do |t| - t.stats_options = ['--list-undoc'] -end - default_tasks = if RUBY_ENGINE == 'truffleruby' %i[test] diff --git a/sdk/Rakefile b/sdk/Rakefile index 62b3a47018..23b02819bb 100644 --- a/sdk/Rakefile +++ b/sdk/Rakefile @@ -10,6 +10,7 @@ require 'yard' require 'rubocop/rake_task' RuboCop::RakeTask.new +YARD::Rake::YardocTask.new Rake::TestTask.new :test do |t| t.libs << 'test' @@ -18,10 +19,6 @@ Rake::TestTask.new :test do |t| t.test_files = FileList['test/**/*_test.rb'] end -YARD::Rake::YardocTask.new do |t| - t.stats_options = ['--list-undoc'] -end - default_tasks = if RUBY_ENGINE == 'truffleruby' %i[test] diff --git a/sdk_experimental/Rakefile b/sdk_experimental/Rakefile index d202bf4c43..5068ab7f00 100644 --- a/sdk_experimental/Rakefile +++ b/sdk_experimental/Rakefile @@ -10,6 +10,7 @@ require 'yard' require 'rubocop/rake_task' RuboCop::RakeTask.new +YARD::Rake::YardocTask.new Rake::TestTask.new :test do |t| t.libs << 'test' @@ -17,10 +18,6 @@ Rake::TestTask.new :test do |t| t.test_files = FileList['test/**/*_test.rb'] end -YARD::Rake::YardocTask.new do |t| - t.stats_options = ['--list-undoc'] -end - default_tasks = if RUBY_ENGINE == 'truffleruby' %i[test] diff --git a/semantic_conventions/Rakefile b/semantic_conventions/Rakefile index b7e5d34bf9..c30e2ed8b5 100644 --- a/semantic_conventions/Rakefile +++ b/semantic_conventions/Rakefile @@ -26,6 +26,7 @@ require 'tmpdir' require 'pathname' RuboCop::RakeTask.new +YARD::Rake::YardocTask.new Rake::TestTask.new :test do |t| t.libs << '../api/lib' @@ -34,10 +35,6 @@ Rake::TestTask.new :test do |t| t.test_files = FileList['test/**/*_test.rb'] end -YARD::Rake::YardocTask.new do |t| - t.stats_options = ['--list-undoc'] -end - default_tasks = if RUBY_ENGINE == 'truffleruby' %i[test] diff --git a/test_helpers/Rakefile b/test_helpers/Rakefile index 62b3a47018..23b02819bb 100644 --- a/test_helpers/Rakefile +++ b/test_helpers/Rakefile @@ -10,6 +10,7 @@ require 'yard' require 'rubocop/rake_task' RuboCop::RakeTask.new +YARD::Rake::YardocTask.new Rake::TestTask.new :test do |t| t.libs << 'test' @@ -18,10 +19,6 @@ Rake::TestTask.new :test do |t| t.test_files = FileList['test/**/*_test.rb'] end -YARD::Rake::YardocTask.new do |t| - t.stats_options = ['--list-undoc'] -end - default_tasks = if RUBY_ENGINE == 'truffleruby' %i[test]