From 38fc8185b690d9f2612f1b799bcccfc9fa91ac90 Mon Sep 17 00:00:00 2001 From: Kayla Reopelle Date: Wed, 11 Sep 2024 22:27:22 -0700 Subject: [PATCH] style: Rubocop --- exporter/otlp-logs/.rubocop.yml | 15 ++++++++++++++- exporter/otlp-logs/test/.rubocop.yml | 8 -------- .../exporter/otlp/logs_exporter_test.rb | 9 ++++----- 3 files changed, 18 insertions(+), 14 deletions(-) delete mode 100644 exporter/otlp-logs/test/.rubocop.yml diff --git a/exporter/otlp-logs/.rubocop.yml b/exporter/otlp-logs/.rubocop.yml index fc7d5f3f9..5c3cff545 100644 --- a/exporter/otlp-logs/.rubocop.yml +++ b/exporter/otlp-logs/.rubocop.yml @@ -1,6 +1,19 @@ inherit_from: - ../../contrib/rubocop.yml +AllCops: + Exclude: + - "lib/opentelemetry/proto/**/*" + - "vendor/**/*" + Naming/FileName: Exclude: - - "lib/opentelemetry-exporter-otlp-logs.rb" + - lib/opentelemetry-exporter-otlp-logs.rb +Style/StringLiterals: + Exclude: + - gemfiles/**/* +Style/FrozenStringLiteralComment: + Exclude: + - gemfiles/**/* +Metrics/BlockLength: + Enabled: false diff --git a/exporter/otlp-logs/test/.rubocop.yml b/exporter/otlp-logs/test/.rubocop.yml deleted file mode 100644 index 3ceaea6df..000000000 --- a/exporter/otlp-logs/test/.rubocop.yml +++ /dev/null @@ -1,8 +0,0 @@ -inherit_from: ../.rubocop.yml - -Style/MethodCallWithoutArgsParentheses: - Exclude: - - 'opentelemetry/exporter/otlp/exporter_test.rb' -Style/BlockDelimiters: - Exclude: - - 'opentelemetry/exporter/otlp/exporter_test.rb' diff --git a/exporter/otlp-logs/test/opentelemetry/exporter/otlp/logs_exporter_test.rb b/exporter/otlp-logs/test/opentelemetry/exporter/otlp/logs_exporter_test.rb index b94c1f949..d94bb01d0 100644 --- a/exporter/otlp-logs/test/opentelemetry/exporter/otlp/logs_exporter_test.rb +++ b/exporter/otlp-logs/test/opentelemetry/exporter/otlp/logs_exporter_test.rb @@ -311,7 +311,6 @@ describe 'ssl_verify_mode:' do it 'can be set to VERIFY_NONE by an envvar' do exp = OpenTelemetry::TestHelpers.with_env('OTEL_RUBY_EXPORTER_OTLP_SSL_VERIFY_NONE' => 'true') do - binding.irb OpenTelemetry::Exporter::OTLP::LogsExporter.new end http = exp.instance_variable_get(:@http) @@ -561,7 +560,7 @@ severity_text: 'DEBUG', severity_number: 5, body: 'log_1', - attributes: { 'b'=> true }, + attributes: { 'b' => true }, trace_id: OpenTelemetry::Trace.generate_trace_id, span_id: OpenTelemetry::Trace.generate_span_id, trace_flags: OpenTelemetry::Trace::TraceFlags::DEFAULT, @@ -574,7 +573,7 @@ severity_text: 'WARN', severity_number: 13, body: 'log_1', - attributes: { 'a'=> false }, + attributes: { 'a' => false }, trace_id: OpenTelemetry::Trace.generate_trace_id, span_id: OpenTelemetry::Trace.generate_span_id, trace_flags: OpenTelemetry::Trace::TraceFlags::DEFAULT, @@ -587,7 +586,7 @@ severity_text: 'ERROR', severity_number: 17, body: 'log_1', - attributes: { 'c'=> 12345 }, + attributes: { 'c' => 12_345 }, trace_id: OpenTelemetry::Trace.generate_trace_id, span_id: OpenTelemetry::Trace.generate_span_id, trace_flags: OpenTelemetry::Trace::TraceFlags::DEFAULT, @@ -661,7 +660,7 @@ severity_text: lr3[:severity_text], body: Opentelemetry::Proto::Common::V1::AnyValue.new(string_value: lr3[:body]), attributes: [ - Opentelemetry::Proto::Common::V1::KeyValue.new(key: 'c', value: Opentelemetry::Proto::Common::V1::AnyValue.new(int_value: 12345)) + Opentelemetry::Proto::Common::V1::KeyValue.new(key: 'c', value: Opentelemetry::Proto::Common::V1::AnyValue.new(int_value: 12_345)) ], dropped_attributes_count: 0, flags: lr3[:trace_flags].instance_variable_get(:@flags),