[clang-tools-extra] Add clang-tidy external examples (PR #106675)

via cfe-commits cfe-commits at lists.llvm.org
Mon Sep 9 19:46:38 PDT 2024


https://github.com/MichelleCDjunaidi updated https://github.com/llvm/llvm-project/pull/106675

>From 08324e3586acb16cbf010fd6013c21f2b5faa64e Mon Sep 17 00:00:00 2001
From: MichelleCDjunaidi <87893361+MichelleCDjunaidi at users.noreply.github.com>
Date: Fri, 30 Aug 2024 14:55:16 +0800
Subject: [PATCH 1/5] Add clang-tidy external examples

---
 .../clang-tidy/ExternalClang-TidyExamples.rst | 31 +++++++++++++++++++
 1 file changed, 31 insertions(+)
 create mode 100644 clang-tools-extra/docs/clang-tidy/ExternalClang-TidyExamples.rst

diff --git a/clang-tools-extra/docs/clang-tidy/ExternalClang-TidyExamples.rst b/clang-tools-extra/docs/clang-tidy/ExternalClang-TidyExamples.rst
new file mode 100644
index 00000000000000..735f99b30c7b7d
--- /dev/null
+++ b/clang-tools-extra/docs/clang-tidy/ExternalClang-TidyExamples.rst
@@ -0,0 +1,31 @@
+=======================
+External Clang-Tidy Examples
+=======================
+
+Introduction
+============
+
+This page provides examples of what people have done with clang-tidy that 
+might serve as useful guides (or starting points) to develop your own checks. 
+They may be helpful even for necessary things such as how to write CMakeLists.txt 
+for an out-of-tree plugin of clang-tidy checks.
+
+If you know of (or wrote!) a tool or project using clang-tidy, please post on
+`the Discourse forums (Clang Frontend category)
+<https://discourse.llvm.org/c/clang/6>`_ to have it added.
+(or if you are already a clang-tidy contributor, feel free to directly commit
+additions). Since the primary purpose of this page is to provide examples
+that can help developers, generally they must have code available.
+
+As clang-tidy shares C++ AST Matchers with Clang diagnostics, `External Clang Examples`_ 
+may also be useful to look at.
+
+.. _External Clang Examples: https://clang.llvm.org/docs/ExternalClangExamples.html
+
+https://clang.llvm.org/docs/ExternalClangExamples.html
+
+List of projects and tools
+==========================
+
+`<https://github.com/coveooss/clang-tidy-plugin-examples/tree/main>`_
+    "This folder contains clang-tidy plugins."
\ No newline at end of file

>From b47792347dd6ebab3ac49bc55b0c812db0ee5ba3 Mon Sep 17 00:00:00 2001
From: MichelleCDjunaidi <87893361+MichelleCDjunaidi at users.noreply.github.com>
Date: Fri, 30 Aug 2024 21:22:55 +0800
Subject: [PATCH 2/5] update wording to invite PR

---
 .../clang-tidy/ExternalClang-TidyExamples.rst | 23 ++++++++++---------
 1 file changed, 12 insertions(+), 11 deletions(-)

diff --git a/clang-tools-extra/docs/clang-tidy/ExternalClang-TidyExamples.rst b/clang-tools-extra/docs/clang-tidy/ExternalClang-TidyExamples.rst
index 735f99b30c7b7d..2355b6f119b760 100644
--- a/clang-tools-extra/docs/clang-tidy/ExternalClang-TidyExamples.rst
+++ b/clang-tools-extra/docs/clang-tidy/ExternalClang-TidyExamples.rst
@@ -5,21 +5,22 @@ External Clang-Tidy Examples
 Introduction
 ============
 
-This page provides examples of what people have done with clang-tidy that 
+This page provides examples of what people have done with `clang-tidy`` that 
 might serve as useful guides (or starting points) to develop your own checks. 
-They may be helpful even for necessary things such as how to write CMakeLists.txt 
-for an out-of-tree plugin of clang-tidy checks.
+They may be helpful for necessary things such as how to write CMakeLists.txt 
+for an out-of-tree plugin of `clang-tidy` checks.
 
-If you know of (or wrote!) a tool or project using clang-tidy, please post on
-`the Discourse forums (Clang Frontend category)
-<https://discourse.llvm.org/c/clang/6>`_ to have it added.
-(or if you are already a clang-tidy contributor, feel free to directly commit
-additions). Since the primary purpose of this page is to provide examples
-that can help developers, generally they must have code available.
+If you know of (or wrote!) a tool or project using clang-tidy, please share it 
+on `the Discourse forums (Clang Frontend category)
+<https://discourse.llvm.org/c/clang/6>`_ for wider visibility and open a 
+pull-request on `LLVM Github`_ to have it added here. Since the primary purpose of 
+this page is to provide examples that can help developers, generally they must have 
+code available.
 
-As clang-tidy shares C++ AST Matchers with Clang diagnostics, `External Clang Examples`_ 
-may also be useful to look at.
+As `clang-tidy` shares C++ AST Matchers with Clang diagnostics, `External Clang Examples`_ 
+may also be useful to look at for examples.
 
+.. _LLVM Github: https://github.com/llvm/llvm-project
 .. _External Clang Examples: https://clang.llvm.org/docs/ExternalClangExamples.html
 
 https://clang.llvm.org/docs/ExternalClangExamples.html

>From dab57a6a65b9fcc4fd24d7fd0838f428ad675cd5 Mon Sep 17 00:00:00 2001
From: MichelleCDjunaidi <87893361+MichelleCDjunaidi at users.noreply.github.com>
Date: Fri, 30 Aug 2024 21:38:24 +0800
Subject: [PATCH 3/5] cleanup formatting and wording

---
 .../docs/clang-tidy/ExternalClang-TidyExamples.rst          | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/clang-tools-extra/docs/clang-tidy/ExternalClang-TidyExamples.rst b/clang-tools-extra/docs/clang-tidy/ExternalClang-TidyExamples.rst
index 2355b6f119b760..8a8ebdbf5b4691 100644
--- a/clang-tools-extra/docs/clang-tidy/ExternalClang-TidyExamples.rst
+++ b/clang-tools-extra/docs/clang-tidy/ExternalClang-TidyExamples.rst
@@ -5,7 +5,7 @@ External Clang-Tidy Examples
 Introduction
 ============
 
-This page provides examples of what people have done with `clang-tidy`` that 
+This page provides examples of what people have done with `clang-tidy` that 
 might serve as useful guides (or starting points) to develop your own checks. 
 They may be helpful for necessary things such as how to write CMakeLists.txt 
 for an out-of-tree plugin of `clang-tidy` checks.
@@ -14,8 +14,8 @@ If you know of (or wrote!) a tool or project using clang-tidy, please share it
 on `the Discourse forums (Clang Frontend category)
 <https://discourse.llvm.org/c/clang/6>`_ for wider visibility and open a 
 pull-request on `LLVM Github`_ to have it added here. Since the primary purpose of 
-this page is to provide examples that can help developers, generally they must have 
-code available.
+this page is to provide examples that can help developers, the listed projects should
+have code available.
 
 As `clang-tidy` shares C++ AST Matchers with Clang diagnostics, `External Clang Examples`_ 
 may also be useful to look at for examples.

>From b2cad89d85e9805da0697cbbc688647a40a160cd Mon Sep 17 00:00:00 2001
From: MichelleCDjunaidi <87893361+MichelleCDjunaidi at users.noreply.github.com>
Date: Fri, 30 Aug 2024 22:14:34 +0800
Subject: [PATCH 4/5] cleanup more formatting

---
 .../docs/clang-tidy/ExternalClang-TidyExamples.rst | 14 +++++++-------
 1 file changed, 7 insertions(+), 7 deletions(-)

diff --git a/clang-tools-extra/docs/clang-tidy/ExternalClang-TidyExamples.rst b/clang-tools-extra/docs/clang-tidy/ExternalClang-TidyExamples.rst
index 8a8ebdbf5b4691..b404ed2722f372 100644
--- a/clang-tools-extra/docs/clang-tidy/ExternalClang-TidyExamples.rst
+++ b/clang-tools-extra/docs/clang-tidy/ExternalClang-TidyExamples.rst
@@ -1,24 +1,24 @@
-=======================
+============================
 External Clang-Tidy Examples
-=======================
+============================
 
 Introduction
 ============
 
-This page provides examples of what people have done with `clang-tidy` that 
+This page provides examples of what people have done with :program:`clang-tidy` that 
 might serve as useful guides (or starting points) to develop your own checks. 
 They may be helpful for necessary things such as how to write CMakeLists.txt 
-for an out-of-tree plugin of `clang-tidy` checks.
+for an out-of-tree plugin of :program:`clang-tidy` checks.
 
-If you know of (or wrote!) a tool or project using clang-tidy, please share it 
+If you know of (or wrote!) a tool or project using :program:`clang-tidy`, please share it 
 on `the Discourse forums (Clang Frontend category)
 <https://discourse.llvm.org/c/clang/6>`_ for wider visibility and open a 
 pull-request on `LLVM Github`_ to have it added here. Since the primary purpose of 
 this page is to provide examples that can help developers, the listed projects should
 have code available.
 
-As `clang-tidy` shares C++ AST Matchers with Clang diagnostics, `External Clang Examples`_ 
-may also be useful to look at for examples.
+As :program:`clang-tidy` shares C++ AST Matchers with Clang diagnostics, 
+`External Clang Examples`_ may also be useful to look at for such examples.
 
 .. _LLVM Github: https://github.com/llvm/llvm-project
 .. _External Clang Examples: https://clang.llvm.org/docs/ExternalClangExamples.html

>From 7f774ecccacb17104c461ad82d45592aceb6b749 Mon Sep 17 00:00:00 2001
From: MichelleCDjunaidi <87893361+MichelleCDjunaidi at users.noreply.github.com>
Date: Tue, 10 Sep 2024 10:46:17 +0800
Subject: [PATCH 5/5] fix example quote formatting

---
 .../docs/clang-tidy/ExternalClang-TidyExamples.rst            | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/clang-tools-extra/docs/clang-tidy/ExternalClang-TidyExamples.rst b/clang-tools-extra/docs/clang-tidy/ExternalClang-TidyExamples.rst
index b404ed2722f372..dce22e0aa21338 100644
--- a/clang-tools-extra/docs/clang-tidy/ExternalClang-TidyExamples.rst
+++ b/clang-tools-extra/docs/clang-tidy/ExternalClang-TidyExamples.rst
@@ -7,7 +7,7 @@ Introduction
 
 This page provides examples of what people have done with :program:`clang-tidy` that 
 might serve as useful guides (or starting points) to develop your own checks. 
-They may be helpful for necessary things such as how to write CMakeLists.txt 
+They may be helpful for necessary things such as how to write the `CMakeLists.txt`` 
 for an out-of-tree plugin of :program:`clang-tidy` checks.
 
 If you know of (or wrote!) a tool or project using :program:`clang-tidy`, please share it 
@@ -29,4 +29,4 @@ List of projects and tools
 ==========================
 
 `<https://github.com/coveooss/clang-tidy-plugin-examples/tree/main>`_
-    "This folder contains clang-tidy plugins."
\ No newline at end of file
+    "This folder contains :program:`clang-tidy` plugins."
\ No newline at end of file



More information about the cfe-commits mailing list