Skip to content
Snippets Groups Projects
Verified Commit 320bbc1b authored by Timm Fitschen's avatar Timm Fitschen
Browse files

WIP: pipeline

parent d51a68ec
No related branches found
No related tags found
No related merge requests found
......@@ -23,8 +23,7 @@ if(NOT clang_tidy)
message(STATUS "clang-tidy: Not found")
else()
message(STATUS "clang-tidy: ${clang_tidy}")
set(CMAKE_C_CLANG_TIDY "${clang_tidy}" "--header-filter=." "--checks=*" "--warnings-as-errors=*")
set(CMAKE_CXX_CLANG_TIDY "${clang_tidy}" "--header-filter=." "--checks=*" "--warnings-as-errors=*")
set(CMAKE_C_CLANG_TIDY "${clang_tidy}" "--header-filter=." "--checks=*,-llvm-include-order,-llvmlibc-restrict-system-libc-headers" "--warnings-as-errors=*")
endif()
add_subdirectory(src)
......
#ifndef CONNECTION_H
#define CONNECTION_H
/**
* @file connection.h
* @author Timm Fitschen
......@@ -12,3 +14,4 @@
* @return 0 if everything is ok.
*/
int configure_connection(char host[], int port);
#endif
#ifndef LIBCAOSDBCONFIG_H
#define LIBCAOSDBCONFIG_H
// clang-format off
#define LIBCAOSDB_VERSION_MAJOR @libcaosdb_VERSION_MAJOR@
#define LIBCAOSDB_VERSION_MINOR @libcaosdb_VERSION_MINOR@
#define LIBCAOSDB_VERSION_PATCH @libcaosdb_VERSION_PATCH@
// clang-format on
#endif
......@@ -9,6 +9,7 @@ int main(void) {
LIBCAOSDB_VERSION_MINOR, LIBCAOSDB_VERSION_PATCH);
printf("We don't miss the H of caos.\n");
// NOLINTNEXTLINE(cppcoreguidelines-avoid-magic-numbers, readability-magic-numbers)
configure_connection("localhost", 8080);
return 0;
......
......@@ -2,6 +2,7 @@
#include <stdio.h>
int configure_connection(char host[], int port) {
// NOLINTNEXTLINE(cppcoreguidelines-avoid-magic-numbers, readability-magic-numbers)
if (port > 666 && port < 668) {
printf("667 - One step ahead of the Devil!");
}
......
#include <setjmp.h>
#include <stdarg.h>
#include "connection.h"
#include <setjmp.h> // IWYU pragma: keep
#include <stdarg.h> // IWYU pragma: keep
#include <stddef.h>
#include <cmocka.h>
#include "connection.h"
// NOLINTNEXTLINE(misc-unused-parameters)
static void test_configure_connection(void **state) {
assert_int_equal(0, configure_connection("localhost", 8080));
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment