diff --git a/Rakefile b/Rakefile index 460c4237a2..2fd7905bda 100644 --- a/Rakefile +++ b/Rakefile @@ -21,6 +21,7 @@ namespace :each do foreach_gem('bundle exec rake yard') end + desc "Run rubocop in each gem" task :rubocop do foreach_gem('bundle exec rake rubocop') end diff --git a/api/.rubocop.yml b/api/.rubocop.yml index 8b011887ff..57f00774a0 100644 --- a/api/.rubocop.yml +++ b/api/.rubocop.yml @@ -1,28 +1,7 @@ -AllCops: - TargetRubyVersion: "3.0" +inherit_from: ../contrib/rubocop.yml -Lint/UnusedMethodArgument: - Enabled: false -Metrics/AbcSize: - Enabled: false -Metrics/LineLength: - Enabled: false -Metrics/MethodLength: - Max: 20 -Metrics/ParameterLists: - Enabled: false Naming/FileName: Exclude: - "lib/opentelemetry-api.rb" -Lint/MissingSuper: - Enabled: false -Lint/ConstantDefinitionInBlock: - Exclude: - - "test/**/*" -Style/StringConcatenation: - Exclude: - - "test/**/*" -Style/ModuleFunction: - Enabled: false Style/ExplicitBlockArgument: Enabled: false diff --git a/api/lib/opentelemetry/trace/trace_flags.rb b/api/lib/opentelemetry/trace/trace_flags.rb index 888bee1c3b..23998ca043 100644 --- a/api/lib/opentelemetry/trace/trace_flags.rb +++ b/api/lib/opentelemetry/trace/trace_flags.rb @@ -18,7 +18,7 @@ class << self # @param [Integer] flags 8-bit byte of bit flags # @return [TraceFlags] def from_byte(flags) - flags = 0 unless flags & ~0xFF == 0 # rubocop:disable Style/NumericPredicate + flags = 0 unless flags & ~0xFF == 0 new(flags) end diff --git a/common/.rubocop.yml b/common/.rubocop.yml index 56f7188f15..94649e0bec 100644 --- a/common/.rubocop.yml +++ b/common/.rubocop.yml @@ -1,34 +1,11 @@ -AllCops: - TargetRubyVersion: '3.0' - NewCops: disable - SuggestExtensions: false +inherit_from: ../contrib/rubocop.yml Bundler/OrderedGems: Exclude: - gemfiles/**/* -Lint/UnusedMethodArgument: - Enabled: false -Lint/MissingSuper: - Enabled: false -Lint/ConstantDefinitionInBlock: - Exclude: - - "test/**/*" -Style/StringConcatenation: - Exclude: - - "test/**/*" -Metrics/AbcSize: - Enabled: false -Layout/LineLength: - Enabled: false -Metrics/MethodLength: - Max: 20 -Metrics/ParameterLists: - Enabled: false Style/FrozenStringLiteralComment: Exclude: - gemfiles/**/* -Style/ModuleFunction: - Enabled: false Style/StringLiterals: Exclude: - gemfiles/**/* diff --git a/contrib/rubocop.yml b/contrib/rubocop.yml new file mode 100644 index 0000000000..a8a17bd710 --- /dev/null +++ b/contrib/rubocop.yml @@ -0,0 +1,32 @@ +AllCops: + NewCops: disable + SuggestExtensions: false + TargetRubyVersion: "3.0" + Exclude: + - "vendor/**/*" + +Layout/LineLength: + Enabled: false + +Lint/ConstantDefinitionInBlock: + Exclude: + - "test/**/*" +Lint/MissingSuper: + Enabled: false +Lint/UnusedMethodArgument: + Enabled: false + +Metrics/AbcSize: + Enabled: false +Metrics/MethodLength: + Max: 21 +Metrics/ParameterLists: + Enabled: false + +Style/ModuleFunction: + Enabled: false +Style/NumericPredicate: + Enabled: false +Style/StringConcatenation: + Exclude: + - "test/**/*" diff --git a/exporter/jaeger/.rubocop.yml b/exporter/jaeger/.rubocop.yml index 23df02770d..eb2cbe1281 100644 --- a/exporter/jaeger/.rubocop.yml +++ b/exporter/jaeger/.rubocop.yml @@ -1,7 +1,6 @@ +inherit_from: ../../contrib/rubocop.yml + AllCops: - TargetRubyVersion: "3.0" - NewCops: disable - SuggestExtensions: false Exclude: - "thrift/**/*" - "vendor/**/*" @@ -9,29 +8,9 @@ AllCops: Bundler/OrderedGems: Exclude: - gemfiles/**/* -Lint/UnusedMethodArgument: - Enabled: false -Lint/MissingSuper: - Enabled: false -Lint/ConstantDefinitionInBlock: - Exclude: - - "test/**/*" -Style/StringConcatenation: - Exclude: - - "test/**/*" -Metrics/AbcSize: - Enabled: false -Layout/LineLength: - Enabled: false -Metrics/MethodLength: - Max: 20 -Metrics/ParameterLists: - Enabled: false Style/FrozenStringLiteralComment: Exclude: - gemfiles/**/* -Style/ModuleFunction: - Enabled: false Style/StringLiterals: Exclude: - gemfiles/**/* diff --git a/exporter/otlp-common/.rubocop.yml b/exporter/otlp-common/.rubocop.yml index 198f487e73..e4a5d6fa5f 100644 --- a/exporter/otlp-common/.rubocop.yml +++ b/exporter/otlp-common/.rubocop.yml @@ -1,25 +1,17 @@ +inherit_from: ../../contrib/rubocop.yml + AllCops: - TargetRubyVersion: "3.0" Exclude: - "lib/opentelemetry/proto/**/*" - "vendor/**/*" -Lint/UnusedMethodArgument: - Enabled: false -Metrics/AbcSize: - Enabled: false -Metrics/LineLength: +Metrics/CyclomaticComplexity: Enabled: false Metrics/MethodLength: Enabled: false Metrics/PerceivedComplexity: Enabled: false -Metrics/CyclomaticComplexity: - Enabled: false -Metrics/ParameterLists: - Enabled: false + Naming/FileName: Exclude: - "lib/opentelemetry-exporter-otlp-common.rb" -Style/ModuleFunction: - Enabled: false diff --git a/exporter/otlp-common/test/.rubocop.yml b/exporter/otlp-common/test/.rubocop.yml index 7d5a8cc7a6..dd94258585 100644 --- a/exporter/otlp-common/test/.rubocop.yml +++ b/exporter/otlp-common/test/.rubocop.yml @@ -1,8 +1,4 @@ inherit_from: ../.rubocop.yml -Metrics/AbcSize: - Enabled: false Metrics/BlockLength: Enabled: false -Metrics/LineLength: - Enabled: false diff --git a/exporter/otlp-grpc/.rubocop.yml b/exporter/otlp-grpc/.rubocop.yml index 1b7bea565e..aad65a092f 100644 --- a/exporter/otlp-grpc/.rubocop.yml +++ b/exporter/otlp-grpc/.rubocop.yml @@ -1,18 +1,5 @@ -AllCops: - TargetRubyVersion: "3.0" +inherit_from: ../../contrib/rubocop.yml -Lint/UnusedMethodArgument: - Enabled: false -Metrics/AbcSize: - Enabled: false -Metrics/LineLength: - Enabled: false -Metrics/MethodLength: - Max: 21 -Metrics/ParameterLists: - Enabled: false Naming/FileName: Exclude: - "lib/opentelemetry-exporter-otlp-grpc.rb" -Style/ModuleFunction: - Enabled: false diff --git a/exporter/otlp-grpc/test/.rubocop.yml b/exporter/otlp-grpc/test/.rubocop.yml index 6979250102..f6e42b9759 100644 --- a/exporter/otlp-grpc/test/.rubocop.yml +++ b/exporter/otlp-grpc/test/.rubocop.yml @@ -1,11 +1,7 @@ inherit_from: ../.rubocop.yml -Metrics/AbcSize: - Enabled: false Metrics/BlockLength: Enabled: false -Metrics/LineLength: - Enabled: false Style/MethodCallWithoutArgsParentheses: Exclude: - 'opentelemetry/exporter/otlp/grpc/exporter_test.rb' diff --git a/exporter/otlp-http/.rubocop.yml b/exporter/otlp-http/.rubocop.yml index 6875bbc050..4f07d8989f 100644 --- a/exporter/otlp-http/.rubocop.yml +++ b/exporter/otlp-http/.rubocop.yml @@ -1,25 +1,14 @@ +inherit_from: ../../contrib/rubocop.yml + AllCops: - TargetRubyVersion: "3.0" Exclude: - "lib/opentelemetry/proto/**/*" - "vendor/**/*" -Lint/UnusedMethodArgument: - Enabled: false -Metrics/AbcSize: - Enabled: false Metrics/CyclomaticComplexity: Enabled: false Metrics/PerceivedComplexity: Enabled: false -Metrics/LineLength: - Enabled: false -Metrics/MethodLength: - Max: 21 -Metrics/ParameterLists: - Enabled: false Naming/FileName: Exclude: - "lib/opentelemetry-exporter-otlp-http.rb" -Style/ModuleFunction: - Enabled: false diff --git a/exporter/otlp-http/test/.rubocop.yml b/exporter/otlp-http/test/.rubocop.yml index 5152ce1ad9..e875aabf3a 100644 --- a/exporter/otlp-http/test/.rubocop.yml +++ b/exporter/otlp-http/test/.rubocop.yml @@ -1,11 +1,7 @@ inherit_from: ../.rubocop.yml -Metrics/AbcSize: - Enabled: false Metrics/BlockLength: Enabled: false -Metrics/LineLength: - Enabled: false Style/MethodCallWithoutArgsParentheses: Exclude: - 'opentelemetry/exporter/otlp/http/exporter_test.rb' diff --git a/exporter/otlp/.rubocop.yml b/exporter/otlp/.rubocop.yml index 46d464b94a..8206eb72b1 100644 --- a/exporter/otlp/.rubocop.yml +++ b/exporter/otlp/.rubocop.yml @@ -1,7 +1,6 @@ +inherit_from: ../../contrib/rubocop.yml + AllCops: - TargetRubyVersion: "3.0" - NewCops: disable - SuggestExtensions: false Exclude: - "lib/opentelemetry/proto/**/*" - "vendor/**/*" @@ -9,24 +8,6 @@ AllCops: Bundler/OrderedGems: Exclude: - gemfiles/**/* -Lint/UnusedMethodArgument: - Enabled: false -Lint/MissingSuper: - Enabled: false -Lint/ConstantDefinitionInBlock: - Exclude: - - "test/**/*" -Style/StringConcatenation: - Exclude: - - "test/**/*" -Metrics/AbcSize: - Enabled: false -Layout/LineLength: - Enabled: false -Metrics/MethodLength: - Max: 20 -Metrics/ParameterLists: - Enabled: false Style/FrozenStringLiteralComment: Exclude: - gemfiles/**/* diff --git a/exporter/otlp/lib/opentelemetry/exporter/otlp/exporter.rb b/exporter/otlp/lib/opentelemetry/exporter/otlp/exporter.rb index 0944aefc93..55d8fae054 100644 --- a/exporter/otlp/lib/opentelemetry/exporter/otlp/exporter.rb +++ b/exporter/otlp/lib/opentelemetry/exporter/otlp/exporter.rb @@ -244,7 +244,7 @@ def measure_request_duration end end - def backoff?(retry_count:, reason:, retry_after: nil) # rubocop:disable Metrics/CyclomaticComplexity, Metrics/MethodLength, Metrics/PerceivedComplexity + def backoff?(retry_count:, reason:, retry_after: nil) # rubocop:disable Metrics/CyclomaticComplexity, Metrics/PerceivedComplexity @metrics_reporter.add_to_counter('otel.otlp_exporter.failure', labels: { 'reason' => reason }) return false if retry_count > RETRY_COUNT diff --git a/exporter/zipkin/.rubocop.yml b/exporter/zipkin/.rubocop.yml index c23f04c6f0..6cb190171d 100644 --- a/exporter/zipkin/.rubocop.yml +++ b/exporter/zipkin/.rubocop.yml @@ -1,17 +1,12 @@ -inherit_from: .rubocop_todo.yml +inherit_from: + - ../../contrib/rubocop.yml + - .rubocop_todo.yml AllCops: - TargetRubyVersion: "3.0" Exclude: - "thrift/**/*" - "vendor/**/*" -Lint/UnusedMethodArgument: - Enabled: false -Metrics/AbcSize: - Enabled: false -Metrics/LineLength: - Enabled: false Metrics/ModuleLength: Max: 130 Metrics/MethodLength: @@ -20,12 +15,8 @@ Metrics/PerceivedComplexity: Enabled: false Metrics/CyclomaticComplexity: Enabled: false -Metrics/ParameterLists: - Enabled: false Naming/FileName: Exclude: - "lib/opentelemetry-exporter-zipkin.rb" Style/ExplicitBlockArgument: Enabled: false -Style/ModuleFunction: - Enabled: false diff --git a/exporter/zipkin/test/.rubocop.yml b/exporter/zipkin/test/.rubocop.yml index 7d5a8cc7a6..dd94258585 100644 --- a/exporter/zipkin/test/.rubocop.yml +++ b/exporter/zipkin/test/.rubocop.yml @@ -1,8 +1,4 @@ inherit_from: ../.rubocop.yml -Metrics/AbcSize: - Enabled: false Metrics/BlockLength: Enabled: false -Metrics/LineLength: - Enabled: false diff --git a/logs_api/.rubocop.yml b/logs_api/.rubocop.yml index 9113b35375..28ba0fcc75 100644 --- a/logs_api/.rubocop.yml +++ b/logs_api/.rubocop.yml @@ -1,24 +1,12 @@ -# inherit_from: .rubocop_todo.yml +inherit_from: ../contrib/rubocop.yml -AllCops: - TargetRubyVersion: '3.0' - -Lint/UnusedMethodArgument: - Enabled: false -Metrics/AbcSize: - Enabled: false -Metrics/LineLength: - Enabled: false Metrics/MethodLength: Max: 50 Metrics/PerceivedComplexity: Max: 30 Metrics/CyclomaticComplexity: Max: 20 -Metrics/ParameterLists: - Enabled: false + Naming/FileName: Exclude: - "lib/opentelemetry-logs-api.rb" -Style/ModuleFunction: - Enabled: false diff --git a/logs_api/test/.rubocop.yml b/logs_api/test/.rubocop.yml index dbc7df36ef..e9e47204dc 100644 --- a/logs_api/test/.rubocop.yml +++ b/logs_api/test/.rubocop.yml @@ -1,8 +1,9 @@ inherit_from: ../.rubocop.yml -Metrics/BlockLength: - Enabled: false -Metrics/LineLength: +Layout/LineLength: Enabled: false + Metrics/AbcSize: Enabled: false +Metrics/BlockLength: + Enabled: false diff --git a/logs_sdk/.rubocop.yml b/logs_sdk/.rubocop.yml index 7112b8c665..cd6088799c 100644 --- a/logs_sdk/.rubocop.yml +++ b/logs_sdk/.rubocop.yml @@ -1,25 +1,16 @@ +inherit_from: ../contrib/rubocop.yml + AllCops: - TargetRubyVersion: '3.0' NewCops: disable - SuggestExtensions: false -Lint/MissingSuper: - Enabled: false -Lint/UnusedMethodArgument: - Enabled: false + Metrics/AbcSize: Max: 30 -Layout/LineLength: - Enabled: false Metrics/MethodLength: Max: 50 Metrics/PerceivedComplexity: Max: 30 Metrics/CyclomaticComplexity: Max: 20 -Metrics/ParameterLists: - Enabled: false Naming/FileName: Exclude: - 'lib/opentelemetry-logs-sdk.rb' -Style/ModuleFunction: - Enabled: false diff --git a/logs_sdk/lib/opentelemetry/sdk/logs/logger_provider.rb b/logs_sdk/lib/opentelemetry/sdk/logs/logger_provider.rb index d284a634c4..756811c206 100644 --- a/logs_sdk/lib/opentelemetry/sdk/logs/logger_provider.rb +++ b/logs_sdk/lib/opentelemetry/sdk/logs/logger_provider.rb @@ -43,7 +43,7 @@ def logger(name:, version: nil) "invalid name. Name provided: #{name.inspect}") end - Logger.new(name, version, self) + Logger.new(name, version, self) end # Adds a new log record processor to this LoggerProvider's diff --git a/logs_sdk/test/.rubocop.yml b/logs_sdk/test/.rubocop.yml index dbc7df36ef..a993198759 100644 --- a/logs_sdk/test/.rubocop.yml +++ b/logs_sdk/test/.rubocop.yml @@ -2,7 +2,5 @@ inherit_from: ../.rubocop.yml Metrics/BlockLength: Enabled: false -Metrics/LineLength: - Enabled: false Metrics/AbcSize: Enabled: false diff --git a/logs_sdk/test/opentelemetry/sdk/logs/logger_provider_test.rb b/logs_sdk/test/opentelemetry/sdk/logs/logger_provider_test.rb index 30313eab17..e37cdfac5f 100644 --- a/logs_sdk/test/opentelemetry/sdk/logs/logger_provider_test.rb +++ b/logs_sdk/test/opentelemetry/sdk/logs/logger_provider_test.rb @@ -46,7 +46,7 @@ OpenTelemetry::TestHelpers.with_test_logger do |log_stream| logger_provider.add_log_record_processor(mock_log_record_processor) assert_match(/calling LoggerProvider#add_log_record_processor after shutdown/, - log_stream.string) + log_stream.string) end end end diff --git a/metrics_api/.rubocop.yml b/metrics_api/.rubocop.yml index 12b6d47a32..c7539fe342 100644 --- a/metrics_api/.rubocop.yml +++ b/metrics_api/.rubocop.yml @@ -1,24 +1,13 @@ -inherit_from: .rubocop_todo.yml +inherit_from: + - ../contrib/rubocop.yml + - .rubocop_todo.yml -AllCops: - TargetRubyVersion: "3.0" - -Lint/UnusedMethodArgument: - Enabled: false -Metrics/AbcSize: - Enabled: false -Metrics/LineLength: - Enabled: false Metrics/MethodLength: Max: 50 Metrics/PerceivedComplexity: Max: 30 Metrics/CyclomaticComplexity: Max: 20 -Metrics/ParameterLists: - Enabled: false Naming/FileName: Exclude: - "lib/opentelemetry-metrics-api.rb" -Style/ModuleFunction: - Enabled: false diff --git a/metrics_api/test/.rubocop.yml b/metrics_api/test/.rubocop.yml index dbc7df36ef..dd94258585 100644 --- a/metrics_api/test/.rubocop.yml +++ b/metrics_api/test/.rubocop.yml @@ -2,7 +2,3 @@ inherit_from: ../.rubocop.yml Metrics/BlockLength: Enabled: false -Metrics/LineLength: - Enabled: false -Metrics/AbcSize: - Enabled: false diff --git a/metrics_sdk/.rubocop.yml b/metrics_sdk/.rubocop.yml index a2d72646d2..3c6f491adc 100644 --- a/metrics_sdk/.rubocop.yml +++ b/metrics_sdk/.rubocop.yml @@ -1,25 +1,13 @@ -AllCops: - TargetRubyVersion: "3.0" - NewCops: disable - SuggestExtensions: false -Lint/MissingSuper: - Enabled: false -Lint/UnusedMethodArgument: - Enabled: false +inherit_from: ../contrib/rubocop.yml + Metrics/AbcSize: Max: 30 -Layout/LineLength: - Enabled: false Metrics/MethodLength: Max: 50 Metrics/PerceivedComplexity: Max: 30 Metrics/CyclomaticComplexity: Max: 20 -Metrics/ParameterLists: - Enabled: false Naming/FileName: Exclude: - "lib/opentelemetry-metrics-sdk.rb" -Style/ModuleFunction: - Enabled: false diff --git a/propagator/b3/.rubocop.yml b/propagator/b3/.rubocop.yml index a050731b72..2f284d04e9 100644 --- a/propagator/b3/.rubocop.yml +++ b/propagator/b3/.rubocop.yml @@ -1,17 +1,5 @@ -AllCops: - TargetRubyVersion: '3.0' -Lint/UnusedMethodArgument: - Enabled: false -Metrics/AbcSize: - Enabled: false -Metrics/LineLength: - Enabled: false -Metrics/MethodLength: - Max: 20 -Metrics/ParameterLists: - Enabled: false +inherit_from: ../../contrib/rubocop.yml + Naming/FileName: Exclude: - 'lib/opentelemetry-propagator-b3.rb' -Style/ModuleFunction: - Enabled: false diff --git a/propagator/jaeger/.rubocop.yml b/propagator/jaeger/.rubocop.yml index ab3c210f5e..8d589790b2 100644 --- a/propagator/jaeger/.rubocop.yml +++ b/propagator/jaeger/.rubocop.yml @@ -1,23 +1,11 @@ -inherit_from: .rubocop_todo.yml +inherit_from: + - ../../contrib/rubocop.yml + - .rubocop_todo.yml -AllCops: - TargetRubyVersion: '3.0' -Lint/UnusedMethodArgument: - Enabled: false -Metrics/AbcSize: - Enabled: false Metrics/BlockLength: Exclude: - 'opentelemetry-propagator-jaeger.gemspec' - 'test/**/*_test.rb' -Metrics/LineLength: - Enabled: false -Metrics/MethodLength: - Max: 20 -Metrics/ParameterLists: - Enabled: false Naming/FileName: Exclude: - 'lib/opentelemetry-propagator-jaeger.rb' -Style/ModuleFunction: - Enabled: false diff --git a/registry/.rubocop.yml b/registry/.rubocop.yml index b8b3fc8885..0073a8ee72 100644 --- a/registry/.rubocop.yml +++ b/registry/.rubocop.yml @@ -1,34 +1,11 @@ -AllCops: - TargetRubyVersion: "3.0" - NewCops: disable - SuggestExtensions: false +inherit_from: ../contrib/rubocop.yml Bundler/OrderedGems: Exclude: - gemfiles/**/* -Lint/UnusedMethodArgument: - Enabled: false -Lint/MissingSuper: - Enabled: false -Lint/ConstantDefinitionInBlock: - Exclude: - - "test/**/*" -Style/StringConcatenation: - Exclude: - - "test/**/*" -Metrics/AbcSize: - Enabled: false -Layout/LineLength: - Enabled: false -Metrics/MethodLength: - Max: 20 -Metrics/ParameterLists: - Enabled: false Style/FrozenStringLiteralComment: Exclude: - gemfiles/**/* -Style/ModuleFunction: - Enabled: false Style/StringLiterals: Exclude: - "**/gemfiles/**/*" diff --git a/sdk/.rubocop.yml b/sdk/.rubocop.yml index 26e0209d27..d37dda60aa 100644 --- a/sdk/.rubocop.yml +++ b/sdk/.rubocop.yml @@ -1,24 +1,10 @@ -inherit_from: .rubocop_todo.yml +inherit_from: + - ../contrib/rubocop.yml + - .rubocop_todo.yml -AllCops: - TargetRubyVersion: "3.0" - -Lint/UnusedMethodArgument: - Enabled: false -Metrics/AbcSize: - Enabled: false -Metrics/LineLength: - Enabled: false -Metrics/MethodLength: - Max: 21 -Metrics/ParameterLists: - Enabled: false Naming/FileName: Exclude: - "lib/opentelemetry-sdk.rb" + Style/ExplicitBlockArgument: Enabled: false -Style/ModuleFunction: - Enabled: false -Style/NumericPredicate: - Enabled: false diff --git a/sdk/test/.rubocop.yml b/sdk/test/.rubocop.yml index dbc7df36ef..dd94258585 100644 --- a/sdk/test/.rubocop.yml +++ b/sdk/test/.rubocop.yml @@ -2,7 +2,3 @@ inherit_from: ../.rubocop.yml Metrics/BlockLength: Enabled: false -Metrics/LineLength: - Enabled: false -Metrics/AbcSize: - Enabled: false diff --git a/sdk_experimental/.rubocop.yml b/sdk_experimental/.rubocop.yml index b3177769dc..31998db8e6 100644 --- a/sdk_experimental/.rubocop.yml +++ b/sdk_experimental/.rubocop.yml @@ -1,24 +1,16 @@ -AllCops: - TargetRubyVersion: "3.0" +inherit_from: ../contrib/rubocop.yml -Lint/UnusedMethodArgument: - Enabled: false -Naming/MethodParameterName: - Enabled: false Metrics/AbcSize: Max: 30 -Metrics/LineLength: - Enabled: false Metrics/MethodLength: Max: 50 Metrics/PerceivedComplexity: Max: 30 Metrics/CyclomaticComplexity: Max: 20 -Metrics/ParameterLists: - Enabled: false + Naming/FileName: Exclude: - "lib/opentelemetry-sdk-experimental.rb" -Style/ModuleFunction: +Naming/MethodParameterName: Enabled: false diff --git a/sdk_experimental/test/.rubocop.yml b/sdk_experimental/test/.rubocop.yml index 4c8c0d91ed..dd94258585 100644 --- a/sdk_experimental/test/.rubocop.yml +++ b/sdk_experimental/test/.rubocop.yml @@ -2,5 +2,3 @@ inherit_from: ../.rubocop.yml Metrics/BlockLength: Enabled: false -Metrics/LineLength: - Enabled: false diff --git a/semantic_conventions/.rubocop.yml b/semantic_conventions/.rubocop.yml index b97ef9cf96..e89d75b460 100644 --- a/semantic_conventions/.rubocop.yml +++ b/semantic_conventions/.rubocop.yml @@ -1,5 +1,6 @@ +inherit_from: ../contrib/rubocop.yml + AllCops: - TargetRubyVersion: '3.0' NewCops: enable Bundler/OrderedGems: @@ -13,26 +14,17 @@ Gemspec/RequireMFA: Layout/EmptyLinesAroundModuleBody: Enabled: false -Layout/LineLength: - Enabled: false Layout/TrailingEmptyLines: Enabled: false Layout/TrailingWhitespace: Enabled: false -Lint/UnusedMethodArgument: - Enabled: false - -Metrics/AbcSize: - Enabled: false Metrics/BlockLength: Enabled: false Metrics/MethodLength: Max: 20 Metrics/ModuleLength: Enabled: false -Metrics/ParameterLists: - Enabled: false Naming/FileName: Exclude: @@ -41,8 +33,6 @@ Naming/FileName: Style/FrozenStringLiteralComment: Exclude: - gemfiles/**/* -Style/ModuleFunction: - Enabled: false Style/StringLiterals: Exclude: - gemfiles/**/* diff --git a/test_helpers/.rubocop.yml b/test_helpers/.rubocop.yml index b1bf1f3e98..ce36ddc2b6 100644 --- a/test_helpers/.rubocop.yml +++ b/test_helpers/.rubocop.yml @@ -1,20 +1,8 @@ -AllCops: - TargetRubyVersion: "3.0" +inherit_from: ../contrib/rubocop.yml -Lint/UnusedMethodArgument: - Enabled: false -Layout/LineLength: - Enabled: false -Metrics/AbcSize: - Enabled: false -Metrics/MethodLength: - Max: 21 -Metrics/ParameterLists: +Gemspec/RequireMFA: Enabled: false + Naming/FileName: Exclude: - "lib/opentelemetry-test-helpers.rb" -Style/ModuleFunction: - Enabled: false -Gemspec/RequireMFA: - Enabled: false