[llvm] [Py Reformat] Exclude `third-party` in `code-format-helper.py` (PR #83872)

Tobias Hieta via llvm-commits llvm-commits at lists.llvm.org
Mon Mar 4 10:59:01 PST 2024


tru wrote:

> @tru I'm not sure the current setup is very maintainable - my concern is scenarios where one uses (say) vscode for development and wants to auto-format. Ideally they'd say "using `darker`, with whatever project defaults" and move on. Right now that's not quite the case, since (iiuc) the project settings are ignored by darker - or perhaps only the file exclusion list is (or maybe I'm not using the tools well)

Definitely open to suggestions if you think we can improve this. The reason we pass the list of files on the command line is otherwise darker will (naively) scan the whole repo worth of .py file in order to calculate the diff. It was incredible slow. I have already done work on the code formatter so that it can be used as a git pre-commit hook, so maybe it's just better we use it that way?

https://github.com/llvm/llvm-project/pull/83872


More information about the llvm-commits mailing list