Gitlab/MarkUsedFeatureFlags: Print debug information on STDERR
What does this MR do and why?
Printing on STDOUT can conflict with custom RuboCop formatters so it's safer to print to STDERR. Needed for !95366 (merged).
Additionally, we only print if rubocop -d
is used instead of ENV['CI']
previously.
This also disables debugging on CI by default and reduces noise. See !95366 (comment 1066808464).
Screenshots or screen recordings
Debug | Before | *After |
---|---|---|
ON | ||
OFF |
How to set up and validate locally
## Before
CI=1 bundle exec rubocop -C false --only Gitlab/MarkUsedFeatureFlags app/models/concerns/limitable.rb
bundle exec rubocop -C false --only Gitlab/MarkUsedFeatureFlags app/models/concerns/limitable.rb
## After
bundle exec rubocop -d -C false --only Gitlab/MarkUsedFeatureFlags app/models/concerns/limitable.rb
bundle exec rubocop -C false --only Gitlab/MarkUsedFeatureFlags app/models/concerns/limitable.rb
MR acceptance checklist
This checklist encourages us to confirm any changes have been analyzed to reduce risks in quality, performance, reliability, security, and maintainability.
-
I have evaluated the MR acceptance checklist for this MR.
Edited by Peter Leitzen