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
RSpec.describe Foo do
it "can bar" do
foo = Foo.new
# Not correct
expect(foo.bar).to eq(
"First line\n" \
)
# Correct
expect(foo.bar).to eq(
"First line\n" \
)
end
end
gives me
spec/foo_spec.rb:6:26: C: Indent the first parameter one step more than the previous line.
"First line\n" \
^^^^^^^^^^^^^^
As far as I can tell, RuboCop is working as intended when it complains about the "Not correct" version, but the message is somewhat uninformative. Indent the parameter compared to what in the previous line? I assumed it was compared to the eq method name, not the expect method name.
Maybe you could indicate the column number expected versus the column number in the actual code, or highlight what in the previous line was being looked at.
The text was updated successfully, but these errors were encountered:
agrimm
changed the title
FirstParameterIndentation gives an somewhat uninformative message
FirstParameterIndentation gives a somewhat uninformative message
Mar 11, 2015
The following code
gives me
As far as I can tell, RuboCop is working as intended when it complains about the "Not correct" version, but the message is somewhat uninformative. Indent the parameter compared to what in the previous line? I assumed it was compared to the
eq
method name, not theexpect
method name.Maybe you could indicate the column number expected versus the column number in the actual code, or highlight what in the previous line was being looked at.
The text was updated successfully, but these errors were encountered: