Draft: Add RuboCop rule RSpec/SpecHelperTag
What does this MR do and why?
This rule tags spec with helper: :fast_spec
if a spec require
fast_spec_helper
. Otherwise it will remove this tag.
This might be useful to group specs with knapsack.
Refs #350700 (comment 1067272389)
Example
$ be rubocop --only RSpec/SpecHelperTag spec/haml_lint/linter/no_plain_nodes_spec.rb
Inspecting 1 file
C
Offenses:
spec/haml_lint/linter/no_plain_nodes_spec.rb:9:1: C: RSpec/SpecHelperTag: Add spec tag helper: :fast_spec.
RSpec.describe HamlLint::Linter::NoPlainNodes do ...
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
1 file inspected, 1 offense detected, 1 offense auto-correctable
Draft?
-
Add auto-correction to fix specs - [-] Add development guidelines
How to set up and validate locally
bin/rake rubocop:todo:generate[RSpec/SpecHelperTag]
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