Skip to content

Commit ce9a2c6

Browse files
[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.
1 parent 2cd20c2 commit ce9a2c6

File tree

2 files changed

+31
-0
lines changed

2 files changed

+31
-0
lines changed
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
============================
2+
External Clang-Tidy Examples
3+
============================
4+
5+
Introduction
6+
============
7+
8+
This page provides examples of what people have done with :program:`clang-tidy` that
9+
might serve as useful guides (or starting points) to develop your own checks.
10+
They may be helpful for necessary things such as how to write the `CMakeLists.txt`
11+
for an out-of-tree plugin of :program:`clang-tidy` checks.
12+
13+
If you know of (or wrote!) a tool or project using :program:`clang-tidy`, please share it
14+
on `the Discourse forums (Clang Frontend category)
15+
<https://discourse.llvm.org/c/clang/6>`_ for wider visibility and open a
16+
pull-request on `LLVM Github`_ to have it added here. Since the primary purpose of
17+
this page is to provide examples that can help developers, the listed projects should
18+
have code available.
19+
20+
As :program:`clang-tidy` is using, for example, the AST Matchers and diagnostics of Clang,
21+
`External Clang Examples`_ may also be useful to look at for such examples.
22+
23+
.. _LLVM Github: https://github.com/llvm/llvm-project
24+
.. _External Clang Examples: https://clang.llvm.org/docs/ExternalClangExamples.html
25+
26+
List of projects and tools
27+
==========================
28+
29+
`<https://github.com/coveooss/clang-tidy-plugin-examples>`_
30+
"This folder contains :program:`clang-tidy` plugins."

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

+1
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@ See also:
1212
The list of clang-tidy checks <checks/list>
1313
Clang-tidy IDE/Editor Integrations <Integrations>
1414
Getting Involved <Contributing>
15+
External Clang-Tidy Examples <ExternalClang-TidyExamples>
1516

1617
:program:`clang-tidy` is a clang-based C++ "linter" tool. Its purpose is to
1718
provide an extensible framework for diagnosing and fixing typical programming

0 commit comments

Comments
 (0)