Add a CMake target for clang-tidy
This commit is contained in:
parent
fe88e30bf5
commit
152ba0847d
@ -111,6 +111,20 @@ target_link_libraries (degesch ${project_libraries})
|
|||||||
add_executable (kike kike.c kike-replies.c ${common_sources} ${common_headers})
|
add_executable (kike kike.c kike-replies.c ${common_sources} ${common_headers})
|
||||||
target_link_libraries (kike ${project_libraries})
|
target_link_libraries (kike ${project_libraries})
|
||||||
|
|
||||||
|
# Various clang-based diagnostics, loads of fake positives and spam
|
||||||
|
file (GLOB clang_tidy_sources *.c)
|
||||||
|
set (clang_tidy_checks misc-* readability-*
|
||||||
|
-readability-braces-around-statements
|
||||||
|
-readability-named-parameter)
|
||||||
|
string (REPLACE ";" "," clang_tidy_checks "${clang_tidy_checks}")
|
||||||
|
|
||||||
|
set (CMAKE_EXPORT_COMPILE_COMMANDS ON)
|
||||||
|
add_custom_target (clang-tidy
|
||||||
|
COMMAND clang-tidy -p ${PROJECT_BINARY_DIR} -checks=${clang_tidy_checks}
|
||||||
|
${clang_tidy_sources} 1>&2
|
||||||
|
USES_TERMINAL
|
||||||
|
WORKING_DIRECTORY ${PROJECT_SOURCE_DIR})
|
||||||
|
|
||||||
# Installation
|
# Installation
|
||||||
install (TARGETS zyklonb degesch kike DESTINATION ${CMAKE_INSTALL_BINDIR})
|
install (TARGETS zyklonb degesch kike DESTINATION ${CMAKE_INSTALL_BINDIR})
|
||||||
install (FILES LICENSE DESTINATION ${CMAKE_INSTALL_DOCDIR})
|
install (FILES LICENSE DESTINATION ${CMAKE_INSTALL_DOCDIR})
|
||||||
|
@ -1868,7 +1868,7 @@ serialize_configuration (struct app_context *ctx, struct str *output)
|
|||||||
|
|
||||||
/// Builds a color pair for 256-color terminals with a 16-color backup value
|
/// Builds a color pair for 256-color terminals with a 16-color backup value
|
||||||
#define COLOR_256(name, c256) \
|
#define COLOR_256(name, c256) \
|
||||||
(((COLOR_ ## name) & 0xFFFF) | ((c256 & 0xFFFF) << 16))
|
(((COLOR_ ## name) & 0xFFFF) | (((c256) & 0xFFFF) << 16))
|
||||||
|
|
||||||
static struct
|
static struct
|
||||||
{
|
{
|
||||||
@ -4288,6 +4288,7 @@ transport_tls_init (struct server *s, struct error **e)
|
|||||||
// XXX: is this a reason to abort the connection?
|
// XXX: is this a reason to abort the connection?
|
||||||
log_server_error (s, s->buffer, "#s", error->message);
|
log_server_error (s, s->buffer, "#s", error->message);
|
||||||
error_free (error);
|
error_free (error);
|
||||||
|
error = NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
SSL_set_connect_state (ssl);
|
SSL_set_connect_state (ssl);
|
||||||
|
Loading…
Reference in New Issue
Block a user