[clang-tools-extra] [clang-tidy] Implement alphabetical order test (PR #166072)

via cfe-commits cfe-commits at lists.llvm.org
Sun Nov 23 00:46:20 PST 2025


================
@@ -0,0 +1,374 @@
+# Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
+# See https://llvm.org/LICENSE.txt for license information.
+# SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
+
+# To run these tests:
+# python3 check_alphabetical_order_test.py -v
+
+import io
+import os
+import tempfile
+import unittest
+from contextlib import redirect_stderr
+from typing import cast
+
+
+import check_alphabetical_order as _mod
+
+
+class TestAlphabeticalOrderCheck(unittest.TestCase):
+    def test_normalize_list_rst_sorts_rows(self):
+        input_lines = [
+            ".. csv-table:: Clang-Tidy checks\n",
----------------
zeyi2 wrote:

> usually you use `"".join()` so with multiline would natively have big chunk of text ready

Thanks for reviewing! I've fixed the testcases :)

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


More information about the cfe-commits mailing list