git cl format is non-idempotent wrt inserting line breaks
Reported by
jwo...@igalia.com,
Jun 29 2017
|
|
Issue descriptiondepot_tools version: c833946a1fb6bf7bab355433faeff98d4531e1b5 OS: Linux What steps will reproduce the problem? Context: https://chromium-review.googlesource.com/c/529973/5/src%252Fflag-definitions.h#208 Start with this code: ``` #define HARMONY_INPROGRESS(V) HARMONY_INPROGRESS_BASE(V) V(harmony_number_format_to_parts, "Intl.NumberFormat.prototype.formatToParts") ``` `git cl format` formats it like this: ``` #define HARMONY_INPROGRESS(V) \ HARMONY_INPROGRESS_BASE(V) \ V(harmony_number_format_to_parts, \ "Intl.NumberFormat.prototype.formatToParts") ``` but then, if you run `git cl format` again, it changes it to this: ``` #define HARMONY_INPROGRESS(V) \ HARMONY_INPROGRESS_BASE(V) \ V(harmony_number_format_to_parts, "Intl.NumberFormat.prototype." \ "formatToParts") ``` and then again, becomes this: ``` #define HARMONY_INPROGRESS(V) \ HARMONY_INPROGRESS_BASE(V) \ V(harmony_number_format_to_parts, \ "Intl.NumberFormat.prototype." \ "formatToParts") ``` This is a bit problematic in this specific case because `d8 --help` shows the break in the string literal due to how that value is being used by the preprocessor macro framework. |
|
►
Sign in to add a comment |
|