Browse Source

Introduce project-specific STYLE_CPP() variant

This is a temporary macro which will be used to mitigate differences between two `.clang-format`'s.
d1113adfb7285ed63b989094fa2464ec38b9c039
thegeorg 9 months ago
parent
commit
61a0cd4e40
1 changed files with 10 additions and 4 deletions
  1. 10 4
      build/ymake.core.conf

+ 10 - 4
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 ...])