git cl format doesn't work on BUILD.gn file |
||
Issue descriptionDeveloping //ios/web_view on Mac OSX. What steps will reproduce the problem? (1) Edit BUILD.gn file and purposely not alphabetize some list. (2) Run "git cl format ." What is the expected result? BUILD.gn file is fixed up. What happens instead? No changes occur in BUILD.gn files
,
Nov 3 2017
I cannot reproduce locally: $ emacs ios/web_view/BUILD.gn # Here I just randomly change formatting of the file. $ git cl format Wrote formatted to '/Users/sdefresne/Developer/chromium/src/ios/web_view/BUILD.gn'. Note that the file will not be reformated if it presents errors, and that only some lists are sorted (those assigned to "sources", "deps" and related attributes). Closing as WontFix as I cannot reproduce.
,
Nov 3 2017
Sylvain, this was very specific instance where "git cl format" did not work for John: https://chromium-review.googlesource.com/c/chromium/src/+/747093/3/ios/web_view/BUILD.gn
,
Nov 3 2017
Then it is by design. As I said, only "sources"/"deps" lists are sorted. Not global variables.
,
Nov 3 2017
The reason list are not sorted by default is that order my have meaning (for example if they are assigned to "args") and the formatter cannot see how a global variable is used (especially for a variable that is exported). |
||
►
Sign in to add a comment |
||
Comment 1 by eugene...@chromium.org
, Nov 2 2017Components: -Infra>SDK Build