Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 5 additions & 1 deletion ClangTidy.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,7 @@ function(swift_create_clang_tidy_targets)

set(argOption "DONT_GENERATE_CLANG_TIDY_CONFIG" "WITHOUT_SWIFT_TYPES")
set(argSingle "")
set(argMulti "")
set(argMulti "FLAGS_TO_ENABLE")

cmake_parse_arguments(x "${argOption}" "${argSingle}" "${argMulti}" ${ARGN})
if(x_UNPARSED_ARGUMENTS)
Expand Down Expand Up @@ -245,6 +245,10 @@ function(swift_create_clang_tidy_targets)
-readability-uppercase-literal-suffix
-readability-use-anyofallof)

foreach(flag IN LISTS x_FLAGS_TO_ENABLE)
list(FILTER disabled_checks EXCLUDE REGEX ${flag})
endforeach()

# Final list of checks to enable/disable
set(all_checks -* ${enabled_categories} ${disabled_checks})

Expand Down