You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@trafficserver.apache.org by bc...@apache.org on 2018/04/11 15:32:19 UTC
[trafficserver] branch master updated: Updates to clang-tidy target
This is an automated email from the ASF dual-hosted git repository.
bcall pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/trafficserver.git
The following commit(s) were added to refs/heads/master by this push:
new 20f1fda Updates to clang-tidy target
20f1fda is described below
commit 20f1fda2056f5e40eaee87bfee9f04126db157d2
Author: Bryan Call <bc...@apache.org>
AuthorDate: Tue Apr 10 14:41:16 2018 -0700
Updates to clang-tidy target
---
Makefile.am | 2 +-
build/tidy.mk | 2 +-
cmd/traffic_cache_tool/Makefile.am | 5 +++++
cmd/traffic_cop/Makefile.am | 2 +-
cmd/traffic_crashlog/Makefile.am | 2 +-
cmd/traffic_ctl/Makefile.am | 2 +-
cmd/traffic_layout/Makefile.am | 2 +-
cmd/traffic_manager/Makefile.am | 2 +-
cmd/traffic_top/Makefile.am | 2 +-
cmd/traffic_via/Makefile.am | 2 +-
cmd/traffic_wccp/Makefile.am | 2 +-
configure.ac | 2 +-
example/Makefile.am | 2 +-
iocore/Makefile.am | 5 -----
iocore/aio/Makefile.am | 2 +-
iocore/cache/Makefile.am | 2 +-
iocore/dns/Makefile.am | 2 +-
iocore/eventsystem/Makefile.am | 2 +-
iocore/hostdb/Makefile.am | 2 +-
iocore/net/Makefile.am | 2 +-
iocore/utils/Makefile.am | 2 +-
lib/bindings/Makefile.am | 2 +-
lib/cppapi/Makefile.am | 2 +-
lib/records/Makefile.am | 2 +-
lib/ts/Makefile.am | 2 +-
lib/tsconfig/Makefile.am | 2 +-
lib/wccp/Makefile.am | 2 +-
mgmt/Makefile.am | 2 +-
mgmt/api/Makefile.am | 2 +-
mgmt/utils/Makefile.am | 2 +-
plugins/Makefile.am | 2 +-
proxy/Makefile.am | 2 +-
proxy/hdrs/Makefile.am | 2 +-
proxy/http/Makefile.am | 2 +-
proxy/http/remap/Makefile.am | 2 +-
proxy/http2/Makefile.am | 2 +-
proxy/logging/Makefile.am | 2 +-
proxy/shared/Makefile.am | 2 +-
tests/unit_tests/Makefile.am | 4 ++++
39 files changed, 45 insertions(+), 41 deletions(-)
diff --git a/Makefile.am b/Makefile.am
index 4eff0d7..aed38dc 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -156,6 +156,7 @@ help:
@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 'clang-tidy run clang-tidy in fix-it mode'
@echo 'clean remove whatever make created'
@echo 'dist DEPRECATED: recreate source package'
@echo 'distcheck verify dist by performing VPATH build and then distclean'
@@ -169,5 +170,4 @@ help:
@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'
@echo 'autopep8 run autopep8 over python files'
diff --git a/build/tidy.mk b/build/tidy.mk
index 96ccd07..16f1681 100644
--- a/build/tidy.mk
+++ b/build/tidy.mk
@@ -14,7 +14,7 @@
# See the License for the specific language governing permissions and
# limitations under the License.
-Clang_Tidy_Options = -fix -fix-errors
+Clang_Tidy_Options = -fix -fix-errors -header-filter=.*
# 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
diff --git a/cmd/traffic_cache_tool/Makefile.am b/cmd/traffic_cache_tool/Makefile.am
index 0cfc5d2..bcf8c8b 100644
--- a/cmd/traffic_cache_tool/Makefile.am
+++ b/cmd/traffic_cache_tool/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 -D__STDC_FORMAT_MACROS
noinst_PROGRAMS = traffic_cache_tool
@@ -36,3 +38,6 @@ traffic_cache_tool_LDADD = \
@OPENSSL_LIBS@ @LIBPCRE@
all-am: Makefile $(PROGRAMS)
+
+clang-tidy-local: $(DIST_SOURCES)
+ $(CXX_Clang_Tidy)
diff --git a/cmd/traffic_cop/Makefile.am b/cmd/traffic_cop/Makefile.am
index b98512f..a8d7965 100644
--- a/cmd/traffic_cop/Makefile.am
+++ b/cmd/traffic_cop/Makefile.am
@@ -41,5 +41,5 @@ traffic_cop_LDADD = \
include $(top_srcdir)/build/tidy.mk
-tidy-local: $(DIST_SOURCES)
+clang-tidy-local: $(DIST_SOURCES)
$(CXX_Clang_Tidy)
diff --git a/cmd/traffic_crashlog/Makefile.am b/cmd/traffic_crashlog/Makefile.am
index fdb9d3e..29006de 100644
--- a/cmd/traffic_crashlog/Makefile.am
+++ b/cmd/traffic_crashlog/Makefile.am
@@ -45,5 +45,5 @@ traffic_crashlog_LDADD = \
include $(top_srcdir)/build/tidy.mk
-tidy-local: $(DIST_SOURCES)
+clang-tidy-local: $(DIST_SOURCES)
$(CXX_Clang_Tidy)
diff --git a/cmd/traffic_ctl/Makefile.am b/cmd/traffic_ctl/Makefile.am
index ddc51a5..905916d 100644
--- a/cmd/traffic_ctl/Makefile.am
+++ b/cmd/traffic_ctl/Makefile.am
@@ -48,5 +48,5 @@ traffic_ctl_LDADD = \
include $(top_srcdir)/build/tidy.mk
-tidy-local: $(DIST_SOURCES)
+clang-tidy-local: $(DIST_SOURCES)
$(CXX_Clang_Tidy)
diff --git a/cmd/traffic_layout/Makefile.am b/cmd/traffic_layout/Makefile.am
index eada9ab..e6b0c8c 100644
--- a/cmd/traffic_layout/Makefile.am
+++ b/cmd/traffic_layout/Makefile.am
@@ -47,5 +47,5 @@ traffic_layout_LDADD = \
include $(top_srcdir)/build/tidy.mk
-tidy-local: $(DIST_SOURCES)
+clang-tidy-local: $(DIST_SOURCES)
$(CXX_Clang_Tidy)
diff --git a/cmd/traffic_manager/Makefile.am b/cmd/traffic_manager/Makefile.am
index 716008f..3e56ffd 100644
--- a/cmd/traffic_manager/Makefile.am
+++ b/cmd/traffic_manager/Makefile.am
@@ -108,5 +108,5 @@ endif
include $(top_srcdir)/build/tidy.mk
-tidy-local: $(DIST_SOURCES)
+clang-tidy-local: $(DIST_SOURCES)
$(CXX_Clang_Tidy)
diff --git a/cmd/traffic_top/Makefile.am b/cmd/traffic_top/Makefile.am
index 2723472..edb103d 100644
--- a/cmd/traffic_top/Makefile.am
+++ b/cmd/traffic_top/Makefile.am
@@ -51,5 +51,5 @@ endif
include $(top_srcdir)/build/tidy.mk
-tidy-local: $(DIST_SOURCES)
+clang-tidy-local: $(DIST_SOURCES)
$(CXX_Clang_Tidy)
diff --git a/cmd/traffic_via/Makefile.am b/cmd/traffic_via/Makefile.am
index bf19605..cb19705 100644
--- a/cmd/traffic_via/Makefile.am
+++ b/cmd/traffic_via/Makefile.am
@@ -40,5 +40,5 @@ TESTS = \
include $(top_srcdir)/build/tidy.mk
-tidy-local: $(DIST_SOURCES)
+clang-tidy-local: $(DIST_SOURCES)
$(CXX_Clang_Tidy)
diff --git a/cmd/traffic_wccp/Makefile.am b/cmd/traffic_wccp/Makefile.am
index 8a6acb9..a1a270d 100644
--- a/cmd/traffic_wccp/Makefile.am
+++ b/cmd/traffic_wccp/Makefile.am
@@ -42,5 +42,5 @@ traffic_wccp_LDADD = \
include $(top_srcdir)/build/tidy.mk
-tidy-local: $(DIST_SOURCES)
+clang-tidy-local: $(DIST_SOURCES)
$(CXX_Clang_Tidy)
diff --git a/configure.ac b/configure.ac
index f6ba566..bea5002 100644
--- a/configure.ac
+++ b/configure.ac
@@ -49,7 +49,7 @@ AM_INIT_AUTOMAKE([-Wall -Werror -Wno-portability tar-ustar foreign no-installinf
AM_MAINTAINER_MODE([enable])
# Enable a recursive "tidy" rule for clang-tidy.
-m4_ifdef([AM_EXTRA_RECURSIVE_TARGETS], [AM_EXTRA_RECURSIVE_TARGETS([tidy])])
+m4_ifdef([AM_EXTRA_RECURSIVE_TARGETS], [AM_EXTRA_RECURSIVE_TARGETS([clang-tidy])])
AC_CONFIG_HEADERS([lib/ink_autoconf.h])
diff --git a/example/Makefile.am b/example/Makefile.am
index 5134873..5e2a90f 100644
--- a/example/Makefile.am
+++ b/example/Makefile.am
@@ -186,6 +186,6 @@ cppapi_WebSocket_la_LIBADD = $(libatscppapi)
cppapi_boom_la_LIBADD = $(libatscppapi)
cppapi_intercept_la_LIBADD = $(libatscppapi)
-tidy-local: $(DIST_SOURCES)
+clang-tidy-local: $(DIST_SOURCES)
$(CXX_Clang_Tidy)
$(CC_Clang_Tidy)
diff --git a/iocore/Makefile.am b/iocore/Makefile.am
index a459dc9..5aae15e 100644
--- a/iocore/Makefile.am
+++ b/iocore/Makefile.am
@@ -17,8 +17,3 @@
# limitations under the License.
SUBDIRS = eventsystem net aio dns hostdb utils cache
-
-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 798337f..fe0c187 100644
--- a/iocore/aio/Makefile.am
+++ b/iocore/aio/Makefile.am
@@ -62,5 +62,5 @@ test_AIO_LDADD = \
include $(top_srcdir)/build/tidy.mk
-tidy-local: $(DIST_SOURCES)
+clang-tidy-local: $(DIST_SOURCES)
$(CXX_Clang_Tidy)
diff --git a/iocore/cache/Makefile.am b/iocore/cache/Makefile.am
index 26fcbbe..78eb2cc 100644
--- a/iocore/cache/Makefile.am
+++ b/iocore/cache/Makefile.am
@@ -68,5 +68,5 @@ endif
include $(top_srcdir)/build/tidy.mk
-tidy-local: $(DIST_SOURCES)
+clang-tidy-local: $(DIST_SOURCES)
$(CXX_Clang_Tidy)
diff --git a/iocore/dns/Makefile.am b/iocore/dns/Makefile.am
index df2d35e..3258279 100644
--- a/iocore/dns/Makefile.am
+++ b/iocore/dns/Makefile.am
@@ -51,5 +51,5 @@ libinkdns_a_SOURCES = \
include $(top_srcdir)/build/tidy.mk
-tidy-local: $(DIST_SOURCES)
+clang-tidy-local: $(DIST_SOURCES)
$(CXX_Clang_Tidy)
diff --git a/iocore/eventsystem/Makefile.am b/iocore/eventsystem/Makefile.am
index 968bdd7..340931b 100644
--- a/iocore/eventsystem/Makefile.am
+++ b/iocore/eventsystem/Makefile.am
@@ -127,5 +127,5 @@ test_MIOBufferWriter_SOURCES = \
include $(top_srcdir)/build/tidy.mk
-tidy-local: $(DIST_SOURCES)
+clang-tidy-local: $(DIST_SOURCES)
$(CXX_Clang_Tidy)
diff --git a/iocore/hostdb/Makefile.am b/iocore/hostdb/Makefile.am
index 7ee504c..1b40fb8 100644
--- a/iocore/hostdb/Makefile.am
+++ b/iocore/hostdb/Makefile.am
@@ -83,5 +83,5 @@ test_RefCountCache_LDADD = $(test_LD_ADD)
include $(top_srcdir)/build/tidy.mk
-tidy-local: $(DIST_SOURCES)
+clang-tidy-local: $(DIST_SOURCES)
$(CXX_Clang_Tidy)
diff --git a/iocore/net/Makefile.am b/iocore/net/Makefile.am
index 0a4b0af..7dbbd3b 100644
--- a/iocore/net/Makefile.am
+++ b/iocore/net/Makefile.am
@@ -168,5 +168,5 @@ libinknet_a_LIBADD = \
include $(top_srcdir)/build/tidy.mk
-tidy-local: $(DIST_SOURCES)
+clang-tidy-local: $(DIST_SOURCES)
$(CXX_Clang_Tidy)
diff --git a/iocore/utils/Makefile.am b/iocore/utils/Makefile.am
index 89a1202..2ddd748 100644
--- a/iocore/utils/Makefile.am
+++ b/iocore/utils/Makefile.am
@@ -34,5 +34,5 @@ libinkutils_a_SOURCES = \
include $(top_srcdir)/build/tidy.mk
-tidy-local: $(DIST_SOURCES)
+clang-tidy-local: $(DIST_SOURCES)
$(CXX_Clang_Tidy)
diff --git a/lib/bindings/Makefile.am b/lib/bindings/Makefile.am
index d8fde00..96683f8 100644
--- a/lib/bindings/Makefile.am
+++ b/lib/bindings/Makefile.am
@@ -36,5 +36,5 @@ libbindings_la_SOURCES = \
repl.cc \
repl.h
-tidy-local: $(DIST_SOURCES)
+clang-tidy-local: $(DIST_SOURCES)
$(CXX_Clang_Tidy)
diff --git a/lib/cppapi/Makefile.am b/lib/cppapi/Makefile.am
index ba09c95..63be22c 100644
--- a/lib/cppapi/Makefile.am
+++ b/lib/cppapi/Makefile.am
@@ -80,5 +80,5 @@ library_include_HEADERS = \
include $(top_srcdir)/build/tidy.mk
-tidy-local: $(DIST_SOURCES)
+clang-tidy-local: $(DIST_SOURCES)
$(CXX_Clang_Tidy)
diff --git a/lib/records/Makefile.am b/lib/records/Makefile.am
index d8c8eb5..c27c884 100644
--- a/lib/records/Makefile.am
+++ b/lib/records/Makefile.am
@@ -71,5 +71,5 @@ librecords_cop_a_SOURCES = \
RecFile.cc \
RecDebug.cc
-tidy-local: $(sort $(DIST_SOURCES))
+clang-tidy-local: $(sort $(DIST_SOURCES))
$(CXX_Clang_Tidy)
diff --git a/lib/ts/Makefile.am b/lib/ts/Makefile.am
index b77626a..1acd80f 100644
--- a/lib/ts/Makefile.am
+++ b/lib/ts/Makefile.am
@@ -281,5 +281,5 @@ CompileParseRules_SOURCES = CompileParseRules.cc
clean-local:
rm -f ParseRulesCType ParseRulesCTypeToLower ParseRulesCTypeToUpper
-tidy-local: $(DIST_SOURCES)
+clang-tidy-local: $(DIST_SOURCES)
$(CXX_Clang_Tidy)
diff --git a/lib/tsconfig/Makefile.am b/lib/tsconfig/Makefile.am
index 204cb73..19333e7 100644
--- a/lib/tsconfig/Makefile.am
+++ b/lib/tsconfig/Makefile.am
@@ -74,5 +74,5 @@ TsConfigGrammar.hpp: TsConfigGrammar.h BisonHeaderToC++.sed
include $(top_srcdir)/build/tidy.mk
-tidy-local: $(DIST_SOURCES)
+clang-tidy-local: $(DIST_SOURCES)
$(CXX_Clang_Tidy)
diff --git a/lib/wccp/Makefile.am b/lib/wccp/Makefile.am
index e8f6609..5401e01 100644
--- a/lib/wccp/Makefile.am
+++ b/lib/wccp/Makefile.am
@@ -45,5 +45,5 @@ libwccp_a_SOURCES = \
# 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)
+clang-tidy-local: $(DIST_SOURCES)
$(CXX_Clang_Tidy)
diff --git a/mgmt/Makefile.am b/mgmt/Makefile.am
index 379561d..ec31b28 100644
--- a/mgmt/Makefile.am
+++ b/mgmt/Makefile.am
@@ -76,5 +76,5 @@ libmgmt_p_la_LIBADD = \
include $(top_srcdir)/build/tidy.mk
-tidy-local: $(DIST_SOURCES)
+clang-tidy-local: $(DIST_SOURCES)
$(CXX_Clang_Tidy)
diff --git a/mgmt/api/Makefile.am b/mgmt/api/Makefile.am
index ecf2639..d5db617 100644
--- a/mgmt/api/Makefile.am
+++ b/mgmt/api/Makefile.am
@@ -84,5 +84,5 @@ traffic_api_cli_remote_LDADD = \
$(top_builddir)/lib/ts/libtsutil.la \
@LIBTCL@ @OPENSSL_LIBS@
-tidy-local: $(DIST_SOURCES)
+clang-tidy-local: $(DIST_SOURCES)
$(CXX_Clang_Tidy)
diff --git a/mgmt/utils/Makefile.am b/mgmt/utils/Makefile.am
index ed29c18..73a5306 100644
--- a/mgmt/utils/Makefile.am
+++ b/mgmt/utils/Makefile.am
@@ -66,5 +66,5 @@ test_marshall_LDADD = \
include $(top_srcdir)/build/tidy.mk
-tidy-local: $(DIST_SOURCES)
+clang-tidy-local: $(DIST_SOURCES)
$(CXX_Clang_Tidy)
diff --git a/plugins/Makefile.am b/plugins/Makefile.am
index 3e12147..71d7153 100644
--- a/plugins/Makefile.am
+++ b/plugins/Makefile.am
@@ -110,6 +110,6 @@ TESTS_ENVIRONMENT = LSAN_OPTIONS=suppressions=suppression.txt
TESTS = $(check_PROGRAMS)
-tidy-local: $(DIST_SOURCES)
+clang-tidy-local: $(DIST_SOURCES)
$(CXX_Clang_Tidy)
$(CC_Clang_Tidy)
diff --git a/proxy/Makefile.am b/proxy/Makefile.am
index 7e84586..3696f92 100644
--- a/proxy/Makefile.am
+++ b/proxy/Makefile.am
@@ -277,7 +277,7 @@ endif
versiondir = $(pkgsysconfdir)
-tidy-local: $(noinst_HEADERS) $(traffic_server_SOURCES)
+clang-tidy-local: $(noinst_HEADERS) $(traffic_server_SOURCES)
$(CXX_Clang_Tidy)
install-data-local:
diff --git a/proxy/hdrs/Makefile.am b/proxy/hdrs/Makefile.am
index 5ec2bd6..f75a0ce 100644
--- a/proxy/hdrs/Makefile.am
+++ b/proxy/hdrs/Makefile.am
@@ -79,5 +79,5 @@ test_mime_SOURCES = test_mime.cc
#test_UNUSED_SOURCES = \
# test_urlhash.cc
-tidy-local: $(libhdrs_a_SOURCES)
+clang-tidy-local: $(libhdrs_a_SOURCES)
$(CXX_Clang_Tidy)
diff --git a/proxy/http/Makefile.am b/proxy/http/Makefile.am
index 0f2956e..ac0eaae 100644
--- a/proxy/http/Makefile.am
+++ b/proxy/http/Makefile.am
@@ -97,7 +97,7 @@ test_ForwardedConfig_SOURCES = \
test_ForwardedConfig_LDADD = \
$(top_builddir)/lib/ts/libtsutil.la
-tidy-local: $(libhttp_a_SOURCES) $(noinst_HEADERS)
+clang-tidy-local: $(libhttp_a_SOURCES) $(noinst_HEADERS)
$(CXX_Clang_Tidy)
#test_UNUSED_SOURCES = \
diff --git a/proxy/http/remap/Makefile.am b/proxy/http/remap/Makefile.am
index 0b23e78..3d1762e 100644
--- a/proxy/http/remap/Makefile.am
+++ b/proxy/http/remap/Makefile.am
@@ -50,5 +50,5 @@ libhttp_remap_a_SOURCES = \
UrlRewrite.cc \
UrlRewrite.h
-tidy-local: $(libhttp_remap_a_SOURCES)
+clang-tidy-local: $(libhttp_remap_a_SOURCES)
$(CXX_Clang_Tidy)
diff --git a/proxy/http2/Makefile.am b/proxy/http2/Makefile.am
index 695b426..c0790c2 100644
--- a/proxy/http2/Makefile.am
+++ b/proxy/http2/Makefile.am
@@ -99,6 +99,6 @@ test_HPACK_SOURCES = \
HPACK.cc \
HPACK.h
-tidy-local: $(libhttp2_a_SOURCES) $(test_Huffmancode_SOURCES) \
+clang-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 d647203..bf4feec 100644
--- a/proxy/logging/Makefile.am
+++ b/proxy/logging/Makefile.am
@@ -96,5 +96,5 @@ test_LogUtils_LDADD = \
test_LogUtils_SOURCES = \
test_LogUtils.cc
-tidy-local: $(liblogging_a_SOURCES) $(liblogcollation_a_SOURCES) $(EXTRA_DIST)
+clang-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 f98617e..acc2f3e 100644
--- a/proxy/shared/Makefile.am
+++ b/proxy/shared/Makefile.am
@@ -44,5 +44,5 @@ libdiagsconfig_a_SOURCES = \
libUglyLogStubs_a_SOURCES = \
UglyLogStubs.cc
-tidy-local: $(libdiagsconfig_a_SOURCES) $(libUglyLogStubs_a_SOURCES)
+clang-tidy-local: $(libdiagsconfig_a_SOURCES) $(libUglyLogStubs_a_SOURCES)
$(CXX_Clang_Tidy)
diff --git a/tests/unit_tests/Makefile.am b/tests/unit_tests/Makefile.am
index 1300209..cf73189 100644
--- a/tests/unit_tests/Makefile.am
+++ b/tests/unit_tests/Makefile.am
@@ -15,6 +15,8 @@
# See the License for the specific language governing permissions and
# limitations under the License.
+include $(top_srcdir)/build/tidy.mk
+
AM_CPPFLAGS += \
-I$(abs_top_srcdir) \
$(TS_INCLUDES)
@@ -23,3 +25,5 @@ bin_PROGRAMS = unit_tests
unit_tests_SOURCES = main.cpp
+clang-tidy-local: $(DIST_SOURCES)
+ $(CXX_Clang_Tidy)
--
To stop receiving notification emails like this one, please contact
bcall@apache.org.