Skip to content

Commit 80f6d01

Browse files
committed
linting fixes and pinned clang-tidy 13 in ci.yml
1 parent ec25c1e commit 80f6d01

File tree

6 files changed

+12
-7
lines changed

6 files changed

+12
-7
lines changed

.github/workflows/ci.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -430,6 +430,7 @@ jobs:
430430
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
431431
with:
432432
repo-root: up-cpp
433+
version: 13
433434
ignore: 'test'
434435
style: 'file' # read .clang-format for configuration
435436
tidy-checks: '' # Read .clang-tidy for configuration

include/up-cpp/datamodel/builder/Payload.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,7 @@ struct Payload {
7979
/// will compile out.
8080
/// @param data Data to be serialized and stored.
8181
template <typename Serializer, typename ValueT>
82-
Payload(Serializer s, const ValueT& data) {
82+
Payload(Serializer s [[maybe_unused]], const ValueT& data) {
8383
auto serialized_data = Serializer::serialize(data);
8484
if (!UPayloadFormat_IsValid(
8585
std::get<PayloadType::Format>(serialized_data))) {

src/communication/NotificationSource.cpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,8 @@
1313

1414
namespace uprotocol::communication {
1515

16-
using namespace uprotocol::datamodel::builder;
16+
using uprotocol::datamodel::builder::UMessageBuilder;
17+
1718
NotificationSource::NotificationSource(
1819
std::shared_ptr<transport::UTransport> transport, v1::UUri&& source,
1920
v1::UUri&& sink, std::optional<v1::UPayloadFormat> payload_format,

src/communication/Publisher.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
#include <up-cpp/datamodel/builder/UMessage.h>
1515

1616
namespace uprotocol::communication {
17-
using namespace uprotocol::datamodel::builder;
17+
using uprotocol::datamodel::builder::UMessageBuilder;
1818

1919
Publisher::Publisher(std::shared_ptr<transport::UTransport> transport,
2020
v1::UUri&& topic, v1::UPayloadFormat format,

src/communication/RpcClient.cpp

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -20,13 +20,15 @@
2020
namespace {
2121
namespace detail {
2222

23-
using namespace uprotocol;
23+
using uprotocol::v1::UStatus;
24+
using ListenHandle = uprotocol::transport::UTransport::ListenHandle;
2425

2526
struct PendingRequest {
27+
private:
2628
std::chrono::steady_clock::time_point when_expire;
27-
transport::UTransport::ListenHandle response_listener;
28-
std::function<void(v1::UStatus)> expire;
29-
size_t instance_id;
29+
ListenHandle response_listener;
30+
std::function<void(UStatus)> expire;
31+
size_t instance_id{};
3032

3133
auto operator>(const PendingRequest& other) const;
3234
};

test/coverage/communication/NotificationSinkTest.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,7 @@ class NotificationSinkTest : public testing::Test {
4545
static void SetUpTestSuite() {}
4646
static void TearDownTestSuite() {}
4747

48+
private:
4849
uprotocol::v1::UUri testTopicUUri_;
4950
uprotocol::v1::UUri testInvalidTopicUUri_;
5051
uprotocol::v1::UUri testDefaultSourceUUri_;

0 commit comments

Comments
 (0)