[clang-tools-extra] Extend support for specifying languages and version in add_new_check.py (PR #100129)

via cfe-commits cfe-commits at lists.llvm.org
Fri Jul 26 23:23:36 PDT 2024


github-actions[bot] wrote:

<!--LLVM CODE FORMAT COMMENT: {darker}-->


:warning: Python code formatter, darker found issues in your code. :warning:

<details>
<summary>
You can test this locally with the following command:
</summary>

``````````bash
darker --check --diff -r 13996378d81c8fa9a364aeaafd7382abbc1db83a...ed5cdfdd4696f4af2f6cd3dd09d4104744b74cc5 clang-tools-extra/clang-tidy/add_new_check.py clang-tools-extra/test/clang-tidy/check_clang_tidy.py
``````````

</details>

<details>
<summary>
View the diff from darker here.
</summary>

``````````diff
--- clang-tidy/add_new_check.py	2024-07-27 06:19:16.000000 +0000
+++ clang-tidy/add_new_check.py	2024-07-27 06:23:11.039049 +0000
@@ -55,11 +55,17 @@
     return True
 
 
 # Adds a header for the new check.
 def write_header(
-    module_path, module, namespace, check_name, check_name_camel, description, lang_restrict
+    module_path,
+    module,
+    namespace,
+    check_name,
+    check_name_camel,
+    description,
+    lang_restrict,
 ):
     wrapped_desc = "\n".join(
         textwrap.wrap(
             description, width=80, initial_indent="/// ", subsequent_indent="/// "
         )
@@ -750,11 +756,17 @@
         )
     elif language in ["objc", "objc++"]:
         language_restrict = "%(lang)s.ObjC"
 
     write_header(
-        module_path, module, namespace, check_name, check_name_camel, description, language_restrict
+        module_path,
+        module,
+        namespace,
+        check_name,
+        check_name_camel,
+        description,
+        language_restrict,
     )
     write_implementation(module_path, module, namespace, check_name_camel)
     adapt_module(module_path, module, check_name, check_name_camel)
     add_release_notes(module_path, module, check_name, description)
     test_extension = language_to_extension.get(language)

``````````

</details>


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


More information about the cfe-commits mailing list