Skip to content

701 Remove Registration of Factory Configuration object even with valid config (#1006)#1178

Merged
jeffdiclemente merged 1 commit intoCppMicroServices:c++14-compliantfrom
insi-eb:701_registration
Jul 29, 2025
Merged

701 Remove Registration of Factory Configuration object even with valid config (#1006)#1178
jeffdiclemente merged 1 commit intoCppMicroServices:c++14-compliantfrom
insi-eb:701_registration

Conversation

@RobertLauferElektrobit
Copy link
Copy Markdown

cherry-pick of commit 18842e9 (PR #1006)

see discussion #701

@RobertLauferElektrobit RobertLauferElektrobit changed the title Remove Registration of Factory Configuration object even with valid config (#1006) 701 Remove Registration of Factory Configuration object even with valid config (#1006) Jul 29, 2025
@codecov
Copy link
Copy Markdown

codecov bot commented Jul 29, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 88.10%. Comparing base (73bba2f) to head (63dd171).
⚠️ Report is 1 commits behind head on c++14-compliant.

Additional details and impacted files

Impacted file tree graph

@@                 Coverage Diff                 @@
##           c++14-compliant    #1178      +/-   ##
===================================================
+ Coverage            86.17%   88.10%   +1.92%     
===================================================
  Files                  133      242     +109     
  Lines                 7516    11869    +4353     
===================================================
+ Hits                  6477    10457    +3980     
- Misses                1039     1412     +373     
Files with missing lines Coverage Δ
...ativeServices/src/manager/ConfigurationManager.cpp 95.31% <100.00%> (ø)

... and 111 files with indirect coverage changes

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

Copy link
Copy Markdown
Contributor

@github-actions github-actions bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

clang-tidy made some suggestions

// result in a deactivation and reactivation of the component
std::shared_ptr<cppmicroservices::service::cm::Configuration> configuration;
const std::string uniqueProp[3] = { "uniqueProp1", "uniqueProp2", "uniqueProp3" };
std::string const uniqueProp[3] = { "uniqueProp1", "uniqueProp2", "uniqueProp3" };
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

warning: do not declare C-style arrays, use std::array<> instead [cppcoreguidelines-avoid-c-arrays]

         ^

std::string const uniqueProp[3] = { "uniqueProp1", "uniqueProp2", "uniqueProp3" };
cppmicroservices::AnyMap props(cppmicroservices::AnyMap::UNORDERED_MAP_CASEINSENSITIVE_KEYS);
const std::string instance[3] = { "instance1", "instance2", "instance3" };
std::string const instance[3] = { "instance1", "instance2", "instance3" };
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

warning: do not declare C-style arrays, use std::array<> instead [cppcoreguidelines-avoid-c-arrays]

         ^

@@ -0,0 +1,27 @@
#ifndef _SERVICE_IMPL_HPP_
#define _SERVICE_IMPL_HPP_
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

warning: declaration uses identifier 'SERVICE_IMPL_HPP', which is a reserved identifier [bugprone-reserved-identifier]

Suggested change
#define _SERVICE_IMPL_HPP_
#define SERVICE_IMPL_HPP_

#ifndef _SERVICE_IMPL_HPP_
#define _SERVICE_IMPL_HPP_

#include "TestInterfaces/Interfaces.hpp"
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

warning: 'TestInterfaces/Interfaces.hpp' file not found [clang-diagnostic-error]

#include "TestInterfaces/Interfaces.hpp"
         ^


namespace sample
{
class ServiceComponentCA28 : public test::CAInterface
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

warning: class 'ServiceComponentCA28' defines a default destructor but does not define a copy constructor, a copy assignment operator, a move constructor or a move assignment operator [cppcoreguidelines-special-member-functions]

    class ServiceComponentCA28 : public test::CAInterface
          ^

class ServiceComponentCA28 : public test::CAInterface
{
public:
ServiceComponentCA28(std::shared_ptr<cppmicroservices::AnyMap> const& props) : properties(props) {}
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

warning: constructor does not initialize these fields: properties [cppcoreguidelines-pro-type-member-init]

compendium/test_bundles/TestBundleDSCA28/src/ServiceImpl.hpp:22:

-         std::shared_ptr<cppmicroservices::AnyMap> properties;
+         std::shared_ptr<cppmicroservices::AnyMap> properties{};

@jeffdiclemente jeffdiclemente merged commit 3b65270 into CppMicroServices:c++14-compliant Jul 29, 2025
47 of 55 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants