mirror of
https://github.com/zeek/zeek.git
synced 2025-10-02 14:48:21 +00:00
Merge remote-tracking branch 'origin/topic/timw/clang-tidy'
* origin/topic/timw/clang-tidy: Change over to whitelisting clang-tidy options instead of blacklisting Use FindClangTidy in the cmake submodule to make things easier
This commit is contained in:
commit
00987c4411
5 changed files with 23 additions and 55 deletions
44
.clang-tidy
44
.clang-tidy
|
@ -1,40 +1,4 @@
|
||||||
Checks: '*,
|
Checks: '-*,
|
||||||
-abseil-string-find-startswith,
|
bugprone-*,
|
||||||
-bugprone-exception-escape,
|
clang-analyzer-*,
|
||||||
-bugprone-macro-parentheses,
|
performance-*'
|
||||||
-bugprone-suspicious-semicolon,
|
|
||||||
-cert-err58-cpp,
|
|
||||||
-cppcoreguidelines-avoid-c-arrays,
|
|
||||||
-cppcoreguidelines-avoid-goto,
|
|
||||||
-cppcoreguidelines-avoid-magic-numbers,
|
|
||||||
-cppcoreguidelines-macro-usage,
|
|
||||||
-cppcoreguidelines-non-private-member-variables-in-classes,
|
|
||||||
-cppcoreguidelines-pro-bounds-array-to-pointer-decay,
|
|
||||||
-cppcoreguidelines-pro-bounds-constant-array-index,
|
|
||||||
-cppcoreguidelines-pro-bounds-pointer-arithmetic,
|
|
||||||
-cppcoreguidelines-pro-type-const-cast,
|
|
||||||
-cppcoreguidelines-pro-type-reinterpret-cast,
|
|
||||||
-fuchsia-default-arguments,
|
|
||||||
-fuchsia-multiple-inheritance,
|
|
||||||
-fuchsia-overloaded-operator,
|
|
||||||
-fuchsia-statically-constructed-objects,
|
|
||||||
-fuchsia-trailing-return,
|
|
||||||
-google-build-using-namespace,
|
|
||||||
-google-explicit-constructor,
|
|
||||||
-google-readability-braces-around-statements,
|
|
||||||
-hicpp-avoid-c-arrays,
|
|
||||||
-hicpp-avoid-goto,
|
|
||||||
-hicpp-braces-around-statements,
|
|
||||||
-hicpp-explicit-conversions,
|
|
||||||
-hicpp-no-array-decay,
|
|
||||||
-llvm-header-guard,
|
|
||||||
-misc-macro-parentheses,
|
|
||||||
-misc-non-private-member-variables-in-classes,
|
|
||||||
-misc-suspicious-semicolon,
|
|
||||||
-misc-unused-parameters,
|
|
||||||
-modernize-avoid-c-arrays,
|
|
||||||
-modernize-use-nodiscard,
|
|
||||||
-readability-braces-around-statements,
|
|
||||||
-readability-container-size-empty,
|
|
||||||
-readability-implicit-bool-conversion,
|
|
||||||
-readability-magic-numbers'
|
|
||||||
|
|
8
CHANGES
8
CHANGES
|
@ -1,4 +1,12 @@
|
||||||
|
|
||||||
|
3.1.0-dev.40 | 2019-08-13 23:44:45 +0000
|
||||||
|
|
||||||
|
* Change over to whitelisting clang-tidy options instead of
|
||||||
|
blacklisting. (Tim Wojtulewicz, Corelight)
|
||||||
|
|
||||||
|
* Use FindClangTidy from the cmake submodule. (Tim Wojtulewicz,
|
||||||
|
Corelight)
|
||||||
|
|
||||||
3.1.0-dev.36 | 2019-08-13 22:42:54 +0000
|
3.1.0-dev.36 | 2019-08-13 22:42:54 +0000
|
||||||
|
|
||||||
* Replace use of deprecated pcap_lookupdev(). (Jon Siwek, Corelight)
|
* Replace use of deprecated pcap_lookupdev(). (Jon Siwek, Corelight)
|
||||||
|
|
|
@ -14,6 +14,7 @@ if ( NOT CMAKE_INSTALL_LIBDIR )
|
||||||
endif ()
|
endif ()
|
||||||
|
|
||||||
include(cmake/CommonCMakeConfig.cmake)
|
include(cmake/CommonCMakeConfig.cmake)
|
||||||
|
include(cmake/FindClangTidy.cmake)
|
||||||
|
|
||||||
########################################################################
|
########################################################################
|
||||||
## Project/Build Configuration
|
## Project/Build Configuration
|
||||||
|
|
2
VERSION
2
VERSION
|
@ -1 +1 @@
|
||||||
3.1.0-dev.36
|
3.1.0-dev.40
|
||||||
|
|
|
@ -444,17 +444,12 @@ install(FILES ${CMAKE_CURRENT_SOURCE_DIR}/3rdparty/sqlite3.h
|
||||||
DESTINATION include/zeek/3rdparty
|
DESTINATION include/zeek/3rdparty
|
||||||
)
|
)
|
||||||
|
|
||||||
find_program(CLANG_TIDY NAMES clang-tidy)
|
########################################################################
|
||||||
if (CLANG_TIDY)
|
## Clang-tidy target now that we have all of the sources
|
||||||
set(TIDY_SRCS "")
|
|
||||||
foreach(f ${MAIN_SRCS})
|
add_clang_tidy_files(${MAIN_SRCS})
|
||||||
list(APPEND TIDY_SRCS "src/${f}")
|
|
||||||
endforeach(f)
|
# At this point we have included all of the cc files in src, all of the BinPAC
|
||||||
# TODO: this currently doesn't include many of the subdirectories/plugins
|
# (*.pac.cc) files, and most of the generated code for BIFs (not including
|
||||||
# that build static libraries for inclusion into the final zeek binary
|
# *.bif.register.cc)
|
||||||
# (analyzers, broker, etc.) or generated code (BIFs, BinPAC, etc.).
|
create_clang_tidy_target()
|
||||||
add_custom_target(clang-tidy
|
|
||||||
COMMAND ${CLANG_TIDY} -p ${CMAKE_BINARY_DIR} ${TIDY_SRCS}
|
|
||||||
WORKING_DIRECTORY ${CMAKE_SOURCE_DIR}
|
|
||||||
)
|
|
||||||
endif()
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue