Skip to content

Fix RuboCop offenses in several ErrorTracking specs

Peter Leitzen requested to merge pl-error-tracking-rubocop-offenses into master

What does this MR do and why?

This MR resolves current and upcoming RuboCop 👮 rules in several Category:Error Tracking specs.

Extracted from !85907 (merged).

Please don't squash commits.

Screenshots or screen recordings

n/a

How to set up and validate locally

merge_base=$(git merge-base pl-error-tracking-rubocop-offenses origin/master)
changed=$(git diff --name-only $merge_base | grep -v yml)

$ REVEAL_RUBOCOP_TODO=1 exec rubocop $changed

Inspecting 14 files
.............C

Offenses:

spec/support/shared_contexts/sentry_error_tracking_shared_context.rb:3:22: C: RSpec/ContextWording: Start context description with 'when', 'with', or 'without'.
RSpec.shared_context 'sentry error tracking context' do
                     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

14 files inspected, 1 offense detected

$ REVEAL_RUBOCOP_TODO=0 bundle exec rubocop $changed
Inspecting 14 files
..............

14 files inspected, no offenses detected

bin/rspec $(tff -f tests.yml $changed)
.........................................................................................

Finished in 18.18 seconds (files took 8.61 seconds to load)
89 examples, 0 failures

MR acceptance checklist

This checklist encourages us to confirm any changes have been analyzed to reduce risks in quality, performance, reliability, security, and maintainability.

Edited by Peter Leitzen

Merge request reports