From 1514898f13b1f50b6014c00904384b56e24ceb03 Mon Sep 17 00:00:00 2001 From: Andrey Date: Mon, 3 Jun 2024 10:46:39 +0200 Subject: [PATCH] ignore percent-we rule for specs because many lists of test name contain spaces --- .github/workflows/publish.yml | 2 +- spec/datadog/ci/test_visibility/context/global_spec.rb | 2 +- spec/support/span_helpers.rb | 2 +- static-analysis.datadog.yml | 5 +++++ 4 files changed, 8 insertions(+), 3 deletions(-) diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml index 9f4522c4..f5a9fc67 100644 --- a/.github/workflows/publish.yml +++ b/.github/workflows/publish.yml @@ -21,5 +21,5 @@ jobs: uses: ruby/setup-ruby@v1 with: bundler-cache: true - ruby-version: '3.2.4' + ruby-version: '3.3' - uses: rubygems/release-gem@v1 diff --git a/spec/datadog/ci/test_visibility/context/global_spec.rb b/spec/datadog/ci/test_visibility/context/global_spec.rb index 72cc669f..4fcb0fc5 100644 --- a/spec/datadog/ci/test_visibility/context/global_spec.rb +++ b/spec/datadog/ci/test_visibility/context/global_spec.rb @@ -207,7 +207,7 @@ context "when multiple test suites are running" do before do - ["suite1", "suite2"].each do |test_suite_name| + %w[suite1 suite2].each do |test_suite_name| subject.fetch_or_activate_test_suite(test_suite_name) do Datadog::CI::TestSuite.new(double(Datadog::Tracing::SpanOperation)) end diff --git a/spec/support/span_helpers.rb b/spec/support/span_helpers.rb index d3d81190..58515b48 100644 --- a/spec/support/span_helpers.rb +++ b/spec/support/span_helpers.rb @@ -118,7 +118,7 @@ def description_of(actual) # rubocop:disable Lint/NestedMethodDefinition end end - ["skip", "pass", "fail"].each do |status| + %w[skip pass fail].each do |status| RSpec::Matchers.define "have_#{status}_status" do match do |span| @actual = span.get_tag(Datadog::CI::Ext::Test::TAG_STATUS) diff --git a/static-analysis.datadog.yml b/static-analysis.datadog.yml index a7108546..e07f4abf 100644 --- a/static-analysis.datadog.yml +++ b/static-analysis.datadog.yml @@ -10,3 +10,8 @@ rulesets: hash-fetch: ignore: - spec/**/* + rules: + percent-w: + ignore: + - spec/**/* +