maint: Correctly exclude json files in clang-format (#3749)

This commit is contained in:
Ayaz Salikhov 2025-01-15 17:38:03 +00:00 committed by GitHub
parent 630b62fa83
commit 8591bbe4fd
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 3 additions and 1 deletions

View File

@ -40,7 +40,7 @@ repos:
hooks:
- id: clang-format
args: [--style=file]
exclude: ".json"
exclude_types: [json]
- repo: https://github.com/cheshirekow/cmake-format-precommit
rev: v0.6.13
hooks:

View File

@ -11,6 +11,7 @@
#include <nlohmann/json.hpp>
NLOHMANN_JSON_NAMESPACE_BEGIN
template <typename T>
struct adl_serializer<std::optional<T>>
{
@ -38,6 +39,7 @@ struct adl_serializer<std::optional<T>>
}
}
};
NLOHMANN_JSON_NAMESPACE_END
namespace mamba::util