Skip to content
This repository has been archived by the owner on Aug 1, 2020. It is now read-only.

Do...end block closing not detected when condition is present after the end keyword #128

Open
gsx opened this issue Jan 30, 2013 · 1 comment

Comments

@gsx
Copy link

gsx commented Jan 30, 2013

[1, 2, 3].each do |i|
end if false
puts 'foo'

The above code produces the following output:

# Problems:
#  1.
#    * position:  3:0
#    * property:  indentation_spaces
#    * message:   Line is indented to column 0, but should be at 2.

Tailor clearly does not detect that the block has ended because of the additional if false. Maybe writing conditions like this is not desirable coding style, but then tailor should detect it specifically.

@turboladen
Copy link
Owner

Agreed, tailor should detect this.

On Jan 30, 2013, at 11:38, "Gábor Szarka" notifications@github.com wrote:

[1, 2, 3].each do |i|
end if false
puts 'foo'

The above code produces the following output:

Problems:

1.

* position: 3:0

* property: indentation_spaces

* message: Line is indented to column 0, but should be at 2.

Tailor clearly does not detect that the block has ended because of the
additional if false. Maybe writing conditions like this is not desirable
coding style, but then tailor should detect it specifically.


Reply to this email directly or view it on
GitHubhttps://github.com//issues/128.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

2 participants