You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@trafficserver.apache.org by jp...@apache.org on 2016/07/08 15:37:23 UTC

[trafficserver] branch master updated: Integrate clang-tidy into the build. (#770)

This is an automated email from the ASF dual-hosted git repository.

jpeach pushed a commit to branch master
in repository https://git-dual.apache.org/repos/asf/trafficserver.git

The following commit(s) were added to refs/heads/master by this push:
       new  6e5c3c8   Integrate clang-tidy into the build. (#770)
6e5c3c8 is described below

commit 6e5c3c82a746157de34780d6ce7ac1a7c93623d7
Author: James Peach <jp...@apache.org>
AuthorDate: Fri Jul 8 08:37:17 2016 -0700

    Integrate clang-tidy into the build. (#770)
    
    Add a recursive tidy rule to run clang-tidy over all the source.
    The mor recommended way to do this is to build a compilation database,
    however the tools for doing that are not very portable, and the
    compilation database doesn't easilt let you fix code in header
    files.
---
 .clang-tidy                                        |  2 +-
 Makefile.am                                        | 37 ++++++-------
 cmd/traffic_top/Makefile.am => build/tidy.mk       | 34 +++++-------
 cmd/traffic_cop/Makefile.am                        |  5 ++
 cmd/traffic_crashlog/Makefile.am                   |  5 ++
 cmd/traffic_ctl/Makefile.am                        |  5 ++
 cmd/traffic_layout/Makefile.am                     |  5 ++
 cmd/traffic_manager/Makefile.am                    |  5 ++
 cmd/traffic_top/Makefile.am                        |  5 ++
 cmd/traffic_via/Makefile.am                        |  5 ++
 cmd/traffic_wccp/Makefile.am                       |  5 ++
 configure.ac                                       | 12 ++++-
 example/Makefile.am                                |  5 ++
 iocore/Makefile.am                                 |  5 ++
 iocore/aio/Makefile.am                             |  5 ++
 iocore/cache/Makefile.am                           |  5 ++
 iocore/cluster/Makefile.am                         |  5 ++
 iocore/dns/Makefile.am                             |  5 ++
 iocore/eventsystem/Makefile.am                     |  5 ++
 iocore/hostdb/Makefile.am                          |  7 ++-
 iocore/net/Makefile.am                             |  5 ++
 iocore/utils/Makefile.am                           |  5 ++
 lib/atscppapi/examples/Makefile.am                 |  4 ++
 lib/atscppapi/src/Makefile.am                      | 62 ++++++++++++----------
 lib/bindings/Makefile.am                           |  4 ++
 lib/records/Makefile.am                            |  5 ++
 lib/ts/Makefile.am                                 |  6 +++
 lib/tsconfig/Makefile.am                           |  5 ++
 lib/wccp/Makefile.am                               |  5 ++
 mgmt/Makefile.am                                   |  5 ++
 mgmt/api/Makefile.am                               |  5 ++
 mgmt/cluster/Makefile.am                           |  5 ++
 mgmt/utils/Makefile.am                             |  5 ++
 plugins/cacheurl/Makefile.am                       |  5 ++
 plugins/conf_remap/Makefile.am                     |  5 ++
 plugins/experimental/Makefile.am                   |  5 ++
 plugins/experimental/acme/Makefile.am              |  5 ++
 plugins/experimental/authproxy/Makefile.am         |  5 ++
 plugins/experimental/background_fetch/Makefile.am  |  5 ++
 plugins/experimental/balancer/Makefile.am          |  5 ++
 plugins/experimental/buffer_upload/Makefile.am     |  5 ++
 plugins/experimental/cache_key_genid/Makefile.am   |  5 ++
 plugins/experimental/cache_promote/Makefile.am     |  5 ++
 .../experimental/cache_range_requests/Makefile.am  |  5 ++
 plugins/experimental/cachekey/Makefile.am          |  5 ++
 plugins/experimental/channel_stats/Makefile.am     |  5 ++
 .../experimental/collapsed_connection/Makefile.am  |  5 ++
 .../experimental/collapsed_forwarding/Makefile.am  |  5 ++
 plugins/experimental/custom_redirect/Makefile.am   |  5 ++
 plugins/experimental/epic/Makefile.am              |  5 ++
 plugins/experimental/escalate/Makefile.am          |  5 ++
 plugins/experimental/esi/Makefile.am               |  5 ++
 plugins/experimental/generator/Makefile.am         |  5 ++
 plugins/experimental/geoip_acl/Makefile.am         |  5 ++
 plugins/experimental/header_normalize/Makefile.am  |  5 ++
 plugins/experimental/hipes/Makefile.am             |  5 ++
 plugins/experimental/inliner/Makefile.am           |  5 ++
 plugins/experimental/memcache/Makefile.am          |  5 ++
 plugins/experimental/memcached_remap/Makefile.am   |  5 ++
 plugins/experimental/metalink/Makefile.am          |  5 ++
 plugins/experimental/mp4/Makefile.am               |  5 ++
 plugins/experimental/multiplexer/Makefile.am       |  5 ++
 plugins/experimental/mysql_remap/Makefile.am       |  5 ++
 plugins/experimental/regex_revalidate/Makefile.am  |  5 ++
 plugins/experimental/remap_stats/Makefile.am       |  5 ++
 plugins/experimental/s3_auth/Makefile.am           |  5 ++
 plugins/experimental/ssl_cert_loader/Makefile.am   |  5 ++
 plugins/experimental/sslheaders/Makefile.am        |  5 ++
 .../stale_while_revalidate/Makefile.am             |  5 ++
 plugins/experimental/stream_editor/Makefile.am     |  5 ++
 plugins/experimental/ts_lua/Makefile.am            |  5 ++
 plugins/experimental/url_sig/Makefile.am           |  5 ++
 plugins/experimental/webp_transform/Makefile.am    |  5 ++
 plugins/experimental/xdebug/Makefile.am            |  5 ++
 plugins/gzip/Makefile.am                           |  5 ++
 plugins/header_rewrite/Makefile.am                 |  5 ++
 plugins/healthchecks/Makefile.am                   |  5 ++
 plugins/libloader/Makefile.am                      |  5 ++
 plugins/regex_remap/Makefile.am                    |  5 ++
 plugins/stats_over_http/Makefile.am                |  5 ++
 plugins/tcpinfo/Makefile.am                        |  5 ++
 proxy/Makefile.am                                  |  5 ++
 proxy/hdrs/Makefile.am                             |  5 ++
 proxy/http/Makefile.am                             |  5 ++
 proxy/http/remap/Makefile.am                       |  5 ++
 proxy/http2/Makefile.am                            |  6 +++
 proxy/logging/Makefile.am                          |  5 ++
 proxy/shared/Makefile.am                           |  6 +++
 proxy/spdy/Makefile.am                             |  5 ++
 89 files changed, 499 insertions(+), 71 deletions(-)

diff --git a/.clang-tidy b/.clang-tidy
index f2a4a41..0afc80f 100644
--- a/.clang-tidy
+++ b/.clang-tidy
@@ -1 +1 @@
-Checks: readability-braces-around-statements
+Checks: -*,readability-braces-around-statements
diff --git a/Makefile.am b/Makefile.am
index f088fb8..7a8b5c7 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -140,21 +140,22 @@ clang-format-tools:
 	@$(top_srcdir)/tools/clang-format.sh $(top_srcdir)/tools
 
 help:
-	@echo 'all             default target for building the package' && \
-	echo 'check            run the test suite, if any' && \
-	echo 'clean            remove whatever make created' && \
-	echo 'distclean        remove whatever configure created' && \
-	echo 'dist             DEPRECATED: recreate source package' && \
-	echo 'examples         make examples' && \
-	echo 'asf-dist         recreate source package' && \
-	echo 'asf-dist-sign    recreate source package, with checksums and signature' && \
-	echo 'release          recreate a signed release source package and a signed git tag' && \
-	echo 'rel-candidate    recreate a signed relelease candidate source package and a signed git tag' && \
-	echo 'distcheck        verify dist by performing VPATH build and then distclean' && \
-	echo 'rat              produce a RAT licence compliance report of the source' && \
-	echo 'doxygen          generate doxygen docs in doc/html dir' && \
-	echo 'clang-format     run clang-format over most C and C++ files (not git subtrees)' && \
-	echo 'help             display this list of make targets' && \
-	echo 'install          install by copying the built files to system-wide dirs' && \
-	echo 'install-strip    same as install but then strips debugging symbols' && \
-	echo 'install-examples install examples by copying the built files to system-wide dirs'
+	@echo 'all              default target for building the package'
+	@echo 'asf-dist         recreate source package'
+	@echo 'asf-dist-sign    recreate source package, with checksums and signature'
+	@echo 'check            run the test suite, if any'
+	@echo 'clang-format     run clang-format over most C and C++ files (not git subtrees)'
+	@echo 'clean            remove whatever make created'
+	@echo 'dist             DEPRECATED: recreate source package'
+	@echo 'distcheck        verify dist by performing VPATH build and then distclean'
+	@echo 'distclean        remove whatever configure created'
+	@echo 'doxygen          generate doxygen docs in doc/html dir'
+	@echo 'examples         make examples'
+	@echo 'help             display this list of make targets'
+	@echo 'install          install by copying the built files to system-wide dirs'
+	@echo 'install-examples install examples by copying the built files to system-wide dirs'
+	@echo 'install-strip    same as install but then strips debugging symbols'
+	@echo 'rat              produce a RAT licence compliance report of the source'
+	@echo 'rel-candidate    recreate a signed relelease candidate source package and a signed git tag'
+	@echo 'release          recreate a signed release source package and a signed git tag'
+	@echo 'tidy             run clang-tidy in fix-it mode'
diff --git a/cmd/traffic_top/Makefile.am b/build/tidy.mk
similarity index 52%
copy from cmd/traffic_top/Makefile.am
copy to build/tidy.mk
index 83591ef..a0d16fc 100644
--- a/cmd/traffic_top/Makefile.am
+++ b/build/tidy.mk
@@ -1,4 +1,3 @@
-#
 #  Licensed to the Apache Software Foundation (ASF) under one
 #  or more contributor license agreements.  See the NOTICE file
 #  distributed with this work for additional information
@@ -15,27 +14,20 @@
 #  See the License for the specific language governing permissions and
 #  limitations under the License.
 
-# We only build traffic_top if libcurses and libcurl are available.
-if BUILD_TRAFFIC_TOP
-
-AM_CPPFLAGS = \
-  $(iocore_include_dirs) \
-  -I$(top_srcdir)/lib \
-  -I$(top_srcdir)/mgmt/api/include \
-  @CURL_CFLAGS@
+Clang_Tidy_Options = -fix -fix-errors
 
-AM_LDFLAGS = \
-  @EXTRA_CXX_LDFLAGS@ \
-  @LIBTOOL_LINK_FLAGS@ \
-  @OPENSSL_LDFLAGS@
+# Sort the filenames to remove duplicates, then filter to retain
+# just the C and C++ sources so we don't pick up lex and yacc files
+# for example.
 
-bin_PROGRAMS = traffic_top
+Clang_Tidy_Files = $(filter %.cc %.c %.h %.hpp,$(sort $(1)))
 
-traffic_top_SOURCES = traffic_top.cc
-
-traffic_top_LDADD = \
-  $(top_builddir)/mgmt/api/libtsmgmt.la \
-  $(top_builddir)/lib/ts/libtsutil.la \
-  @CURL_LIBS@ @CURSES_LIB@
+#clang-tidy rules. We expect these to be actions with something like
+#$(DIST_SOURCES) as the dependencies.rules. Note that $DIST_SOURCES
+#is not an automake API, it is an implementation detail, but it ought
+#to be stable enough.
+#
+#All this clearly requires GNU make.
 
-endif
+CXX_Clang_Tidy = $(CLANG_TIDY) $(Clang_Tidy_Options) $(call Clang_Tidy_Files,$^) -- $(CXXCOMPILE) -x c++
+CC_Clang_Tidy = $(CLANG_TIDY) $(Clang_Tidy_Options) $(call Clang_Tidy_Files,$^) -- $(COMPILE) -x c
diff --git a/cmd/traffic_cop/Makefile.am b/cmd/traffic_cop/Makefile.am
index 027180f..8059515 100644
--- a/cmd/traffic_cop/Makefile.am
+++ b/cmd/traffic_cop/Makefile.am
@@ -40,3 +40,8 @@ traffic_cop_LDADD = \
   $(top_builddir)/lib/ts/libtsutil.la \
   $(top_builddir)/lib/records/librecords_cop.a \
   @LIBRESOLV@
+
+include $(top_srcdir)/build/tidy.mk
+
+tidy-local: $(DIST_SOURCES)
+	$(CXX_Clang_Tidy)
diff --git a/cmd/traffic_crashlog/Makefile.am b/cmd/traffic_crashlog/Makefile.am
index b977f51..7768105 100644
--- a/cmd/traffic_crashlog/Makefile.am
+++ b/cmd/traffic_crashlog/Makefile.am
@@ -43,3 +43,8 @@ traffic_crashlog_LDADD = \
   $(top_builddir)/mgmt/api/libtsmgmt.la \
   $(top_builddir)/lib/ts/libtsutil.la \
   @LIBTCL@ @HWLOC_LIBS@
+
+include $(top_srcdir)/build/tidy.mk
+
+tidy-local: $(DIST_SOURCES)
+	$(CXX_Clang_Tidy)
diff --git a/cmd/traffic_ctl/Makefile.am b/cmd/traffic_ctl/Makefile.am
index df7d26d..ac0a37a 100644
--- a/cmd/traffic_ctl/Makefile.am
+++ b/cmd/traffic_ctl/Makefile.am
@@ -39,3 +39,8 @@ traffic_ctl_LDADD = \
   $(top_builddir)/mgmt/api/libtsmgmt.la \
   $(top_builddir)/lib/ts/libtsutil.la \
   @LIBRESOLV@ @LIBTCL@
+
+include $(top_srcdir)/build/tidy.mk
+
+tidy-local: $(DIST_SOURCES)
+	$(CXX_Clang_Tidy)
diff --git a/cmd/traffic_layout/Makefile.am b/cmd/traffic_layout/Makefile.am
index a9f714e..08e0b4e 100644
--- a/cmd/traffic_layout/Makefile.am
+++ b/cmd/traffic_layout/Makefile.am
@@ -39,3 +39,8 @@ traffic_layout_LDADD = \
   $(top_builddir)/proxy/shared/libUglyLogStubs.a \
   $(top_builddir)/lib/ts/libtsutil.la \
   @LIBTCL@ @HWLOC_LIBS@
+
+include $(top_srcdir)/build/tidy.mk
+
+tidy-local: $(DIST_SOURCES)
+	$(CXX_Clang_Tidy)
diff --git a/cmd/traffic_manager/Makefile.am b/cmd/traffic_manager/Makefile.am
index 3fb5552..b96b07b 100644
--- a/cmd/traffic_manager/Makefile.am
+++ b/cmd/traffic_manager/Makefile.am
@@ -81,3 +81,8 @@ traffic_manager_LDADD += \
   $(top_builddir)/lib/tsconfig/libtsconfig.la \
   @OPENSSL_LIBS@
 endif
+
+include $(top_srcdir)/build/tidy.mk
+
+tidy-local: $(DIST_SOURCES)
+	$(CXX_Clang_Tidy)
diff --git a/cmd/traffic_top/Makefile.am b/cmd/traffic_top/Makefile.am
index 83591ef..e73eb47 100644
--- a/cmd/traffic_top/Makefile.am
+++ b/cmd/traffic_top/Makefile.am
@@ -39,3 +39,8 @@ traffic_top_LDADD = \
   @CURL_LIBS@ @CURSES_LIB@
 
 endif
+
+include $(top_srcdir)/build/tidy.mk
+
+tidy-local: $(DIST_SOURCES)
+	$(CXX_Clang_Tidy)
diff --git a/cmd/traffic_via/Makefile.am b/cmd/traffic_via/Makefile.am
index d09d8cc..6e8718d 100644
--- a/cmd/traffic_via/Makefile.am
+++ b/cmd/traffic_via/Makefile.am
@@ -38,3 +38,8 @@ traffic_via_LDADD = \
 
 TESTS = \
   test_traffic_via
+
+include $(top_srcdir)/build/tidy.mk
+
+tidy-local: $(DIST_SOURCES)
+	$(CXX_Clang_Tidy)
diff --git a/cmd/traffic_wccp/Makefile.am b/cmd/traffic_wccp/Makefile.am
index 12a66fd..8a44678 100644
--- a/cmd/traffic_wccp/Makefile.am
+++ b/cmd/traffic_wccp/Makefile.am
@@ -39,3 +39,8 @@ traffic_wccp_LDADD = \
   $(top_builddir)/lib/wccp/libwccp.a \
   $(top_builddir)/lib/ts/libtsutil.la \
   @OPENSSL_LIBS@
+
+include $(top_srcdir)/build/tidy.mk
+
+tidy-local: $(DIST_SOURCES)
+	$(CXX_Clang_Tidy)
diff --git a/configure.ac b/configure.ac
index 802f256..57775fe 100644
--- a/configure.ac
+++ b/configure.ac
@@ -41,11 +41,16 @@ AC_CONFIG_AUX_DIR([build/_aux])
 AC_CONFIG_SRCDIR([proxy/Main.cc])
 AC_CONFIG_MACRO_DIR([build])
 
-AM_INIT_AUTOMAKE([-Wall -Werror tar-ustar foreign no-installinfo no-installman subdir-objects 1.9.2])
+# NOTE: we turn off portability warnings because the clang-tidy targets use
+# GNU make extensions to filter the sources list.
+AM_INIT_AUTOMAKE([-Wall -Werror -Wno-portability tar-ustar foreign no-installinfo no-installman subdir-objects 1.9.2])
 
 # See discussion at https://autotools.io/automake/maintainer.html.
 AM_MAINTAINER_MODE([enable])
 
+# Enable a recursive "tidy" rule for clang-tidy.
+AM_EXTRA_RECURSIVE_TARGETS([tidy])
+
 AC_CONFIG_HEADERS([lib/ink_autoconf.h])
 
 # Configure with --disable-silent-rules to get verbose output. For more info, see
@@ -695,6 +700,11 @@ AC_ARG_VAR(SPHINXBUILD, [the sphinx-build documentation generator])
 AC_ARG_VAR(SPHINXOPTS, [additional sphinx-build options])
 AC_CHECK_PROG([SPHINXBUILD], [sphinx-build], [sphinx-build], [false])
 
+AC_ARG_VAR([CLANG_TIDY], [clang-tidy command])
+
+# Default CLANG_TIDY to "clang-tidy", or "false" if it is not present.
+AC_PATH_PROG([CLANG_TIDY], [clang-tidy],[false])
+
 AC_SUBST(TS_MAN1_MANPAGES)
 AC_SUBST(TS_MAN3_MANPAGES)
 AC_SUBST(TS_MAN5_MANPAGES)
diff --git a/example/Makefile.am b/example/Makefile.am
index 92571bb..d6807c4 100644
--- a/example/Makefile.am
+++ b/example/Makefile.am
@@ -89,3 +89,8 @@ version_la_SOURCES = version/version.c
 #
 # redirect_1_la_SOURCES = redirect-1/redirect-1.c
 # session_1_la_SOURCES = session-1/session-1.c
+
+include $(top_srcdir)/build/tidy.mk
+
+tidy-local: $(DIST_SOURCES)
+	$(CXX_Clang_Tidy)
diff --git a/iocore/Makefile.am b/iocore/Makefile.am
index cb597b6..3b52276 100644
--- a/iocore/Makefile.am
+++ b/iocore/Makefile.am
@@ -17,3 +17,8 @@
 #  limitations under the License.
 
 SUBDIRS = eventsystem net aio dns hostdb utils cache cluster
+
+include $(top_srcdir)/build/tidy.mk
+
+tidy-local: $(DIST_SOURCES)
+	$(CXX_Clang_Tidy)
diff --git a/iocore/aio/Makefile.am b/iocore/aio/Makefile.am
index b31ed3b..98bd000 100644
--- a/iocore/aio/Makefile.am
+++ b/iocore/aio/Makefile.am
@@ -61,3 +61,8 @@ test_AIO_LDADD = \
   $(top_builddir)/lib/ts/libtsutil.la \
   $(top_builddir)/proxy/shared/libUglyLogStubs.a \
   @LIBTCL@ @HWLOC_LIBS@
+
+include $(top_srcdir)/build/tidy.mk
+
+tidy-local: $(DIST_SOURCES)
+	$(CXX_Clang_Tidy)
diff --git a/iocore/cache/Makefile.am b/iocore/cache/Makefile.am
index 2d4cced..30cc96c 100644
--- a/iocore/cache/Makefile.am
+++ b/iocore/cache/Makefile.am
@@ -65,3 +65,8 @@ libinkcache_a_SOURCES = \
   RamCacheLRU.cc \
   Store.cc \
   $(ADD_SRC)
+
+include $(top_srcdir)/build/tidy.mk
+
+tidy-local: $(DIST_SOURCES)
+	$(CXX_Clang_Tidy)
diff --git a/iocore/cluster/Makefile.am b/iocore/cluster/Makefile.am
index 9e7e400..adafe68 100644
--- a/iocore/cluster/Makefile.am
+++ b/iocore/cluster/Makefile.am
@@ -57,3 +57,8 @@ libinkcluster_a_SOURCES = \
 #test_Cluster_SOURCES = \
 #  test_I_Cluster.cc \
 #  test_P_Cluster.cc
+
+include $(top_srcdir)/build/tidy.mk
+
+tidy-local: $(DIST_SOURCES)
+	$(CXX_Clang_Tidy)
diff --git a/iocore/dns/Makefile.am b/iocore/dns/Makefile.am
index 40c1ad3..df1311e 100644
--- a/iocore/dns/Makefile.am
+++ b/iocore/dns/Makefile.am
@@ -47,3 +47,8 @@ libinkdns_a_SOURCES = \
 #test_UNUSED_SOURCES = \
 #  test_I_DNS.cc \
 #  test_P_DNS.cc
+
+include $(top_srcdir)/build/tidy.mk
+
+tidy-local: $(DIST_SOURCES)
+	$(CXX_Clang_Tidy)
diff --git a/iocore/eventsystem/Makefile.am b/iocore/eventsystem/Makefile.am
index ce0b9aa..09d8eca 100644
--- a/iocore/eventsystem/Makefile.am
+++ b/iocore/eventsystem/Makefile.am
@@ -119,3 +119,8 @@ test_Event_LDFLAGS = $(test_LD_FLAGS)
 
 test_Buffer_LDADD = $(test_LD_ADD)
 test_Event_LDADD = $(test_LD_ADD)
+
+include $(top_srcdir)/build/tidy.mk
+
+tidy-local: $(DIST_SOURCES)
+	$(CXX_Clang_Tidy)
diff --git a/iocore/hostdb/Makefile.am b/iocore/hostdb/Makefile.am
index 47c6eff..e60c01b 100644
--- a/iocore/hostdb/Makefile.am
+++ b/iocore/hostdb/Makefile.am
@@ -31,8 +31,6 @@ EXTRA_DIST = I_HostDB.h
 noinst_LIBRARIES = libinkhostdb.a
 
 libinkhostdb_a_SOURCES = \
-  I_SplitDNS.h \
-  I_SplitDNSProcessor.h \
   HostDB.cc \
   I_HostDB.h \
   I_HostDBProcessor.h \
@@ -85,3 +83,8 @@ test_RefCountCache_CPPFLAGS = $(test_CPP_FLAGS)
 test_RefCountCache_LDFLAGS = $(test_LD_FLAGS)
 
 test_RefCountCache_LDADD = $(test_LD_ADD)
+
+include $(top_srcdir)/build/tidy.mk
+
+tidy-local: $(DIST_SOURCES)
+	$(CXX_Clang_Tidy)
diff --git a/iocore/net/Makefile.am b/iocore/net/Makefile.am
index 45d3ee9..a49a83c 100644
--- a/iocore/net/Makefile.am
+++ b/iocore/net/Makefile.am
@@ -130,3 +130,8 @@ if BUILD_TESTS
      NetVCTest.cc \
      P_NetVCTest.h
 endif
+
+include $(top_srcdir)/build/tidy.mk
+
+tidy-local: $(DIST_SOURCES)
+	$(CXX_Clang_Tidy)
diff --git a/iocore/utils/Makefile.am b/iocore/utils/Makefile.am
index 04eb284..eee3e01 100644
--- a/iocore/utils/Makefile.am
+++ b/iocore/utils/Makefile.am
@@ -30,3 +30,8 @@ libinkutils_a_SOURCES = \
   Machine.cc \
   OneWayMultiTunnel.cc \
   OneWayTunnel.cc
+
+include $(top_srcdir)/build/tidy.mk
+
+tidy-local: $(DIST_SOURCES)
+	$(CXX_Clang_Tidy)
diff --git a/lib/atscppapi/examples/Makefile.am b/lib/atscppapi/examples/Makefile.am
index f520f47..a0f4be5 100644
--- a/lib/atscppapi/examples/Makefile.am
+++ b/lib/atscppapi/examples/Makefile.am
@@ -16,6 +16,7 @@
 #  limitations under the License.
 
 include $(top_srcdir)/build/plugins.mk
+include $(top_srcdir)/build/tidy.mk
 
 plugins = \
 	AsyncHttpFetch.la \
@@ -98,3 +99,6 @@ TimeoutExamplePlugin_la_LIBADD = $(libatscppai)
 TransactionHookPlugin_la_LIBADD = $(libatscppai)
 boom_la_LIBADD = $(libatscppai)
 intercept_la_LIBADD = $(libatscppai)
+
+tidy-local: $(DIST_SOURCES)
+	$(CXX_Clang_Tidy)
diff --git a/lib/atscppapi/src/Makefile.am b/lib/atscppapi/src/Makefile.am
index 984e55d..587ccdc 100644
--- a/lib/atscppapi/src/Makefile.am
+++ b/lib/atscppapi/src/Makefile.am
@@ -55,33 +55,39 @@ libatscppapi_la_SOURCES = GlobalPlugin.cc \
 library_includedir=$(includedir)/atscppapi
 base_include_folder = $(top_srcdir)/$(subdir)/include/atscppapi
 
-library_include_HEADERS = $(base_include_folder)/GlobalPlugin.h \
-			  $(base_include_folder)/Plugin.h \
-			  $(base_include_folder)/PluginInit.h \
-			  $(base_include_folder)/Transaction.h \
-			  $(base_include_folder)/TransactionPlugin.h \
-			  $(base_include_folder)/HttpMethod.h \
-			  $(base_include_folder)/HttpStatus.h \
-			  $(base_include_folder)/HttpVersion.h \
-			  $(base_include_folder)/Headers.h \
-			  $(base_include_folder)/Request.h \
-			  $(base_include_folder)/CaseInsensitiveStringComparator.h \
-			  $(base_include_folder)/ClientRequest.h \
-	 		  $(base_include_folder)/Url.h \
-		 	  $(base_include_folder)/Response.h \
-			  $(base_include_folder)/utils.h \
-			  $(base_include_folder)/TransformationPlugin.h \
-			  $(base_include_folder)/Logger.h \
-			  $(base_include_folder)/noncopyable.h \
-			  $(base_include_folder)/Stat.h \
-			  $(base_include_folder)/Mutex.h \
-			  $(base_include_folder)/RemapPlugin.h \
-			  $(base_include_folder)/Async.h \
-			  $(base_include_folder)/AsyncHttpFetch.h \
-			  $(base_include_folder)/GzipDeflateTransformation.h \
-			  $(base_include_folder)/GzipInflateTransformation.h \
-			  $(base_include_folder)/AsyncTimer.h \
-			  $(base_include_folder)/InterceptPlugin.h
+library_include_HEADERS = \
+	$(base_include_folder)/GlobalPlugin.h \
+	$(base_include_folder)/Plugin.h \
+	$(base_include_folder)/PluginInit.h \
+	$(base_include_folder)/Transaction.h \
+	$(base_include_folder)/TransactionPlugin.h \
+	$(base_include_folder)/HttpMethod.h \
+	$(base_include_folder)/HttpStatus.h \
+	$(base_include_folder)/HttpVersion.h \
+	$(base_include_folder)/Headers.h \
+	$(base_include_folder)/Request.h \
+	$(base_include_folder)/CaseInsensitiveStringComparator.h \
+	$(base_include_folder)/ClientRequest.h \
+	$(base_include_folder)/Url.h \
+	$(base_include_folder)/Response.h \
+	$(base_include_folder)/utils.h \
+	$(base_include_folder)/TransformationPlugin.h \
+	$(base_include_folder)/Logger.h \
+	$(base_include_folder)/noncopyable.h \
+	$(base_include_folder)/Stat.h \
+	$(base_include_folder)/Mutex.h \
+	$(base_include_folder)/RemapPlugin.h \
+	$(base_include_folder)/Async.h \
+	$(base_include_folder)/AsyncHttpFetch.h \
+	$(base_include_folder)/GzipDeflateTransformation.h \
+	$(base_include_folder)/GzipInflateTransformation.h \
+	$(base_include_folder)/AsyncTimer.h \
+	$(base_include_folder)/InterceptPlugin.h
 
 library_include_HEADERS += \
-			  $(top_builddir)/$(subdir)/include/atscppapi/shared_ptr.h
+	$(top_builddir)/$(subdir)/include/atscppapi/shared_ptr.h
+
+include $(top_srcdir)/build/tidy.mk
+
+tidy-local: $(DIST_SOURCES)
+	$(CXX_Clang_Tidy)
diff --git a/lib/bindings/Makefile.am b/lib/bindings/Makefile.am
index 8d0738f..44f0e8b 100644
--- a/lib/bindings/Makefile.am
+++ b/lib/bindings/Makefile.am
@@ -16,6 +16,8 @@
 #  See the License for the specific language governing permissions and
 #  limitations under the License.
 
+include $(top_srcdir)/build/tidy.mk
+
 AM_CPPFLAGS = \
   $(LUAJIT_CPPFLAGS) \
   -I$(top_srcdir)/lib \
@@ -36,3 +38,5 @@ libbindings_la_SOURCES = \
   repl.cc \
   repl.h
 
+tidy-local: $(DIST_SOURCES)
+	$(CXX_Clang_Tidy)
diff --git a/lib/records/Makefile.am b/lib/records/Makefile.am
index f6a9c2e..450a271 100644
--- a/lib/records/Makefile.am
+++ b/lib/records/Makefile.am
@@ -16,6 +16,8 @@
 #  See the License for the specific language governing permissions and
 #  limitations under the License.
 
+include $(top_srcdir)/build/tidy.mk
+
 AM_CPPFLAGS = \
   -I$(top_srcdir)/iocore/eventsystem \
   -I$(top_srcdir)/iocore/utils \
@@ -67,3 +69,6 @@ librecords_cop_a_SOURCES = \
   RecConfigParse.cc \
   RecFile.cc \
   RecDebug.cc
+
+tidy-local: $(sort $(DIST_SOURCES))
+	$(CXX_Clang_Tidy)
diff --git a/lib/ts/Makefile.am b/lib/ts/Makefile.am
index 9a13750..1866ea0 100644
--- a/lib/ts/Makefile.am
+++ b/lib/ts/Makefile.am
@@ -16,6 +16,8 @@
 #  See the License for the specific language governing permissions and
 #  limitations under the License.
 
+include $(top_srcdir)/build/tidy.mk
+
 library_includedir=$(includedir)/ts
 
 library_include_HEADERS = apidefs.h
@@ -242,3 +244,7 @@ CompileParseRules_SOURCES = CompileParseRules.cc
 
 clean-local:
 	rm -f ParseRulesCType ParseRulesCTypeToLower ParseRulesCTypeToUpper
+
+tidy-local: $(DIST_SOURCES)
+	$(CXX_Clang_Tidy)
+
diff --git a/lib/tsconfig/Makefile.am b/lib/tsconfig/Makefile.am
index 5e21eff..cc48935 100644
--- a/lib/tsconfig/Makefile.am
+++ b/lib/tsconfig/Makefile.am
@@ -68,3 +68,8 @@ test_tsconfig_LDADD = libtsconfig.la ../ts/libtsutil.la
 # it more easily in C++.
 TsConfigGrammar.hpp: TsConfigGrammar.h BisonHeaderToC++.sed
 	$(SED) -f $(srcdir)/BisonHeaderToC++.sed $(srcdir)/TsConfigGrammar.h > $@
+
+include $(top_srcdir)/build/tidy.mk
+
+tidy-local: $(DIST_SOURCES)
+	$(CXX_Clang_Tidy)
diff --git a/lib/wccp/Makefile.am b/lib/wccp/Makefile.am
index fdb12e4..c32d467 100644
--- a/lib/wccp/Makefile.am
+++ b/lib/wccp/Makefile.am
@@ -17,6 +17,8 @@
 #  See the License for the specific language governing permissions and
 #  limitations under the License.
 
+include $(top_srcdir)/build/tidy.mk
+
 AM_CPPFLAGS = \
   -I$(top_srcdir)/lib \
   -I$(top_srcdir)/proxy/api/ts
@@ -41,3 +43,6 @@ libwccp_a_SOURCES = \
 #   wccp-test-cache.cc
 
 # test_cache_LDADD = $(LDADD) -L$(top_builddir)/lib/tsconfig -ltsconfig -L$(top_builddir)/lib/wccp -lwccp -L$(top_builddir)/lib/ts -ltsutil
+
+tidy-local: $(DIST_SOURCES)
+	$(CXX_Clang_Tidy)
diff --git a/mgmt/Makefile.am b/mgmt/Makefile.am
index 0cfabdf..77f3aa6 100644
--- a/mgmt/Makefile.am
+++ b/mgmt/Makefile.am
@@ -76,3 +76,8 @@ libmgmt_lm_la_LIBADD = \
 libmgmt_p_la_LIBADD = \
   libmgmt_c.la \
   $(top_builddir)/mgmt/utils/libutils_p.la
+
+include $(top_srcdir)/build/tidy.mk
+
+tidy-local: $(DIST_SOURCES)
+	$(CXX_Clang_Tidy)
diff --git a/mgmt/api/Makefile.am b/mgmt/api/Makefile.am
index e479a77..9d0606d 100644
--- a/mgmt/api/Makefile.am
+++ b/mgmt/api/Makefile.am
@@ -17,6 +17,8 @@
 #  See the License for the specific language governing permissions and
 #  limitations under the License.
 
+include $(top_srcdir)/build/tidy.mk
+
 SUBDIRS = include
 
 AM_CPPFLAGS = \
@@ -88,3 +90,6 @@ traffic_api_cli_remote_LDADD = \
   libtsmgmt.la \
   $(top_builddir)/lib/ts/libtsutil.la \
   @LIBTCL@ @OPENSSL_LIBS@
+
+tidy-local: $(DIST_SOURCES)
+	$(CXX_Clang_Tidy)
diff --git a/mgmt/cluster/Makefile.am b/mgmt/cluster/Makefile.am
index 34ca779..f88d303 100644
--- a/mgmt/cluster/Makefile.am
+++ b/mgmt/cluster/Makefile.am
@@ -17,6 +17,8 @@
 #  See the License for the specific language governing permissions and
 #  limitations under the License.
 
+include $(top_srcdir)/build/tidy.mk
+
 AM_CPPFLAGS = \
   -I$(top_srcdir)/lib/records \
   -I$(top_srcdir)/mgmt \
@@ -31,3 +33,6 @@ libcluster_la_SOURCES = \
   ClusterCom.h \
   VMap.cc \
   VMap.h
+
+tidy-local: $(DIST_SOURCES)
+	$(CXX_Clang_Tidy)
diff --git a/mgmt/utils/Makefile.am b/mgmt/utils/Makefile.am
index 31c8513..5495567 100644
--- a/mgmt/utils/Makefile.am
+++ b/mgmt/utils/Makefile.am
@@ -63,3 +63,8 @@ test_marshall_SOURCES = test_marshall.cc
 test_marshall_LDADD = \
   libutils_p.la \
   $(top_builddir)/lib/ts/libtsutil.la
+
+include $(top_srcdir)/build/tidy.mk
+
+tidy-local: $(DIST_SOURCES)
+	$(CXX_Clang_Tidy)
diff --git a/plugins/cacheurl/Makefile.am b/plugins/cacheurl/Makefile.am
index f5907fe..65d521a 100644
--- a/plugins/cacheurl/Makefile.am
+++ b/plugins/cacheurl/Makefile.am
@@ -19,3 +19,8 @@ include $(top_srcdir)/build/plugins.mk
 pkglib_LTLIBRARIES = cacheurl.la
 cacheurl_la_SOURCES = cacheurl.cc
 cacheurl_la_LDFLAGS = $(TS_PLUGIN_LDFLAGS)
+
+include $(top_srcdir)/build/tidy.mk
+
+tidy-local: $(DIST_SOURCES)
+	$(CXX_Clang_Tidy)
diff --git a/plugins/conf_remap/Makefile.am b/plugins/conf_remap/Makefile.am
index 48843d3..3495e40 100644
--- a/plugins/conf_remap/Makefile.am
+++ b/plugins/conf_remap/Makefile.am
@@ -19,3 +19,8 @@ include $(top_srcdir)/build/plugins.mk
 pkglib_LTLIBRARIES = conf_remap.la
 conf_remap_la_SOURCES = conf_remap.cc
 conf_remap_la_LDFLAGS = $(TS_PLUGIN_LDFLAGS)
+
+include $(top_srcdir)/build/tidy.mk
+
+tidy-local: $(DIST_SOURCES)
+	$(CXX_Clang_Tidy)
diff --git a/plugins/experimental/Makefile.am b/plugins/experimental/Makefile.am
index 04a75da..2d8a02f 100644
--- a/plugins/experimental/Makefile.am
+++ b/plugins/experimental/Makefile.am
@@ -64,3 +64,8 @@ endif
 if HAS_KYOTOCABINET
   SUBDIRS += cache_key_genid
 endif
+
+include $(top_srcdir)/build/tidy.mk
+
+tidy-local: $(DIST_SOURCES)
+	$(CXX_Clang_Tidy)
diff --git a/plugins/experimental/acme/Makefile.am b/plugins/experimental/acme/Makefile.am
index 3cf70c5..c1c29bf 100644
--- a/plugins/experimental/acme/Makefile.am
+++ b/plugins/experimental/acme/Makefile.am
@@ -19,3 +19,8 @@ include $(top_srcdir)/build/plugins.mk
 pkglib_LTLIBRARIES = acme.la
 acme_la_SOURCES = acme.c
 acme_la_LDFLAGS = $(TS_PLUGIN_LDFLAGS)
+
+include $(top_srcdir)/build/tidy.mk
+
+tidy-local: $(DIST_SOURCES)
+	$(CC_Clang_Tidy)
diff --git a/plugins/experimental/authproxy/Makefile.am b/plugins/experimental/authproxy/Makefile.am
index 844511a..e6c182f 100644
--- a/plugins/experimental/authproxy/Makefile.am
+++ b/plugins/experimental/authproxy/Makefile.am
@@ -20,3 +20,8 @@ pkglib_LTLIBRARIES = authproxy.la
 authproxy_la_SOURCES = authproxy.cc utils.cc utils.h
 authproxy_la_LDFLAGS = $(TS_PLUGIN_LDFLAGS)
 
+
+include $(top_srcdir)/build/tidy.mk
+
+tidy-local: $(DIST_SOURCES)
+	$(CXX_Clang_Tidy)
diff --git a/plugins/experimental/background_fetch/Makefile.am b/plugins/experimental/background_fetch/Makefile.am
index f841cf3..1f2ed5b 100644
--- a/plugins/experimental/background_fetch/Makefile.am
+++ b/plugins/experimental/background_fetch/Makefile.am
@@ -19,3 +19,8 @@ include $(top_srcdir)/build/plugins.mk
 pkglib_LTLIBRARIES = background_fetch.la
 background_fetch_la_SOURCES = background_fetch.cc headers.cc rules.cc configs.cc
 background_fetch_la_LDFLAGS = $(TS_PLUGIN_LDFLAGS)
+
+include $(top_srcdir)/build/tidy.mk
+
+tidy-local: $(DIST_SOURCES)
+	$(CXX_Clang_Tidy)
diff --git a/plugins/experimental/balancer/Makefile.am b/plugins/experimental/balancer/Makefile.am
index 02df2b9..29d2389 100644
--- a/plugins/experimental/balancer/Makefile.am
+++ b/plugins/experimental/balancer/Makefile.am
@@ -20,3 +20,8 @@ pkglib_LTLIBRARIES = balancer.la
 balancer_la_SOURCES = balancer.cc roundrobin.cc hash.cc balancer.h
 balancer_la_LDFLAGS = $(TS_PLUGIN_LDFLAGS)
 
+
+include $(top_srcdir)/build/tidy.mk
+
+tidy-local: $(DIST_SOURCES)
+	$(CXX_Clang_Tidy)
diff --git a/plugins/experimental/buffer_upload/Makefile.am b/plugins/experimental/buffer_upload/Makefile.am
index d21c09e..40cfbcf 100644
--- a/plugins/experimental/buffer_upload/Makefile.am
+++ b/plugins/experimental/buffer_upload/Makefile.am
@@ -19,3 +19,8 @@ include $(top_srcdir)/build/plugins.mk
 pkglib_LTLIBRARIES = buffer_upload.la
 buffer_upload_la_SOURCES = buffer_upload.cc
 buffer_upload_la_LDFLAGS = $(TS_PLUGIN_LDFLAGS)
+
+include $(top_srcdir)/build/tidy.mk
+
+tidy-local: $(DIST_SOURCES)
+	$(CXX_Clang_Tidy)
diff --git a/plugins/experimental/cache_key_genid/Makefile.am b/plugins/experimental/cache_key_genid/Makefile.am
index 41db138..39601ce 100644
--- a/plugins/experimental/cache_key_genid/Makefile.am
+++ b/plugins/experimental/cache_key_genid/Makefile.am
@@ -20,3 +20,8 @@ pkglib_LTLIBRARIES = cache_key_genid.la
 cache_key_genid_la_SOURCES = cache_key_genid.c
 cache_key_genid_la_LDFLAGS = $(TS_PLUGIN_LDFLAGS) $(LIB_KYOTOCABINET)
 
+
+include $(top_srcdir)/build/tidy.mk
+
+tidy-local: $(DIST_SOURCES)
+	$(CC_Clang_Tidy)
diff --git a/plugins/experimental/cache_promote/Makefile.am b/plugins/experimental/cache_promote/Makefile.am
index 8170aed..0fe88ca 100644
--- a/plugins/experimental/cache_promote/Makefile.am
+++ b/plugins/experimental/cache_promote/Makefile.am
@@ -19,3 +19,8 @@ include $(top_srcdir)/build/plugins.mk
 pkglib_LTLIBRARIES = cache_promote.la
 cache_promote_la_SOURCES = cache_promote.cc
 cache_promote_la_LDFLAGS = $(TS_PLUGIN_LDFLAGS)
+
+include $(top_srcdir)/build/tidy.mk
+
+tidy-local: $(DIST_SOURCES)
+	$(CXX_Clang_Tidy)
diff --git a/plugins/experimental/cache_range_requests/Makefile.am b/plugins/experimental/cache_range_requests/Makefile.am
index 5a27cac..0e6da6c 100644
--- a/plugins/experimental/cache_range_requests/Makefile.am
+++ b/plugins/experimental/cache_range_requests/Makefile.am
@@ -19,3 +19,8 @@ include $(top_srcdir)/build/plugins.mk
 pkglib_LTLIBRARIES = cache_range_requests.la
 cache_range_requests_la_SOURCES = cache_range_requests.cc
 cache_range_requests_la_LDFLAGS = $(TS_PLUGIN_LDFLAGS)
+
+include $(top_srcdir)/build/tidy.mk
+
+tidy-local: $(DIST_SOURCES)
+	$(CXX_Clang_Tidy)
diff --git a/plugins/experimental/cachekey/Makefile.am b/plugins/experimental/cachekey/Makefile.am
index efd4456..33204f2 100644
--- a/plugins/experimental/cachekey/Makefile.am
+++ b/plugins/experimental/cachekey/Makefile.am
@@ -23,3 +23,8 @@ cachekey_la_LDFLAGS = $(TS_PLUGIN_LDFLAGS)
 VIRTUALENV_DIR = ../../../ci/tsqa/virtualenv
 tsqa: $(VIRTUALENV_DIR)
 	@. $(VIRTUALENV_DIR)/bin/activate && $(VIRTUALENV_DIR)/bin/nosetests --with-xunit -sv --logging-level=INFO
+
+include $(top_srcdir)/build/tidy.mk
+
+tidy-local: $(DIST_SOURCES)
+	$(CXX_Clang_Tidy)
diff --git a/plugins/experimental/channel_stats/Makefile.am b/plugins/experimental/channel_stats/Makefile.am
index 032a8b2..664a9f2 100644
--- a/plugins/experimental/channel_stats/Makefile.am
+++ b/plugins/experimental/channel_stats/Makefile.am
@@ -19,3 +19,8 @@ include $(top_srcdir)/build/plugins.mk
 pkglib_LTLIBRARIES = channel_stats.la
 channel_stats_la_SOURCES = channel_stats.cc
 channel_stats_la_LDFLAGS = $(TS_PLUGIN_LDFLAGS)
+
+include $(top_srcdir)/build/tidy.mk
+
+tidy-local: $(DIST_SOURCES)
+	$(CXX_Clang_Tidy)
diff --git a/plugins/experimental/collapsed_connection/Makefile.am b/plugins/experimental/collapsed_connection/Makefile.am
index 8e8a2ac..b607075 100644
--- a/plugins/experimental/collapsed_connection/Makefile.am
+++ b/plugins/experimental/collapsed_connection/Makefile.am
@@ -19,3 +19,8 @@ include $(top_srcdir)/build/plugins.mk
 pkglib_LTLIBRARIES = collapsed_connection.la
 collapsed_connection_la_SOURCES = collapsed_connection.cc MurmurHash3.cc
 collapsed_connection_la_LDFLAGS = $(TS_PLUGIN_LDFLAGS)
+
+include $(top_srcdir)/build/tidy.mk
+
+tidy-local: $(DIST_SOURCES)
+	$(CXX_Clang_Tidy)
diff --git a/plugins/experimental/collapsed_forwarding/Makefile.am b/plugins/experimental/collapsed_forwarding/Makefile.am
index 6e46a92..4bab549 100644
--- a/plugins/experimental/collapsed_forwarding/Makefile.am
+++ b/plugins/experimental/collapsed_forwarding/Makefile.am
@@ -19,3 +19,8 @@ include $(top_srcdir)/build/plugins.mk
 pkglib_LTLIBRARIES = collapsed_forwarding.la
 collapsed_forwarding_la_SOURCES = collapsed_forwarding.cc
 collapsed_forwarding_la_LDFLAGS = $(TS_PLUGIN_LDFLAGS)
+
+include $(top_srcdir)/build/tidy.mk
+
+tidy-local: $(DIST_SOURCES)
+	$(CXX_Clang_Tidy)
diff --git a/plugins/experimental/custom_redirect/Makefile.am b/plugins/experimental/custom_redirect/Makefile.am
index 302244f..04ad2ef 100644
--- a/plugins/experimental/custom_redirect/Makefile.am
+++ b/plugins/experimental/custom_redirect/Makefile.am
@@ -20,3 +20,8 @@ pkglib_LTLIBRARIES = custom_redirect.la
 custom_redirect_la_SOURCES = custom_redirect.cc
 custom_redirect_la_LDFLAGS = $(TS_PLUGIN_LDFLAGS)
 
+
+include $(top_srcdir)/build/tidy.mk
+
+tidy-local: $(DIST_SOURCES)
+	$(CXX_Clang_Tidy)
diff --git a/plugins/experimental/epic/Makefile.am b/plugins/experimental/epic/Makefile.am
index 9fd33ed..f172554 100644
--- a/plugins/experimental/epic/Makefile.am
+++ b/plugins/experimental/epic/Makefile.am
@@ -20,3 +20,8 @@ pkglib_LTLIBRARIES = epic.la
 epic_la_SOURCES = epic.cc
 epic_la_LDFLAGS = $(TS_PLUGIN_LDFLAGS)
 
+
+include $(top_srcdir)/build/tidy.mk
+
+tidy-local: $(DIST_SOURCES)
+	$(CXX_Clang_Tidy)
diff --git a/plugins/experimental/escalate/Makefile.am b/plugins/experimental/escalate/Makefile.am
index 1537847..a81c52c 100644
--- a/plugins/experimental/escalate/Makefile.am
+++ b/plugins/experimental/escalate/Makefile.am
@@ -20,3 +20,8 @@ pkglib_LTLIBRARIES = escalate.la
 escalate_la_SOURCES = escalate.cc
 escalate_la_LDFLAGS = $(TS_PLUGIN_LDFLAGS)
 
+
+include $(top_srcdir)/build/tidy.mk
+
+tidy-local: $(DIST_SOURCES)
+	$(CXX_Clang_Tidy)
diff --git a/plugins/experimental/esi/Makefile.am b/plugins/experimental/esi/Makefile.am
index 9b4b8b0..e6dc2cd 100644
--- a/plugins/experimental/esi/Makefile.am
+++ b/plugins/experimental/esi/Makefile.am
@@ -102,3 +102,8 @@ TESTS = $(check_PROGRAMS)
 
 test:: $(TESTS)
 	for f in $(TESTS) ; do ./$$f; if [ $$? -ne 0 ]; then break; fi done
+
+include $(top_srcdir)/build/tidy.mk
+
+tidy-local: $(DIST_SOURCES)
+	$(CXX_Clang_Tidy)
diff --git a/plugins/experimental/generator/Makefile.am b/plugins/experimental/generator/Makefile.am
index 1a5b678..5a0ee3d 100644
--- a/plugins/experimental/generator/Makefile.am
+++ b/plugins/experimental/generator/Makefile.am
@@ -20,3 +20,8 @@ pkglib_LTLIBRARIES = generator.la
 generator_la_SOURCES = generator.cc
 generator_la_LDFLAGS = $(TS_PLUGIN_LDFLAGS)
 
+
+include $(top_srcdir)/build/tidy.mk
+
+tidy-local: $(DIST_SOURCES)
+	$(CXX_Clang_Tidy)
diff --git a/plugins/experimental/geoip_acl/Makefile.am b/plugins/experimental/geoip_acl/Makefile.am
index 34fb0c3..a5f79c3 100644
--- a/plugins/experimental/geoip_acl/Makefile.am
+++ b/plugins/experimental/geoip_acl/Makefile.am
@@ -20,3 +20,8 @@ pkglib_LTLIBRARIES = geoip_acl.la
 geoip_acl_la_SOURCES = acl.cc geoip_acl.cc
 geoip_acl_la_LDFLAGS = $(TS_PLUGIN_LDFLAGS)
 geoip_acl_la_LIBADD = $(GEO_LIBS)
+
+include $(top_srcdir)/build/tidy.mk
+
+tidy-local: $(DIST_SOURCES)
+	$(CXX_Clang_Tidy)
diff --git a/plugins/experimental/header_normalize/Makefile.am b/plugins/experimental/header_normalize/Makefile.am
index f5a7c00..3d2999d 100644
--- a/plugins/experimental/header_normalize/Makefile.am
+++ b/plugins/experimental/header_normalize/Makefile.am
@@ -19,3 +19,8 @@ include $(top_srcdir)/build/plugins.mk
 pkglib_LTLIBRARIES = header_normalize.la
 header_normalize_la_SOURCES = header_normalize.cc
 header_normalize_la_LDFLAGS = $(TS_PLUGIN_LDFLAGS)
+
+include $(top_srcdir)/build/tidy.mk
+
+tidy-local: $(DIST_SOURCES)
+	$(CXX_Clang_Tidy)
diff --git a/plugins/experimental/hipes/Makefile.am b/plugins/experimental/hipes/Makefile.am
index 650ce56..4eade47 100644
--- a/plugins/experimental/hipes/Makefile.am
+++ b/plugins/experimental/hipes/Makefile.am
@@ -20,3 +20,8 @@ pkglib_LTLIBRARIES = hipes.la
 
 hipes_la_SOURCES = hipes.cc
 hipes_la_LDFLAGS = $(TS_PLUGIN_LDFLAGS)
+
+include $(top_srcdir)/build/tidy.mk
+
+tidy-local: $(DIST_SOURCES)
+	$(CC_Clang_Tidy)
diff --git a/plugins/experimental/inliner/Makefile.am b/plugins/experimental/inliner/Makefile.am
index 3de9f55..7f2e84c 100644
--- a/plugins/experimental/inliner/Makefile.am
+++ b/plugins/experimental/inliner/Makefile.am
@@ -31,3 +31,8 @@ inliner_la_SOURCES = \
 
 inliner_la_LDFLAGS = $(TS_PLUGIN_LDFLAGS)
 
+
+include $(top_srcdir)/build/tidy.mk
+
+tidy-local: $(DIST_SOURCES)
+	$(CXX_Clang_Tidy)
diff --git a/plugins/experimental/memcache/Makefile.am b/plugins/experimental/memcache/Makefile.am
index f89e60f..7d5c64c 100644
--- a/plugins/experimental/memcache/Makefile.am
+++ b/plugins/experimental/memcache/Makefile.am
@@ -33,3 +33,8 @@ tsmemcache_la_SOURCES = \
   tsmemcache.cc
 
 tsmemcache_la_LDFLAGS = $(TS_PLUGIN_LDFLAGS)
+
+include $(top_srcdir)/build/tidy.mk
+
+tidy-local: $(DIST_SOURCES)
+	$(CXX_Clang_Tidy)
diff --git a/plugins/experimental/memcached_remap/Makefile.am b/plugins/experimental/memcached_remap/Makefile.am
index 0ac0e91..9284ac5 100644
--- a/plugins/experimental/memcached_remap/Makefile.am
+++ b/plugins/experimental/memcached_remap/Makefile.am
@@ -26,3 +26,8 @@ memcached_remap_la_LDFLAGS = $(TS_PLUGIN_LDFLAGS)
 memcached_remap_la_LIBADD = $(LIBMEMCACHED_LIBS)
 
 endif
+
+include $(top_srcdir)/build/tidy.mk
+
+tidy-local: $(DIST_SOURCES)
+	$(CXX_Clang_Tidy)
diff --git a/plugins/experimental/metalink/Makefile.am b/plugins/experimental/metalink/Makefile.am
index 490c980..0938ca3 100644
--- a/plugins/experimental/metalink/Makefile.am
+++ b/plugins/experimental/metalink/Makefile.am
@@ -19,3 +19,8 @@ include $(top_srcdir)/build/plugins.mk
 pkglib_LTLIBRARIES = metalink.la
 metalink_la_SOURCES = metalink.cc
 metalink_la_LDFLAGS = $(TS_PLUGIN_LDFLAGS)
+
+include $(top_srcdir)/build/tidy.mk
+
+tidy-local: $(DIST_SOURCES)
+	$(CXX_Clang_Tidy)
diff --git a/plugins/experimental/mp4/Makefile.am b/plugins/experimental/mp4/Makefile.am
index 2ce955d..28410ca 100644
--- a/plugins/experimental/mp4/Makefile.am
+++ b/plugins/experimental/mp4/Makefile.am
@@ -19,3 +19,8 @@ include $(top_srcdir)/build/plugins.mk
 pkglib_LTLIBRARIES = mp4.la
 mp4_la_SOURCES = mp4.cc mp4_common.h mp4_meta.cc mp4_meta.h
 mp4_la_LDFLAGS = $(TS_PLUGIN_LDFLAGS)
+
+include $(top_srcdir)/build/tidy.mk
+
+tidy-local: $(DIST_SOURCES)
+	$(CXX_Clang_Tidy)
diff --git a/plugins/experimental/multiplexer/Makefile.am b/plugins/experimental/multiplexer/Makefile.am
index e93d45c..0ec912a 100644
--- a/plugins/experimental/multiplexer/Makefile.am
+++ b/plugins/experimental/multiplexer/Makefile.am
@@ -30,3 +30,8 @@ multiplexer_la_SOURCES = \
   ts.cc
 
 multiplexer_la_LDFLAGS = $(TS_PLUGIN_LDFLAGS)
+
+include $(top_srcdir)/build/tidy.mk
+
+tidy-local: $(DIST_SOURCES)
+	$(CXX_Clang_Tidy)
diff --git a/plugins/experimental/mysql_remap/Makefile.am b/plugins/experimental/mysql_remap/Makefile.am
index 6f38e6b..1ac484c 100644
--- a/plugins/experimental/mysql_remap/Makefile.am
+++ b/plugins/experimental/mysql_remap/Makefile.am
@@ -30,3 +30,8 @@ libmysql_remap_la_SOURCES = \
 
 mysql_remap_la_LDFLAGS = $(TS_PLUGIN_LDFLAGS) $(LIB_MYSQLCLIENT)
 mysql_remap_la_LIBADD = libmysql_remap.la
+
+include $(top_srcdir)/build/tidy.mk
+
+tidy-local: $(DIST_SOURCES)
+	$(CC_Clang_Tidy)
diff --git a/plugins/experimental/regex_revalidate/Makefile.am b/plugins/experimental/regex_revalidate/Makefile.am
index 0fa95d2..62f4cc8 100644
--- a/plugins/experimental/regex_revalidate/Makefile.am
+++ b/plugins/experimental/regex_revalidate/Makefile.am
@@ -19,3 +19,8 @@ include $(top_srcdir)/build/plugins.mk
 pkglib_LTLIBRARIES = regex_revalidate.la
 regex_revalidate_la_SOURCES = regex_revalidate.c
 regex_revalidate_la_LDFLAGS = $(TS_PLUGIN_LDFLAGS)
+
+include $(top_srcdir)/build/tidy.mk
+
+tidy-local: $(DIST_SOURCES)
+	$(CXX_Clang_Tidy)
diff --git a/plugins/experimental/remap_stats/Makefile.am b/plugins/experimental/remap_stats/Makefile.am
index a817bb8..ba54f5b 100644
--- a/plugins/experimental/remap_stats/Makefile.am
+++ b/plugins/experimental/remap_stats/Makefile.am
@@ -23,3 +23,8 @@ remap_stats_la_SOURCES = remap_stats.c
 remap_stats_la_LDFLAGS = $(TS_PLUGIN_LDFLAGS)
 
 endif
+
+include $(top_srcdir)/build/tidy.mk
+
+tidy-local: $(DIST_SOURCES)
+	$(CC_Clang_Tidy)
diff --git a/plugins/experimental/s3_auth/Makefile.am b/plugins/experimental/s3_auth/Makefile.am
index d2d3172..d4ecca1 100644
--- a/plugins/experimental/s3_auth/Makefile.am
+++ b/plugins/experimental/s3_auth/Makefile.am
@@ -19,3 +19,8 @@ include $(top_srcdir)/build/plugins.mk
 pkglib_LTLIBRARIES = s3_auth.la
 s3_auth_la_SOURCES = s3_auth.cc
 s3_auth_la_LDFLAGS = $(TS_PLUGIN_LDFLAGS)
+
+include $(top_srcdir)/build/tidy.mk
+
+tidy-local: $(DIST_SOURCES)
+	$(CXX_Clang_Tidy)
diff --git a/plugins/experimental/ssl_cert_loader/Makefile.am b/plugins/experimental/ssl_cert_loader/Makefile.am
index 6ef86f9..f1b89e2 100644
--- a/plugins/experimental/ssl_cert_loader/Makefile.am
+++ b/plugins/experimental/ssl_cert_loader/Makefile.am
@@ -23,3 +23,8 @@ pkglib_LTLIBRARIES = ssl_cert_loader.la
 ssl_cert_loader_la_SOURCES = ssl-cert-loader.cc domain-tree.cc
 ssl_cert_loader_la_LDFLAGS = $(TS_PLUGIN_LDFLAGS)
 ssl_cert_loader_la_LIBADD = $(top_builddir)/lib/tsconfig/libtsconfig.la
+
+include $(top_srcdir)/build/tidy.mk
+
+tidy-local: $(DIST_SOURCES)
+	$(CXX_Clang_Tidy)
diff --git a/plugins/experimental/sslheaders/Makefile.am b/plugins/experimental/sslheaders/Makefile.am
index 44a7ff7..f901619 100644
--- a/plugins/experimental/sslheaders/Makefile.am
+++ b/plugins/experimental/sslheaders/Makefile.am
@@ -37,3 +37,8 @@ test_sslheaders_LDADD = \
   @OPENSSL_LIBS@
 
 TESTS = $(check_PROGRAMS)
+
+include $(top_srcdir)/build/tidy.mk
+
+tidy-local: $(DIST_SOURCES)
+	$(CXX_Clang_Tidy)
diff --git a/plugins/experimental/stale_while_revalidate/Makefile.am b/plugins/experimental/stale_while_revalidate/Makefile.am
index 5bff627..a172f7f 100644
--- a/plugins/experimental/stale_while_revalidate/Makefile.am
+++ b/plugins/experimental/stale_while_revalidate/Makefile.am
@@ -19,3 +19,8 @@ include $(top_srcdir)/build/plugins.mk
 pkglib_LTLIBRARIES = stale_while_revalidate.la
 stale_while_revalidate_la_SOURCES = stale_while_revalidate.c
 stale_while_revalidate_la_LDFLAGS = $(TS_PLUGIN_LDFLAGS)
+
+include $(top_srcdir)/build/tidy.mk
+
+tidy-local: $(DIST_SOURCES)
+	$(CXX_Clang_Tidy)
diff --git a/plugins/experimental/stream_editor/Makefile.am b/plugins/experimental/stream_editor/Makefile.am
index d2f6968..597a96f 100644
--- a/plugins/experimental/stream_editor/Makefile.am
+++ b/plugins/experimental/stream_editor/Makefile.am
@@ -19,3 +19,8 @@ include $(top_srcdir)/build/plugins.mk
 pkglib_LTLIBRARIES = stream_editor.la
 stream_editor_la_SOURCES = stream_editor.cc
 stream_editor_la_LDFLAGS = $(TS_PLUGIN_LDFLAGS)
+
+include $(top_srcdir)/build/tidy.mk
+
+tidy-local: $(DIST_SOURCES)
+	$(CXX_Clang_Tidy)
diff --git a/plugins/experimental/ts_lua/Makefile.am b/plugins/experimental/ts_lua/Makefile.am
index 7cf1b35..0ad2245 100644
--- a/plugins/experimental/ts_lua/Makefile.am
+++ b/plugins/experimental/ts_lua/Makefile.am
@@ -52,3 +52,8 @@ tslua_la_SOURCES = \
   ts_lua_constant.c
 
 tslua_la_LDFLAGS = $(TS_PLUGIN_LDFLAGS)
+
+include $(top_srcdir)/build/tidy.mk
+
+tidy-local: $(DIST_SOURCES)
+	$(CC_Clang_Tidy)
diff --git a/plugins/experimental/url_sig/Makefile.am b/plugins/experimental/url_sig/Makefile.am
index a9011ff..97d736b 100644
--- a/plugins/experimental/url_sig/Makefile.am
+++ b/plugins/experimental/url_sig/Makefile.am
@@ -19,3 +19,8 @@ include $(top_srcdir)/build/plugins.mk
 pkglib_LTLIBRARIES = url_sig.la
 url_sig_la_SOURCES = url_sig.c
 url_sig_la_LDFLAGS = $(TS_PLUGIN_LDFLAGS)
+
+include $(top_srcdir)/build/tidy.mk
+
+tidy-local: $(DIST_SOURCES)
+	$(CXX_Clang_Tidy)
diff --git a/plugins/experimental/webp_transform/Makefile.am b/plugins/experimental/webp_transform/Makefile.am
index 1e3ab26..9805f08 100644
--- a/plugins/experimental/webp_transform/Makefile.am
+++ b/plugins/experimental/webp_transform/Makefile.am
@@ -31,3 +31,8 @@ WebpTransform_la_LDFLAGS = \
 WebpTransform_la_LIBADD = \
   -latscppapi \
   $(LIBMAGICKCPP_LIBS)
+
+include $(top_srcdir)/build/tidy.mk
+
+tidy-local: $(DIST_SOURCES)
+	$(CXX_Clang_Tidy)
diff --git a/plugins/experimental/xdebug/Makefile.am b/plugins/experimental/xdebug/Makefile.am
index 452c210..e28c305 100644
--- a/plugins/experimental/xdebug/Makefile.am
+++ b/plugins/experimental/xdebug/Makefile.am
@@ -20,3 +20,8 @@ pkglib_LTLIBRARIES = xdebug.la
 xdebug_la_SOURCES = xdebug.cc
 xdebug_la_LDFLAGS = $(TS_PLUGIN_LDFLAGS)
 
+
+include $(top_srcdir)/build/tidy.mk
+
+tidy-local: $(DIST_SOURCES)
+	$(CXX_Clang_Tidy)
diff --git a/plugins/gzip/Makefile.am b/plugins/gzip/Makefile.am
index 3c7861b..c7ee9ee 100644
--- a/plugins/gzip/Makefile.am
+++ b/plugins/gzip/Makefile.am
@@ -19,3 +19,8 @@ include $(top_srcdir)/build/plugins.mk
 pkglib_LTLIBRARIES = gzip.la
 gzip_la_SOURCES = gzip.cc configuration.cc misc.cc
 gzip_la_LDFLAGS = $(TS_PLUGIN_LDFLAGS)
+
+include $(top_srcdir)/build/tidy.mk
+
+tidy-local: $(DIST_SOURCES)
+	$(CXX_Clang_Tidy)
diff --git a/plugins/header_rewrite/Makefile.am b/plugins/header_rewrite/Makefile.am
index 7ef75b1..b0a2f63 100644
--- a/plugins/header_rewrite/Makefile.am
+++ b/plugins/header_rewrite/Makefile.am
@@ -38,3 +38,8 @@ header_rewrite_la_LIBADD = $(GEO_LIBS)
 bin_PROGRAMS = header_rewrite_test
 header_rewrite_test_SOURCES = parser.cc header_rewrite_test.cc
 header_rewrite_test_CXXFLAGS = $(AM_CXXFLAGS)
+
+include $(top_srcdir)/build/tidy.mk
+
+tidy-local: $(DIST_SOURCES)
+	$(CXX_Clang_Tidy)
diff --git a/plugins/healthchecks/Makefile.am b/plugins/healthchecks/Makefile.am
index 9af3a5e..20d68ef 100644
--- a/plugins/healthchecks/Makefile.am
+++ b/plugins/healthchecks/Makefile.am
@@ -23,3 +23,8 @@ healthchecks_la_SOURCES = healthchecks.c
 healthchecks_la_LDFLAGS = $(TS_PLUGIN_LDFLAGS)
 
 endif
+
+include $(top_srcdir)/build/tidy.mk
+
+tidy-local: $(DIST_SOURCES)
+	$(CC_Clang_Tidy)
diff --git a/plugins/libloader/Makefile.am b/plugins/libloader/Makefile.am
index 1a91a0f..e52c617 100644
--- a/plugins/libloader/Makefile.am
+++ b/plugins/libloader/Makefile.am
@@ -19,3 +19,8 @@ include $(top_srcdir)/build/plugins.mk
 pkglib_LTLIBRARIES = libloader.la
 libloader_la_SOURCES = libloader.c
 libloader_la_LDFLAGS = $(TS_PLUGIN_LDFLAGS)
+
+include $(top_srcdir)/build/tidy.mk
+
+tidy-local: $(DIST_SOURCES)
+	$(CXX_Clang_Tidy)
diff --git a/plugins/regex_remap/Makefile.am b/plugins/regex_remap/Makefile.am
index 5a696cb..8e4c41c 100644
--- a/plugins/regex_remap/Makefile.am
+++ b/plugins/regex_remap/Makefile.am
@@ -19,3 +19,8 @@ include $(top_srcdir)/build/plugins.mk
 pkglib_LTLIBRARIES = regex_remap.la
 regex_remap_la_SOURCES = regex_remap.cc
 regex_remap_la_LDFLAGS = $(TS_PLUGIN_LDFLAGS)
+
+include $(top_srcdir)/build/tidy.mk
+
+tidy-local: $(DIST_SOURCES)
+	$(CXX_Clang_Tidy)
diff --git a/plugins/stats_over_http/Makefile.am b/plugins/stats_over_http/Makefile.am
index a9c04d7..d92d815 100644
--- a/plugins/stats_over_http/Makefile.am
+++ b/plugins/stats_over_http/Makefile.am
@@ -19,3 +19,8 @@ include $(top_srcdir)/build/plugins.mk
 pkglib_LTLIBRARIES = stats_over_http.la
 stats_over_http_la_SOURCES = stats_over_http.c
 stats_over_http_la_LDFLAGS = $(TS_PLUGIN_LDFLAGS)
+
+include $(top_srcdir)/build/tidy.mk
+
+tidy-local: $(DIST_SOURCES)
+	$(CXX_Clang_Tidy)
diff --git a/plugins/tcpinfo/Makefile.am b/plugins/tcpinfo/Makefile.am
index ae1078b..9865ad5 100644
--- a/plugins/tcpinfo/Makefile.am
+++ b/plugins/tcpinfo/Makefile.am
@@ -20,3 +20,8 @@ pkglib_LTLIBRARIES = tcpinfo.la
 tcpinfo_la_SOURCES = tcpinfo.cc
 tcpinfo_la_LDFLAGS = $(TS_PLUGIN_LDFLAGS)
 
+
+include $(top_srcdir)/build/tidy.mk
+
+tidy-local: $(DIST_SOURCES)
+	$(CXX_Clang_Tidy)
diff --git a/proxy/Makefile.am b/proxy/Makefile.am
index 1e75378..d37a430 100644
--- a/proxy/Makefile.am
+++ b/proxy/Makefile.am
@@ -16,6 +16,8 @@
 #  See the License for the specific language governing permissions and
 #  limitations under the License.
 
+include $(top_srcdir)/build/tidy.mk
+
 # Note that hdrs is targeted from ../Makefile.am
 SUBDIRS = congest http http2 spdy logging config
 noinst_LIBRARIES =
@@ -279,6 +281,9 @@ test_xml_parser_LDADD = \
 
 versiondir = $(pkgsysconfdir)
 
+tidy-local: $(noinst_HEADERS) $(traffic_server_SOURCES)
+	$(CXX_Clang_Tidy)
+
 install-data-local:
 	if [ `id -un` != "root" ]; then \
 		$(INSTALL) -d $(DESTDIR)$(pkglocalstatedir) $(DESTDIR)$(pkglogdir) $(DESTDIR)$(pkgruntimedir) \
diff --git a/proxy/hdrs/Makefile.am b/proxy/hdrs/Makefile.am
index 4b7fb54..eb679b6 100644
--- a/proxy/hdrs/Makefile.am
+++ b/proxy/hdrs/Makefile.am
@@ -16,6 +16,8 @@
 #  See the License for the specific language governing permissions and
 #  limitations under the License.
 
+include $(top_srcdir)/build/tidy.mk
+
 AM_CPPFLAGS = \
   $(iocore_include_dirs) \
   -I$(top_srcdir)/lib \
@@ -79,3 +81,6 @@ test_mime_SOURCES = test_mime.cc
 #test_UNUSED_SOURCES = \
 #  test_header.cc \
 #  test_urlhash.cc
+
+tidy-local: $(libhdrs_a_SOURCES)
+	$(CXX_Clang_Tidy)
diff --git a/proxy/http/Makefile.am b/proxy/http/Makefile.am
index 499eded..afe268d 100644
--- a/proxy/http/Makefile.am
+++ b/proxy/http/Makefile.am
@@ -16,6 +16,8 @@
 #  See the License for the specific language governing permissions and
 #  limitations under the License.
 
+include $(top_srcdir)/build/tidy.mk
+
 SUBDIRS = remap
 
 AM_CPPFLAGS = \
@@ -79,6 +81,9 @@ if BUILD_TESTS
     RegressionHttpTransact.cc
 endif
 
+tidy-local: $(libhttp_a_SOURCES) $(noinst_HEADERS)
+	$(CXX_Clang_Tidy)
+
 #test_UNUSED_SOURCES = \
 #  TestHttpTransact.cc \
 #  TestUrl.cc \
diff --git a/proxy/http/remap/Makefile.am b/proxy/http/remap/Makefile.am
index 711e319..29412b5 100644
--- a/proxy/http/remap/Makefile.am
+++ b/proxy/http/remap/Makefile.am
@@ -16,6 +16,8 @@
 #  See the License for the specific language governing permissions and
 #  limitations under the License.
 
+include $(top_srcdir)/build/tidy.mk
+
 AM_CPPFLAGS = \
   $(iocore_include_dirs) \
   -I$(top_srcdir)/lib \
@@ -47,3 +49,6 @@ libhttp_remap_a_SOURCES = \
   UrlMappingPathIndex.h \
   UrlRewrite.cc \
   UrlRewrite.h
+
+tidy-local: $(libhttp_remap_a_SOURCES)
+	$(CXX_Clang_Tidy)
diff --git a/proxy/http2/Makefile.am b/proxy/http2/Makefile.am
index 68bb8a5..a99dee6 100644
--- a/proxy/http2/Makefile.am
+++ b/proxy/http2/Makefile.am
@@ -16,6 +16,8 @@
 #  See the License for the specific language governing permissions and
 #  limitations under the License.
 
+include $(top_srcdir)/build/tidy.mk
+
 AM_CPPFLAGS = \
   $(iocore_include_dirs) \
   -I$(top_srcdir)/proxy/api/ts \
@@ -95,3 +97,7 @@ test_HPACK_SOURCES = \
   HuffmanCodec.h \
   HPACK.cc \
   HPACK.h
+
+tidy-local: $(libhttp2_a_SOURCES) $(test_Huffmancode_SOURCES) \
+		$(test_Http2DependencyTree_SOURCES) $(test_HPACK_SOURCES)
+	$(CXX_Clang_Tidy)
diff --git a/proxy/logging/Makefile.am b/proxy/logging/Makefile.am
index bfcd942..13d52ff 100644
--- a/proxy/logging/Makefile.am
+++ b/proxy/logging/Makefile.am
@@ -16,6 +16,8 @@
 #  See the License for the specific language governing permissions and
 #  limitations under the License.
 
+include $(top_srcdir)/build/tidy.mk
+
 AM_CPPFLAGS = \
   $(iocore_include_dirs) \
   -I$(top_srcdir)/lib \
@@ -79,3 +81,6 @@ liblogcollation_a_SOURCES = \
 #test_UNUSED_SOURCES = \
 #  LogAccessTest.cc \
 #  LogAccessTest.h
+
+tidy-local: $(liblogging_a_SOURCES) $(liblogcollation_a_SOURCES) $(EXTRA_DIST)
+	$(CXX_Clang_Tidy)
diff --git a/proxy/shared/Makefile.am b/proxy/shared/Makefile.am
index 577f8b3..ce0e83d 100644
--- a/proxy/shared/Makefile.am
+++ b/proxy/shared/Makefile.am
@@ -16,6 +16,8 @@
 #  See the License for the specific language governing permissions and
 #  limitations under the License.
 
+include $(top_srcdir)/build/tidy.mk
+
 # Note that hdrs is targeted from ../Makefile.am
 noinst_LIBRARIES = \
   liberror.a \
@@ -50,3 +52,7 @@ libUglyLogStubs_a_SOURCES = \
 libxml_a_SOURCES = \
   InkXml.cc \
   InkXml.h
+
+tidy-local: $(liberror_a_SOURCES) $(libdiagsconfig_a_SOURCES) \
+		$(libUglyLogStubs_a_SOURCES) $(libxml_a_SOURCES)
+	$(CXX_Clang_Tidy)
diff --git a/proxy/spdy/Makefile.am b/proxy/spdy/Makefile.am
index d8f7c86..f31ba42 100644
--- a/proxy/spdy/Makefile.am
+++ b/proxy/spdy/Makefile.am
@@ -16,6 +16,8 @@
 #  See the License for the specific language governing permissions and
 #  limitations under the License.
 
+include $(top_srcdir)/build/tidy.mk
+
 AM_CPPFLAGS = \
   $(iocore_include_dirs) \
   -I$(top_srcdir)/proxy/api/ts \
@@ -46,3 +48,6 @@ libspdy_a_SOURCES += \
   SpdyCommon.cc \
   SpdyCommon.h
 endif
+
+tidy-local: $(libspdy_a_SOURCES)
+	$(CXX_Clang_Tidy)

-- 
To stop receiving notification emails like this one, please contact
['"commits@trafficserver.apache.org" <co...@trafficserver.apache.org>'].