You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I've been working on the blog post update, and found that it's not possible to migrate the project from .rubocop_todo.yml to standardrb without re-generating the TODO file with standard.
I expect running standardrb to show no errors, but:
$ be standardrb
Inspecting 1 file
C
Offenses:
a.rb:2:3: C: [Correctable] Style/SingleLineMethods: Avoid single-line method definitions.
def foo;'bar'; end
^^^^^^^^^^^^^^^^^^^
a.rb:2:12: C: [Correctable] Style/StringLiterals: Prefer double-quoted strings unless you need single quotes to avoid extra backslashes for escaping.
def foo;'bar'; end
^^^^^
Running rubocop works as expected: 1 file, no offenses detected.
Possible solutions
I think, it's okay to instruct users to run standardrb --generate-todo instead of loading the existing .rubocop_todo.yml. Thus, just a note in the documentation could be enough.
However, it's not clear why extending the configuration doesn't work in this case. Maybe, something related to the inherit_mode?
The text was updated successfully, but these errors were encountered:
Standard: 1.24.3
RuboCop: 1.44.1
I've been working on the blog post update, and found that it's not possible to migrate the project from
.rubocop_todo.yml
tostandardrb
without re-generating the TODO file withstandard
.Reproduction script
Given the source code file (
a.rb
):And the following configuration files:
The TODO file has been generated with RuboCop and contains:
Adding
.rubocop_todo.yml
has no effectI expect running
standardrb
to show no errors, but:Running
rubocop
works as expected:1 file, no offenses detected
.Possible solutions
I think, it's okay to instruct users to run
standardrb --generate-todo
instead of loading the existing.rubocop_todo.yml
. Thus, just a note in the documentation could be enough.However, it's not clear why extending the configuration doesn't work in this case. Maybe, something related to the
inherit_mode
?The text was updated successfully, but these errors were encountered: