From 78b629f993eef85b2b037c843259ee88917674de Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ege=20=C3=87etin?= <64282645+egecetin@users.noreply.github.com> Date: Fri, 10 Jan 2025 11:03:39 +0300 Subject: [PATCH] Bump clang-format to 19.1.6 (#1677) --- .github/workflows/build_and_test.yml | 2 +- CONTRIBUTING.md | 2 +- Packet++/src/DnsResourceData.cpp | 3 +-- Packet++/src/VrrpLayer.cpp | 3 +-- ci/check-clang-format-version.py | 2 +- 5 files changed, 5 insertions(+), 7 deletions(-) diff --git a/.github/workflows/build_and_test.yml b/.github/workflows/build_and_test.yml index c28480d3a9..6218c64511 100644 --- a/.github/workflows/build_and_test.yml +++ b/.github/workflows/build_and_test.yml @@ -36,7 +36,7 @@ jobs: apk update && apk add cppcheck python3-dev python3 -m venv .venv . .venv/bin/activate - python3 -m pip install pre-commit setuptools clang-format==18.1.6 clang-tidy==18.1.8 + python3 -m pip install pre-commit setuptools clang-format==19.1.6 clang-tidy==18.1.8 - name: Run pre-commit run: | diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 578a5390fb..69530d8268 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -29,7 +29,7 @@ Every code contribution to this project is highly valued and appreciated. I enco - For Windows (using `choco`) `choco install cppcheck --version=2.7` - For Windows (MSI install): https://github.com/danmar/cppcheck/releases/download/2.7/cppcheck-2.7-x64-Setup.msi - Build from source: https://github.com/danmar/cppcheck/releases/tag/2.7 - - `clang-format`: `pip install clang-format==18.1.6` + - `clang-format`: `pip install clang-format==19.1.6` - After you commit the code and push it to GitHub, before creating the pull request please make sure that: - You merge all new code from **dev** to your fork - CI passes on all platforms diff --git a/Packet++/src/DnsResourceData.cpp b/Packet++/src/DnsResourceData.cpp index e735d447de..5365954639 100644 --- a/Packet++/src/DnsResourceData.cpp +++ b/Packet++/src/DnsResourceData.cpp @@ -204,8 +204,7 @@ namespace pcpp { if (m_DataLen == 0 || m_Data == nullptr) { - PCPP_LOG_ERROR("Input data is null or illegal" - << "|m_DataLen:" << m_DataLen); + PCPP_LOG_ERROR("Input data is null or illegal" << "|m_DataLen:" << m_DataLen); return false; } diff --git a/Packet++/src/VrrpLayer.cpp b/Packet++/src/VrrpLayer.cpp index c56cd7f058..8f391155a7 100644 --- a/Packet++/src/VrrpLayer.cpp +++ b/Packet++/src/VrrpLayer.cpp @@ -485,8 +485,7 @@ namespace pcpp auto* ipLayer = m_Packet->getLayerOfType(); if (ipLayer == nullptr) { - PCPP_LOG_ERROR("Calculate checksum failed, for can not get IPLayer" - << ""); + PCPP_LOG_ERROR("Calculate checksum failed, for can not get IPLayer" << ""); return 0; } diff --git a/ci/check-clang-format-version.py b/ci/check-clang-format-version.py index 7379a828a5..c2f97822d3 100644 --- a/ci/check-clang-format-version.py +++ b/ci/check-clang-format-version.py @@ -1,6 +1,6 @@ import subprocess -EXPECTED_CLANG_VERSION = "18.1.6" +EXPECTED_CLANG_VERSION = "19.1.6" def main():