Skip to content
Snippets Groups Projects
Commit 7dbabac6 authored by florian's avatar florian
Browse files

MAINT: Add a lot of NOLINTs

parent 02df3227
No related branches found
No related tags found
1 merge request!4ENH: Allow insertion and deletion of single entities
Pipeline #11058 failed
This commit is part of merge request !4. Comments created here will be created in the context of that merge request.
......@@ -468,9 +468,9 @@ auto ConfigurationManager::InitializeDefaults() -> int { // NOLINT
// find the configuration file...
std::unique_ptr<path> configuration_file_path;
for (const std::string &configuration_file :
for (const char* const &configuration_file :
caosdb::LIBCAOSDB_CONFIGURATION_FILES_PRECEDENCE) {
if (configuration_file == "$CAOSDB_CLIENT_CONFIGURATION") {
if (strcmp(configuration_file, "$CAOSDB_CLIENT_CONFIGURATION") == 0) {
// user specified a file via the environment variable
// TODO(tf) make this thread-secure (concurrency-mt-unsafe)
const auto *from_env_var =
......
......@@ -38,7 +38,8 @@ protected:
void TearDown() override { ConfigurationManager::Clear(); }
};
TEST_F(test_configuration, load_json) {
// TODO(tf) cogintive complexity > 25 (threshold)
TEST_F(test_configuration, load_json) { // NOLINT
ConfigurationManager::LoadSingleJSONConfiguration(TEST_DATA_DIR +
"/test_caosdb_client.json");
EXPECT_THROW_MESSAGE(
......@@ -52,7 +53,9 @@ TEST_F(test_configuration, load_json) {
ConfigurationManager::Clear();
}
TEST_F(test_configuration, get_default_connection_configuration_error) {
// TODO(tf) cognitive complexity again
TEST_F(test_configuration, // NOLINT
get_default_connection_configuration_error) { // NOLINT
EXPECT_THROW_MESSAGE(ConfigurationManager::GetDefaultConnectionName(),
ConfigurationError,
"This CaosDB client has not been configured.");
......
......@@ -65,7 +65,8 @@ TEST_F(test_connection, configure_ssl_localhost_8080) {
EXPECT_TRUE(sslcc != nullptr);
}
TEST_F(test_connection, connection_manager_unknown_connection) {
// TODO(tf) cognitive complexity > 25 (threshold)
TEST_F(test_connection, connection_manager_unknown_connection) { // NOLINT
EXPECT_THROW_MESSAGE(ConnectionManager::GetConnection("test"),
caosdb::exceptions::UnknownConnectionError,
"No connection named 'test' present.");
......
......@@ -73,7 +73,8 @@ TEST(test_entity, test_insert_entity) {
EXPECT_EQ(entity.GetVersionId(), "version_id");
}
TEST(test_entity, test_from_id_response) {
// TODO(tf) cognitive complexity > 25 (threshold)
TEST(test_entity, test_from_id_response) { // NOLINT
IdResponse idResponse;
idResponse.set_id("entity_id");
auto *error = idResponse.add_entity_errors();
......
......@@ -29,7 +29,8 @@ namespace caosdb {
using caosdb::entity::v1alpha1::Entity;
using caosdb::entity::v1alpha1::Message;
TEST(test_protobuf, test_swap_trivial) {
// TODO(tf) cognitive complexity > 25 (threshold)
TEST(test_protobuf, test_swap_trivial) { // NOLINT
Message message_source;
message_source.set_code(1234);
message_source.set_description("desc");
......@@ -49,7 +50,8 @@ TEST(test_protobuf, test_swap_trivial) {
EXPECT_EQ(message_destination.description(), "desc");
}
TEST(test_protobuf, test_swap_nested) {
// TODO(tf) cognitive complexity again
TEST(test_protobuf, test_swap_nested) { // NOLINT
Entity entity_source;
entity_source.set_id("entity_id");
auto *version_source = entity_source.mutable_version();
......
......@@ -40,7 +40,8 @@ using caosdb::exceptions::ConnectionError;
using caosdb::transaction::UniqueResult;
using ProtoEntity = caosdb::entity::v1alpha1::Entity;
TEST(test_transaction, create_transaction) {
// TODO(tf) cognitive complexity > 25 (threshold)
TEST(test_transaction, create_transaction) { // NOLINT
const auto *host = "localhost";
auto configuration = InsecureConnectionConfiguration(host, 8000);
Connection connection(configuration);
......
......@@ -20,12 +20,12 @@
*
*/
#include "gmock/gmock-matchers.h" // for ElementsAre, EXPECT_THAT
#include "boost/beast/core/detail/base64.hpp" // for encoded_size
#include "boost/json/object.hpp" // for object
#include "boost/json/value.hpp" // for value
#include "caosdb/utility.h" // for base64_encode, load_js...
#include "caosdb_test_utility.h" // for TEST_DATA_DIR
#include "gmock/gmock-matchers.h" // for ElementsAre, EXPECT_THAT
#include <boost/beast/core/detail/base64.hpp> // for encoded_size
#include <gtest/gtest-message.h> // for Message
#include <gtest/gtest-test-part.h> // for TestPartResult, SuiteA...
#include <gtest/gtest_pred_impl.h> // for Test, EXPECT_EQ, TestInfo
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment