The current scheme runs the tool based on paths filtered out of git ls-files. However, this doesn't work well (it won't cover headers that are only included by generated code unless you use --all), and also imposes a burden on developers: developers need to be careful to rebuild dependencies before running a clang tool.
If run_tool.py understood the targets involved, then it could automatically rebuild the targets in question, and run the tool afterwards.
Two problems:
- There's a magical step involved here in having run_tool.py figure out all the rules in a compile DB that belong to the specified targets.
- We want to be able to specify individual files (Ninja syntax looks like ninja -C out/Release ../../base/bind_unittest.cc^) and targets (GN style would be like //third_party/WebKit). I'm not sure how we'd mesh the two.
Comment 1 by lukasza@chromium.org
, Dec 16 2016