[llvm] a81a7b9 - [Py Reformat] Exclude `third-party` in `code-format-helper.py` (#83872)
via llvm-commits
llvm-commits at lists.llvm.org
Mon Mar 4 11:22:39 PST 2024
Author: Mircea Trofin
Date: 2024-03-04T11:22:35-08:00
New Revision: a81a7b9962f093f603d3890822e253120e074d13
URL: https://github.com/llvm/llvm-project/commit/a81a7b9962f093f603d3890822e253120e074d13
DIFF: https://github.com/llvm/llvm-project/commit/a81a7b9962f093f603d3890822e253120e074d13.diff
LOG: [Py Reformat] Exclude `third-party` in `code-format-helper.py` (#83872)
Follow-up from PR #83491. `Darker`'s configuration is ignored because of the way we invoke it - with an explicit list of files. We need to filter it in `code-format-helper.py`.
Added:
Modified:
llvm/utils/git/code-format-helper.py
Removed:
################################################################################
diff --git a/llvm/utils/git/code-format-helper.py b/llvm/utils/git/code-format-helper.py
index 8a29a57d8d16bd..1113bf02570b94 100755
--- a/llvm/utils/git/code-format-helper.py
+++ b/llvm/utils/git/code-format-helper.py
@@ -125,6 +125,7 @@ def update_pr(self, comment_text: str, args: FormatArgs, create_new: bool) -> No
pr.as_issue().create_comment(comment_text)
def run(self, changed_files: List[str], args: FormatArgs) -> bool:
+ changed_files = [arg for arg in changed_files if "third-party" not in arg]
diff = self.format_run(changed_files, args)
should_update_gh = args.token is not None and args.repo is not None
More information about the llvm-commits
mailing list