[llvm] Add PR check to suggest alternatives to using undef (PR #118506)

Tobias Hieta via llvm-commits llvm-commits at lists.llvm.org
Wed Dec 4 05:00:45 PST 2024


================
@@ -312,7 +313,84 @@ def format_run(self, changed_files: List[str], args: FormatArgs) -> Optional[str
             return None
 
 
-ALL_FORMATTERS = (DarkerFormatHelper(), ClangFormatHelper())
+class UndefGetFormatHelper(FormatHelper):
----------------
tru wrote:

Yeah I had the same thought as @DavidSpickett at first. I always thought of code-format-helper as something that's just checking formatting issues with clang format and friends. But I guess it makes sense to have other checks without having to create a separate github flow for it.

But I think we need to change the name of the script and the integration name in that case to really make it a bit more generic. Otherwise I think it might cause confusion.

What do you think @boomanaiden154 ?

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


More information about the llvm-commits mailing list