[llvm] code-format: Improve the code-format-helper to be able to run as a git hook (PR #73957)
Louis Dionne via llvm-commits
llvm-commits at lists.llvm.org
Fri Dec 1 06:30:28 PST 2023
================
@@ -128,29 +150,47 @@ def filter_changed_files(self, changed_files: list[str]) -> list[str]:
filtered_files.append(path)
return filtered_files
- def format_run(
- self, changed_files: list[str], args: argparse.Namespace
- ) -> str | None:
+ @property
----------------
ldionne wrote:
Not attached to this line, because I can't find where that happens: When I run the hook successfully (i.e. I make a properly-formatted commit), it prints `clang-format did not modify any files`. That seems a bit spurious -- perhaps we don't want to print anything when it succeeds?
https://github.com/llvm/llvm-project/pull/73957
More information about the llvm-commits
mailing list