I propose the following convention: the actual lines of code that are directly related to the OFFS gem itself should be aligned with the left margin. Code inside the would_like_to
and may_still_need_to
blocks should be indented "normally", as though the surrounding OFFS do/end lines were not present. See the example Ruby file also in this gist.
This convention serves two purposes:
- It provides a visual indication that something in the file is "weird", thus calling our attention to the complexity penalty being imposed by carrying extra branches in VCS.
- When the feature itself is eventually cleaned up, the diff will be a straight deletion, not the deletion-plus-insertion one would otherwise get from deindenting a block of code. This will make it more obvious if someone deletes one branch and makes an edit in the other in the same Git commit.