Bug 1496084 - Document in config.yaml how to add a new checker r=andi
authorSylvestre Ledru <sledru@mozilla.com>
Wed, 03 Oct 2018 15:53:31 +0000
changeset 495152 ba9d952a37de83181cbf5e2ab3f35032401c75c8
parent 495151 edfd1b8910f6f6762607fe9431f6905deba4b73a
child 495153 32cde67dd330391a0fb6735be8309a64e646a5f7
push id9984
push userffxbld-merge
push dateMon, 15 Oct 2018 21:07:35 +0000
treeherdermozilla-beta@183d27ea8570 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersandi
bugs1496084
milestone64.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 1496084 - Document in config.yaml how to add a new checker r=andi Differential Revision: https://phabricator.services.mozilla.com/D7607
tools/clang-tidy/config.yaml
--- a/tools/clang-tidy/config.yaml
+++ b/tools/clang-tidy/config.yaml
@@ -1,13 +1,21 @@
 ---
 target: obj-x86_64-pc-linux-gnu
 # It is used by 'mach static-analysis' and 'mozreview static-analysis bot'
 # in order to have consistency across the used checkers.
 # All the clang checks used by the static-analysis tools.
+#
+# To add a new checker:
+# 1. Add it in this file
+# 2. Create a C/C++ test case in tools/clang-tidy/test/ reproducing the
+#    warning/error that the checker will detect
+# 3. Run './mach static-analysis autotest -d' to create the reference
+# 4. Check the json file in tools/clang-tidy/test/
+# 5. Commit this file + the .cpp test case + the json result
 platforms:
   - linux64
   - macosx64
   - win32
   - win64
 # Minimum clang-tidy version that is required for all the following checkers
 # to work properly.
 min_clang_tidy: "7.0.0"