aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorthegeorg <thegeorg@yandex-team.com>2024-06-11 18:20:25 +0300
committerthegeorg <thegeorg@yandex-team.com>2024-06-12 11:14:51 +0300
commit61a0cd4e405691bb1309ada13b972303daa24a62 (patch)
tree4a4e3f2c6f5291602f45a80372c3a1b914bb3c3c
parentc4baea3258694a449eb655e6e19e9c4fbf5159c6 (diff)
downloadydb-61a0cd4e405691bb1309ada13b972303daa24a62.tar.gz
Introduce project-specific STYLE_CPP() variant
This is a temporary macro which will be used to mitigate differences between two `.clang-format`'s. d1113adfb7285ed63b989094fa2464ec38b9c039
-rw-r--r--build/ymake.core.conf14
1 files changed, 10 insertions, 4 deletions
diff --git a/build/ymake.core.conf b/build/ymake.core.conf
index 6354106658..35dfccbf9c 100644
--- a/build/ymake.core.conf
+++ b/build/ymake.core.conf
@@ -5863,14 +5863,20 @@ macro _CPP_STYLE(EXCLUDE[], Files...) {
ADD_LINTER_CHECK(cpp_style tools/cpp_style_checker/cpp_style_checker DEPENDS contrib/libs/clang16/tools/clang-format EXCLUDE $EXCLUDE FILES $Files CONFIGS devtools/ya/handlers/style/style_config)
}
+# tag:internal
+# A convenient proxy
+macro _STYLE_CPP(CONFIG) {
+ SET(USE_ALL_SRCS yes)
+ HEADERS(.)
+ _ADD_LINTER_CHECK(cpp_style tools/cpp_style_checker/cpp_style_checker DEPENDS contrib/libs/clang16/tools/clang-format CONFIGS $CONFIG)
+}
+
#tag:test
### @usage STYLE_CPP()
###
-### Run clang-format test on all cpp sources of current module
+### Run 'ya tool clang-format' test on all cpp sources and headers of the current module
macro STYLE_CPP() {
- SET(USE_ALL_SRCS yes)
- HEADERS(.)
- _ADD_LINTER_CHECK(cpp_style tools/cpp_style_checker/cpp_style_checker DEPENDS contrib/libs/clang16/tools/clang-format CONFIGS build/config/tests/cpp_style/config.clang-format)
+ _STYLE_CPP("build/config/tests/cpp_style/config.clang-format")
}
### @usage: HEADERS([Dir1 Dir2 ...])