From ab97f4be20092c90d4c9cd8271c36c307582523f Mon Sep 17 00:00:00 2001 From: Sergey Kuznetsov Date: Fri, 24 Jul 2026 12:29:12 +0100 Subject: [PATCH] Fix build and exclue generated code from clang-tidy chore: Fix clang version in devshell --- crates/CMakeLists.txt | 10 ++++++++++ src/test/basics/RustInterop_test.cpp | 2 +- 2 files changed, 11 insertions(+), 1 deletion(-) diff --git a/crates/CMakeLists.txt b/crates/CMakeLists.txt index dcd457400c..8590207230 100644 --- a/crates/CMakeLists.txt +++ b/crates/CMakeLists.txt @@ -13,6 +13,16 @@ endif() corrosion_import_crate(MANIFEST_PATH ${CMAKE_CURRENT_SOURCE_DIR}/Cargo.toml) +file(WRITE "${CMAKE_CURRENT_BINARY_DIR}/.clang-tidy" + "# Auto-generated by crates/CMakeLists.txt. Do not edit.\n" + "# Neutralizes clang-tidy for corrosion/cxxbridge-generated C++.\n" + "# One check kept enabled to avoid clang-tidy's \"no checks enabled\" error.\n" + "Checks: '-*,google-readability-todo'\n" + "WarningsAsErrors: ''\n" + "HeaderFilterRegex: ''\n" + "InheritParentConfig: false\n" +) + # Umbrella target that aggregates all crate-generated code (cxxbridge headers, # etc.). Build this before running clang-tidy so generated headers are present. add_custom_target(xrpl_crates) diff --git a/src/test/basics/RustInterop_test.cpp b/src/test/basics/RustInterop_test.cpp index b27d7613cd..f3362027bc 100644 --- a/src/test/basics/RustInterop_test.cpp +++ b/src/test/basics/RustInterop_test.cpp @@ -4,7 +4,7 @@ namespace xrpl { -class RustInterop_test : public beast::unit_test::suite +class RustInterop_test : public beast::unit_test::Suite { public: void