From d69f4818c7bc36f000d3800b129a69cf7b3fdd40 Mon Sep 17 00:00:00 2001 From: James Peach Date: Mon, 27 Jun 2016 22:38:35 -0700 Subject: [PATCH] Integrate clang-tidy into the build. 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 +++++------ build/tidy.mk | 33 ++++++++++ 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 ++ .../experimental/background_fetch/Makefile.am | 5 ++ plugins/experimental/balancer/Makefile.am | 5 ++ .../experimental/buffer_upload/Makefile.am | 5 ++ .../experimental/cache_key_genid/Makefile.am | 5 ++ .../experimental/cache_promote/Makefile.am | 5 ++ .../cache_range_requests/Makefile.am | 5 ++ plugins/experimental/cachekey/Makefile.am | 5 ++ .../experimental/channel_stats/Makefile.am | 5 ++ .../collapsed_connection/Makefile.am | 5 ++ .../collapsed_forwarding/Makefile.am | 5 ++ .../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 ++ .../experimental/header_normalize/Makefile.am | 5 ++ plugins/experimental/hipes/Makefile.am | 5 ++ plugins/experimental/inliner/Makefile.am | 5 ++ plugins/experimental/memcache/Makefile.am | 5 ++ .../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 ++ .../experimental/regex_revalidate/Makefile.am | 5 ++ plugins/experimental/remap_stats/Makefile.am | 5 ++ plugins/experimental/s3_auth/Makefile.am | 5 ++ .../experimental/ssl_cert_loader/Makefile.am | 5 ++ plugins/experimental/sslheaders/Makefile.am | 5 ++ .../stale_while_revalidate/Makefile.am | 5 ++ .../experimental/stream_editor/Makefile.am | 5 ++ plugins/experimental/ts_lua/Makefile.am | 5 ++ plugins/experimental/url_sig/Makefile.am | 5 ++ .../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, 519 insertions(+), 50 deletions(-) create mode 100644 build/tidy.mk diff --git a/.clang-tidy b/.clang-tidy index f2a4a41779c..0afc80f86b0 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 f088fb886b2..7a8b5c7fb1e 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/build/tidy.mk b/build/tidy.mk new file mode 100644 index 00000000000..a0d16fc0717 --- /dev/null +++ b/build/tidy.mk @@ -0,0 +1,33 @@ +# 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 +# regarding copyright ownership. The ASF licenses this file +# to you under the Apache License, Version 2.0 (the +# "License"); you may not use this file except in compliance +# with the License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +Clang_Tidy_Options = -fix -fix-errors + +# 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. + +Clang_Tidy_Files = $(filter %.cc %.c %.h %.hpp,$(sort $(1))) + +#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. + +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 027180f375c..805951500fc 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 b977f51e5cf..77681056c09 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 df7d26d454f..ac0a37a1d5b 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 a9f714e072c..08e0b4eb69a 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 3fb5552b85c..b96b07b07cb 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 83591efd385..e73eb477d81 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 d09d8ccc763..6e8718d8595 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 12a66fd13b7..8a44678f229 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 802f2563e51..57775fef42e 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 92571bb3cfc..d6807c4b54a 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 cb597b61b82..3b52276e17f 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 b31ed3b79b2..98bd00058e3 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 2d4cced1454..30cc96c1af1 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 9e7e400f43d..adafe683da7 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 40c1ad3a762..df1311ea095 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 ce0b9aa7c42..09d8eca6738 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 47c6eff6e7f..e60c01b51ee 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 45d3ee9894a..a49a83cca10 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 04eb284c290..eee3e016d68 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 f520f4705d5..a0f4be5596f 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 984e55d8492..587ccdc2731 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 8d0738f43c5..44f0e8b1958 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 f6a9c2e727b..450a2718216 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 9a137506aea..1866ea06f40 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 5e21eff2c84..cc489354e04 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 fdb12e414f0..c32d4675be4 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 0cfabdf1390..77f3aa6b778 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 e479a7772ec..9d0606d64b8 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 34ca779a631..f88d303acc4 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 31c8513fa10..5495567d93d 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 f5907fe41d9..65d521a3163 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 48843d3f7b8..3495e407a4f 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 04a75da6a03..2d8a02f13ea 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 3cf70c50c6b..c1c29bf04c7 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 844511a5c15..e6c182f0a2b 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 f841cf3ca60..1f2ed5ba26c 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 02df2b9575c..29d23893cb5 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 d21c09e97a5..40cfbcf7e36 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 41db1387ad3..39601ce2e59 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 8170aeddb08..0fe88caf4b6 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 5a27cac65d1..0e6da6c7b96 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 efd44561d0d..33204f26478 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 032a8b2d4a9..664a9f2a8c7 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 8e8a2ac9890..b60707576e1 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 6e46a92acae..4bab5490fdf 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 302244f09f1..04ad2effbf4 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 9fd33eddc43..f1725549096 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 1537847ceb2..a81c52c23bf 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 9b4b8b08c4b..e6dc2cdd5de 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 1a5b6785178..5a0ee3d73d4 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 34fb0c30e1f..a5f79c39b76 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 f5a7c001800..3d2999d384d 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 650ce567abf..4eade472a10 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 3de9f5510b4..7f2e84c3d15 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 f89e60fe048..7d5c64cca5d 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 0ac0e91eb71..9284ac5eb69 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 490c980024a..0938ca3bf93 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 2ce955d6be8..28410ca4543 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 e93d45cda9b..0ec912a7f41 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 6f38e6b3384..1ac484cf073 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 0fa95d20576..62f4cc87fea 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 a817bb835bc..ba54f5bfc82 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 d2d3172bf95..d4ecca10b9b 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 6ef86f9a4a2..f1b89e2a83a 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 44a7ff78728..f9016199953 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 5bff627e03e..a172f7f4bc5 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 d2f69682288..597a96fbe31 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 7cf1b35f3dd..0ad22452af9 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 a9011ffb9aa..97d736bc84a 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 1e3ab26465a..9805f08f82e 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 452c2106d99..e28c3056132 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 3c7861b85a9..c7ee9eec92f 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 7ef75b1aa42..b0a2f63e8c2 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 9af3a5edd4d..20d68efdfaa 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 1a91a0f17ec..e52c6172acf 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 5a696cb958a..8e4c41cfbfb 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 a9c04d7d921..d92d8152e04 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 ae1078b5e54..9865ad59412 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 1e75378747c..d37a430b88d 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 4b7fb54a9e5..eb679b6d81e 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 499eded701f..afe268d288c 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 711e3193517..29412b54ac9 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 68bb8a52950..a99dee6a982 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 bfcd94209bc..13d52ff9f66 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 577f8b340a9..ce0e83d3553 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 d8f7c86af17..f31ba42fe72 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)