Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Don't break for short variables names (even for simple chains)
Summary: ## Context After the changes in D33399531 (5164ad9), we were left with a few hard to understand variables which would get in the way of changing the newline logic. This aims to remove the `simple` boolean. ## Change WARNING: This isn't a refactor - the final formatting is different (but for the better). As described in the docs for `textLength`, we don't break if the first reference is short enough: ``` // shorter than 4 characters z123.red .orange .yellow .green .blue .indigo .violet .cyan .magenta .key ``` However, this logic wasn't used whenever there were multiple invocations: ``` // shorter than 4 characters... // but ends with a lambda and has more 2 invocations // why should that matter? z123 .shine() .bright() .z { it } ``` Now it's done uniformly: ``` // shorter than 4 characters z123.shine() .bright() .z { it } ``` Reviewed By: strulovich Differential Revision: D33488790 fbshipit-source-id: 5eb47fd952d976bd0899a85e112fb4fa08eee379
- Loading branch information