C++/C#/Java/JavaScript/Python: Autoformat.#4748
Conversation
jbj
left a comment
There was a problem hiding this comment.
C++ LGTM. I have one question, but it's not blocking for this PR.
| this | ||
| .hasQualifiedName("std", ["set", "unordered_set"], | ||
| ["lower_bound", "upper_bound", "equal_range"]) | ||
| this.hasQualifiedName("std", ["set", "unordered_set"], | ||
| ["lower_bound", "upper_bound", "equal_range"]) |
There was a problem hiding this comment.
I'm surprised by this change. I would have expected the second line to be indented two levels more. If hasQualifiedName has a result, could we then get
this.hasQualifiedName("std", ["set", "unordered_set"],
["lower_bound", "upper_bound", "equal_range"])
.hasSomeProperty()That doesn't seem right. But perhaps it's not an issue in practice.
There was a problem hiding this comment.
Yeah, that's actually a reasonable expectation, which I think makes perfect sense. Currently the indentation block isn't started until after printing the call, but it would make more sense to start it before, which would have this effect. It does require some refactoring of the autoformatter code, so I'll make a note of this and leave it for future work if that's ok.
Experimental autoformatter change.QL changes to go with the updated autoformatter: Call chains with a short initial qualifier skip the first linebreak.