[llvm] [workflows] Split pr-code-format into two parts to make it more secure (PR #78216)

Aiden Grossman via llvm-commits llvm-commits at lists.llvm.org
Mon Jan 15 22:44:51 PST 2024


================
@@ -357,9 +376,17 @@ def hook_main():
         changed_files = args.changed_files.split(",")
 
     failed_formatters = []
+    comments = []
     for fmt in ALL_FORMATTERS:
         if not fmt.run(changed_files, args):
             failed_formatters.append(fmt.name)
+        if fmt.comment:
+            comments.append(fmt.comment)
+    
+    if len(comments):
----------------
boomanaiden154 wrote:

This seems like it also needs to be gated behind `args.write_comment_to_file`?

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


More information about the llvm-commits mailing list