Skip to content

Conversation

HerrCai0907
Copy link
Contributor

@HerrCai0907 HerrCai0907 commented Sep 22, 2025

add \ to avoid a blank first line

@llvmbot
Copy link
Member

llvmbot commented Sep 22, 2025

@llvm/pr-subscribers-clang-tools-extra

@llvm/pr-subscribers-clang-tidy

Author: Congcong Cai (HerrCai0907)

Changes

add \ to avoid a blank first line


Full diff: https://github.com/llvm/llvm-project/pull/160019.diff

1 Files Affected:

  • (modified) clang-tools-extra/clang-tidy/add_new_check.py (+4-3)
diff --git a/clang-tools-extra/clang-tidy/add_new_check.py b/clang-tools-extra/clang-tidy/add_new_check.py
index 0035da288dcf5..dfa429e6455b2 100755
--- a/clang-tools-extra/clang-tidy/add_new_check.py
+++ b/clang-tools-extra/clang-tidy/add_new_check.py
@@ -90,7 +90,7 @@ def write_header(
             + "_H"
         )
         f.write(
-            """
+            """\
 //===----------------------------------------------------------------------===//
 //
 // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
@@ -142,7 +142,7 @@ def write_implementation(
     print("Creating %s..." % filename)
     with io.open(filename, "w", encoding="utf8", newline="\n") as f:
         f.write(
-            """
+            """\
 //===----------------------------------------------------------------------===//
 //
 // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
@@ -347,7 +347,8 @@ def write_test(
     print("Creating %s..." % filename)
     with io.open(filename, "w", encoding="utf8", newline="\n") as f:
         f.write(
-            """// RUN: %%check_clang_tidy %(standard)s%%s %(check_name_dashes)s %%t
+            """\
+// RUN: %%check_clang_tidy %(standard)s%%s %(check_name_dashes)s %%t
 
 // FIXME: Add something that triggers the check here.
 void f();

@HerrCai0907 HerrCai0907 merged commit 6884cc7 into llvm:main Sep 22, 2025
13 checks passed
@HerrCai0907 HerrCai0907 deleted the fix/add_new_script branch September 22, 2025 10:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants