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

via cfe-commits cfe-commits at lists.llvm.org
Mon Sep 23 09:13:24 PDT 2024


Author: MichelleCDjunaidi
Date: 2024-09-23T18:13:16+02:00
New Revision: ce9a2c652104197a051db3788f3ec503cab3a79b

URL: https://github.com/llvm/llvm-project/commit/ce9a2c652104197a051db3788f3ec503cab3a79b
DIFF: https://github.com/llvm/llvm-project/commit/ce9a2c652104197a051db3788f3ec503cab3a79b.diff

LOG: [clang-tidy][doc] Add external examples (#106675)

Clang has a page where they list out external examples:
https://clang.llvm.org/docs/ExternalClangExamples.html. This mimics this page by adding some useful links specific to clang-tidy.

Added: 
    clang-tools-extra/docs/clang-tidy/ExternalClang-TidyExamples.rst

Modified: 
    clang-tools-extra/docs/clang-tidy/index.rst

Removed: 
    


################################################################################
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..3d654e232a3ada
--- /dev/null
+++ b/clang-tools-extra/docs/clang-tidy/ExternalClang-TidyExamples.rst
@@ -0,0 +1,30 @@
+============================
+External Clang-Tidy Examples
+============================
+
+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 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 
+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 :program:`clang-tidy` is using, for example, the AST Matchers and diagnostics of Clang,
+`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
+
+List of projects and tools
+==========================
+
+`<https://github.com/coveooss/clang-tidy-plugin-examples>`_
+    "This folder contains :program:`clang-tidy` plugins."

diff  --git a/clang-tools-extra/docs/clang-tidy/index.rst b/clang-tools-extra/docs/clang-tidy/index.rst
index c8fc34c61caeb5..e38141bdb8be1f 100644
--- a/clang-tools-extra/docs/clang-tidy/index.rst
+++ b/clang-tools-extra/docs/clang-tidy/index.rst
@@ -12,6 +12,7 @@ See also:
    The list of clang-tidy checks <checks/list>
    Clang-tidy IDE/Editor Integrations <Integrations>
    Getting Involved <Contributing>
+   External Clang-Tidy Examples <ExternalClang-TidyExamples>
 
 :program:`clang-tidy` is a clang-based C++ "linter" tool. Its purpose is to
 provide an extensible framework for diagnosing and fixing typical programming


        


More information about the cfe-commits mailing list