Update endwise rules - do not add end before catch, rescue, else etc.#164
Open
mmrwoods wants to merge 1 commit into
Open
Update endwise rules - do not add end before catch, rescue, else etc.#164mmrwoods wants to merge 1 commit into
mmrwoods wants to merge 1 commit into
Conversation
5f96a0b to
fd39574
Compare
fd39574 to
5788932
Compare
Owner
|
Thank you. I'll test the behavior myself. You don't need to add any tests. I don't think you're familiar with themis.vim. There's a conflict right now, Please rebase against origin/master if possible. |
Update endwise rules to avoid adding the end before certain keywords, e.g. no endtry before catch in vimscript or end before rescue in ruby. Adds an optional argument to lexima#endwise_rule#make_rule() to specify an additional list of keywords before which the end is not added. Uses rest arguments to avoid breaking changes to the existing function signature.
5788932 to
dad04fb
Compare
Contributor
Author
|
Rebased and force pushed with conflicts resolved |
Contributor
Author
|
An example of what this fixes: def foo
raise 'error'
rescue
puts 'rescue'
end
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Update endwise rules to avoid adding the end before certain keywords, e.g. no endtry before catch in vimscript or end before rescue in ruby.
Adds an optional argument to
lexima#endwise_rule#make_rule()to specify an additional list of keywords before which the end is not added. Uses rest arguments to avoid breaking changes to the existing function signature.I have not yet added any tests, primarily because I'm not sure how to test this using the existing test helpers.