profile
viewpoint

Ask questionsOld specs need love

Many cop specs still use inspect_source or autocorrect_source. We'll like to deprecated this (see #8003), so they should be refactored to use expect_offense + expect_correction instead (I'd love to have an even nicer API for this).

rubocop/rubocop

Answer questions marcandre

spec/support/multiline_literal_brace_layout_trailing_comma_examples.rb

I don't see an issue. If the failure message is different, ^{foo} [...] should match any failure with indent with the length of foo.

spec/support/alignment_examples.rb

I don't see an issue, the two cases should be combined and expect_correction used instead of autocorrect_source.

Or am I missing something?

useful!
source:https://uonfu.com/
answerer
Marc-André Lafortune marcandre Montreal, Canada blog.marc-andre.ca ♥ Ruby ♥ Elixir ♥ TypeScript ♥ Core team of Ruby, RuboCop. Author of Backports, ractor-server Maintainer of Parsley.js, Featherlight.js.
Github User Rank List