Closed quinox closed 1 month ago
One thing the style does differently than me, is this:
-void SubscriptionStore::giveClientRetainedMessagesInitiateDeferred(const std::weak_ptr<Session> ses,
- const std::shared_ptr<const std::vector<std::string>> subscribeSubtopicsCopy,
- std::shared_ptr<std::deque<DeferredRetainedMessageNodeDelivery>> deferred,
- int &requeue_count, uint &total_node_count, uint8_t max_qos)
+void SubscriptionStore::giveClientRetainedMessagesInitiateDeferred(
+ const std::weak_ptr<Session> ses, const std::shared_ptr<const std::vector<std::string>> subscribeSubtopicsCopy,
+ std::shared_ptr<std::deque<DeferredRetainedMessageNodeDelivery>> deferred, int &requeue_count, uint &total_node_count, uint8_t max_qos
+)
I'm not sure yet what I like better.
Anyway, it looks like a nice autocratic way to force the rules on others, so I rebased+merged it :).
Also run a stylecheck on incoming PRs and reject the PR when the changes lines aren't properly formatted.
To see the effect of the style changes:
There's
.clang-format
(your style) and.clang-format.original
(the default config for LLVM style). By running a diff on these two files you can see what deviations you have from the LLVM style, which makes it easier to upgrade the configuration when you want to switchclang-format
versions: I tried it out with v17 which has a few new options, and some options changed from booleans to mappings.The options themselves are documented here
The CI check will only look at the lines that changed, not all lines. This means you're allowed to use whatever style yourself while still demanding PRs to adhere to your documented style.
This is what the CI looks like: