V8 uses a custom DSL named Torque. Since `clang-format` only supports mainstream languages (by design), we have a separate formatter specifically for Torque: https://v8.dev/docs/torque#torque-tooling After editing a Torque file, V8 engineers have to manually run:
tools/torque/format-torque.py -i $file
Suggestion: make `git cl format` hookable somehow, so that we can make `format-torque.py` run as needed whenever someone types `git cl format`. (Other depot_tools consumers might have similar use cases now or in the future.)
To accomplish this, `git cl format` could look for a specific file (maybe `.git-cl-format-hooks`) relative to the current repository, and if that file exists, execute it with the modified file names as arguments. Alternatively, it could look for an environment variable.
What do you think?
Comment 1 by mathias@chromium.org
, Oct 24