git cl format needs to actually be an API |
||||
Issue descriptionUnlike `git cl presubmit` which has an API with the repo (PRESUBMIT.py files), `git cl format` is implemented by adding repo-specific things into git_cl.py (and depot_tools). It was proposed in https://chromium-review.googlesource.com/c/437919/ that something like a FORMAT.py could exist, and `git cl format` would know how to process those FORMAT.py files in the repo. Then repo-specific formatting code could be contained and versioned with the repo. Ideally this protocol can be VERY VERY SIMPLE (like: invoke each FORMAT.py from the file path to the root of the repo. If it returns 0, it formatted the file. If it returns 1, it doesn't know how to process the file). If this is agreeable to folks, I'd like it if we can implement this before we add too many more things to `git cl format`.
,
Feb 15 2017
It's not chromium/src-specific, v8 and skia use it too. The current api is to find buildtools/clang-format/foo/clang-format in the repo. But that's a technicality, and your proposal sounds like a good idea to me.
,
Feb 15 2017
,
Feb 15 2017
yeah you're right, I edited the description to clarify.
,
Jul 27 2017
,
Aug 8
|
||||
►
Sign in to add a comment |
||||
Comment 1 by iannu...@google.com
, Feb 15 2017