From 85ae91341350d5e4858171cf40d45e38adbceb2f Mon Sep 17 00:00:00 2001 From: nerix Date: Sun, 25 May 2025 15:46:28 +0200 Subject: [PATCH] chore: require clang-format 19 (#6236) --- .github/workflows/check-formatting.yml | 2 +- CHANGELOG.md | 1 + src/controllers/filters/lang/expressions/ListExpression.cpp | 2 +- src/controllers/filters/lang/expressions/RegexExpression.cpp | 2 +- src/util/CancellationToken.hpp | 4 ++-- src/util/IpcQueue.cpp | 2 +- 6 files changed, 7 insertions(+), 6 deletions(-) diff --git a/.github/workflows/check-formatting.yml b/.github/workflows/check-formatting.yml index bf861832..17c0f0e7 100644 --- a/.github/workflows/check-formatting.yml +++ b/.github/workflows/check-formatting.yml @@ -30,7 +30,7 @@ jobs: with: source: "./src ./tests/src ./benchmarks/src ./mocks/include" extensions: "hpp,cpp" - clangFormatVersion: 16 + clangFormatVersion: 19 - name: Check line-endings run: ./scripts/check-line-endings.sh diff --git a/CHANGELOG.md b/CHANGELOG.md index ddaae5ae..3eba72da 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -53,6 +53,7 @@ - Dev: Fixed incorrect lua generation of static methods for typescript plugins. (#6190, #6223) - Dev: Merged top/bottom and left/right notebook layouts. (#6215) - Dev: Refactored `Button` and friends. (#6102) +- Dev: Bumped clang-format requirement to 19. (#6236) ## 2.5.3 diff --git a/src/controllers/filters/lang/expressions/ListExpression.cpp b/src/controllers/filters/lang/expressions/ListExpression.cpp index c0bf5ef8..d4b56f5a 100644 --- a/src/controllers/filters/lang/expressions/ListExpression.cpp +++ b/src/controllers/filters/lang/expressions/ListExpression.cpp @@ -3,7 +3,7 @@ namespace chatterino::filters { ListExpression::ListExpression(ExpressionList &&list) - : list_(std::move(list)){}; + : list_(std::move(list)) {}; QVariant ListExpression::execute(const ContextMap &context) const { diff --git a/src/controllers/filters/lang/expressions/RegexExpression.cpp b/src/controllers/filters/lang/expressions/RegexExpression.cpp index 84817573..a2c1af68 100644 --- a/src/controllers/filters/lang/expressions/RegexExpression.cpp +++ b/src/controllers/filters/lang/expressions/RegexExpression.cpp @@ -7,7 +7,7 @@ RegexExpression::RegexExpression(const QString ®ex, bool caseInsensitive) , caseInsensitive_(caseInsensitive) , regex_(QRegularExpression( regex, caseInsensitive ? QRegularExpression::CaseInsensitiveOption - : QRegularExpression::NoPatternOption)){}; + : QRegularExpression::NoPatternOption)) {}; QVariant RegexExpression::execute(const ContextMap & /*context*/) const { diff --git a/src/util/CancellationToken.hpp b/src/util/CancellationToken.hpp index 0da45601..25877c0a 100644 --- a/src/util/CancellationToken.hpp +++ b/src/util/CancellationToken.hpp @@ -19,7 +19,7 @@ public: CancellationToken(const CancellationToken &) = default; CancellationToken(CancellationToken &&other) noexcept - : isCancelled_(std::move(other.isCancelled_)){}; + : isCancelled_(std::move(other.isCancelled_)) {}; /// @brief This destructor doesn't cancel the token /// @@ -64,7 +64,7 @@ public: ScopedCancellationToken(const ScopedCancellationToken &) = delete; ScopedCancellationToken(ScopedCancellationToken &&other) noexcept - : backingToken_(std::move(other.backingToken_)){}; + : backingToken_(std::move(other.backingToken_)) {}; ~ScopedCancellationToken() { diff --git a/src/util/IpcQueue.cpp b/src/util/IpcQueue.cpp index 39738697..c9969f33 100644 --- a/src/util/IpcQueue.cpp +++ b/src/util/IpcQueue.cpp @@ -81,7 +81,7 @@ public: }; IpcQueue::IpcQueue(IpcQueuePrivate *priv) - : private_(priv){}; + : private_(priv) {}; IpcQueue::~IpcQueue() = default; std::pair, QString> IpcQueue::tryReplaceOrCreate(