Commonly string literals in protos are already multiline, so breaking them
further is undesirable.
Details
Details
Diff Detail
Diff Detail
- Repository
- rL LLVM
Event Timeline
Comment Actions
I am not sure we should actually do this. I agree that badly reflowing multiline string literals is not ideal, but neither is violating the column limit. In any case, proper reflowing would probably the best solution. How hard would it be to implement that (for proto as well as C++)?
Comment Actions
Let's not do this then. For reflowing string literals, it could take a two-three months.
Comment Actions
So, we found out other cases where this is especially painful:
- breaking long URLs into multiple lines
- updating the text of a paragraph and breaking again with combination of no-reflow
We could disable it for now and enable it when we have string literal reflow.
Comment Actions
Change the comment and possibly also the patch description along the lines of what I have suggested. Other than that, looks good to me.
lib/Format/Format.cpp | ||
---|---|---|
679 ↗ | (On Diff #130888) | Make this comment: // Text protos are currently mostly formatted inside C++ raw string literals and // often the current breaking behavior of string literals is not beneficial there. // Investigate turning this on once proper string reflow has been implemented. |