Skip to content

Commit

Permalink
Updated clang-tidy configuration, scripts, and Makefiles
Browse files Browse the repository at this point in the history
  • Loading branch information
bryancall committed Aug 19, 2019
1 parent 7e5093e commit 191d794
Show file tree
Hide file tree
Showing 5 changed files with 6 additions and 8 deletions.
2 changes: 1 addition & 1 deletion .clang-tidy
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
Checks: -*,modernize-use-default-member-init,modernize-loop-convert,modernize-use-bool-literals,modernize-deprecated-headers,performance-unnecessary-value-param,performance-faster-string-find,modernize-raw-string-literal,modernize-redundant-void-arg,modernize-use-nullptr,modernize-use-override
Checks: -*,google-readability-braces-around-statements,google-readability-casting,modernize-use-using,modernize-loop-convert,modernize-use-bool-literals,modernize-deprecated-headers,performance-unnecessary-value-param,performance-faster-string-find,modernize-raw-string-literal,modernize-redundant-void-arg,modernize-use-nullptr,modernize-use-override,performance-unnecessary-copy-initialization
CheckOptions:
- key: modernize-use-default-member-init.UseAssignment
value: '1'
Expand Down
8 changes: 4 additions & 4 deletions build/tidy.mk
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,8 @@ Clang_Tidy_Options = -fix -fix-errors
# just the C and C++ sources so we don't pick up lex and yacc files
# for example.

Clang_Tidy_CC_Files = $(filter %.c, $(sort $(1)))
Clang_Tidy_CXX_Files = $(filter %.cc, $(sort $(1)))
Clang_Tidy_CC_Files = $(filter %.c, $(sort $^))
Clang_Tidy_CXX_Files = $(filter %.cc, $(sort $^))

# clang-tidy rules. We expect these to be actions with something like
# $(DIST_SOURCES) as the dependencies.rules. Note that $DIST_SOURCES
Expand All @@ -30,5 +30,5 @@ Clang_Tidy_CXX_Files = $(filter %.cc, $(sort $(1)))
#
# All this clearly requires GNU make.

CXX_Clang_Tidy = $(foreach tidy_target, $(call Clang_Tidy_CXX_Files,$^), $(CLANG_TIDY) $(Clang_Tidy_Options) $(tidy_target) -- $(CXXCOMPILE) -x c++;)
CC_Clang_Tidy = $(foreach tidy_target, $(call Clang_Tidy_CC_Files,$^), $(CLANG_TIDY) $(Clang_Tidy_Options) $(tidy_target) -- $(COMPILE) -x c;)
CXX_Clang_Tidy = $(CLANG_TIDY) $(Clang_Tidy_Options) $(Clang_Tidy_CXX_Files) -- $(CXXCOMPILE) -x c++
CC_Clang_Tidy = $(CLANG_TIDY) $(Clang_Tidy_Options) $(Clang_Tidy_CC_Files) -- $(COMPILE) -x c
1 change: 0 additions & 1 deletion example/plugins/cpp-api/Makefile.am
Original file line number Diff line number Diff line change
Expand Up @@ -106,4 +106,3 @@ intercept_la_LIBADD = $(libtscppapi)

clang-tidy-local: $(DIST_SOURCES)
$(CXX_Clang_Tidy)
$(CC_Clang_Tidy)
2 changes: 1 addition & 1 deletion proxy/http/remap/Makefile.am
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ test_PluginFactory_SOURCES = \
RemapPluginInfo.cc

test_RemapPluginInfo_CPPFLAGS = $(AM_CPPFLAGS) -I$(abs_top_srcdir)/tests/include -DPLUGIN_DSO_TESTS
EXTRA_test_RemapPluginInfo_DEPENDENCIES = \
EXTRA_test_RemapPluginInfo_DEPENDENCIES = \
unit-tests/plugin_missing_init.la \
unit-tests/plugin_missing_doremap.la \
unit-tests/plugin_missing_deleteinstance.la \
Expand Down
1 change: 0 additions & 1 deletion src/tscore/Makefile.am
Original file line number Diff line number Diff line change
Expand Up @@ -125,7 +125,6 @@ else
HKDF_impl = HKDF_openssl.cc
endif
libtscore_la_SOURCES += \
HKDF.h \
$(HKDF_impl)
endif

Expand Down

0 comments on commit 191d794

Please sign in to comment.