diff options
author | alevitskii <alevitskii@yandex-team.com> | 2024-09-19 09:23:33 +0300 |
---|---|---|
committer | alevitskii <alevitskii@yandex-team.com> | 2024-09-19 09:36:58 +0300 |
commit | b483c552ab774f1c6dfeb9cd16493caf9a4bd147 (patch) | |
tree | 551f7c280f40305838a00a2315cdcf854f1cb17e /build/ymake.core.conf | |
parent | 3f4d314c20d9192bdf84f803ca3a30a051c18198 (diff) | |
download | ydb-b483c552ab774f1c6dfeb9cd16493caf9a4bd147.tar.gz |
new STYLE_CPP
new STYLE_CPP
* STYLE_CPP с дефолтным конфигом
* Прокси файлы с линтерными конфигами для python и cpp, чтобы оторвать конфиги от релизных процессов ya-bin
commit_hash:fa75b9b1437d66eda31caf24e9232370d8cce031
Diffstat (limited to 'build/ymake.core.conf')
-rw-r--r-- | build/ymake.core.conf | 31 |
1 files changed, 15 insertions, 16 deletions
diff --git a/build/ymake.core.conf b/build/ymake.core.conf index 388705f63d..b659589740 100644 --- a/build/ymake.core.conf +++ b/build/ymake.core.conf @@ -133,6 +133,8 @@ when ($USE_PREBUILT_TOOLS == "yes") { } } +CPP_LINTERS_DEFAULT_CONFIGS=build/config/tests/cpp_style/default_configs.json + ### @usage: FUNCTION_ORDERING_FILE(VAR_NAME) ### ### Select file for function reordering. Works only with lld linker. @@ -5830,33 +5832,30 @@ macro YA_CONF_JSON(File) { } # tag:internal -# Don't use directly - wrap with custom macros -macro ADD_LINTER_CHECK(CheckName, Linter, DEPENDS[], EXCLUDE[], FILES[], CONFIGS[]) { - SET(_FILES_VAR uniq_${hash:VAR_SALT}) - _GLOB($_FILES_VAR $FILES EXCLUDE $EXCLUDE) - _ADD_LINTER_CHECK($CheckName $Linter ${pre=DEPENDS :DEPENDS} FILES $$_FILES_VAR CONFIGS $CONFIGS) -} - -# tag:internal -# Draft. Don't use. -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) +### @usage: _STYLE_CPP([CONFIG]) +### +### Proxy. Don't use. Call _ADD_CPP_LINTER_CHECK directly if you need a new macro, see STYLE_CPP +macro _STYLE_CPP(CONFIG...) { + _ADD_CPP_LINTER_CHECK(NAME clang_format LINTER tools/cpp_style_checker/cpp_style_checker DEPENDS contrib/libs/clang16/tools/clang-format CONFIGS $CPP_LINTERS_DEFAULT_CONFIGS CUSTOM_CONFIG $CONFIG) } # tag:internal -# A convenient proxy -macro _STYLE_CPP(CONFIG) { +### @usage: _ADD_CPP_LINTER_CHECK(NAME name LINTER linter [DEPENDS deps] CONFIGS configs_file [GLOBAL_RESOURCES gr] [FILE_PROCESSING_TIME fpt] [EXTRA_PARAMS params] [CUSTOM_CONFIG cc]) +### +### Triggers respective plugin +macro _ADD_CPP_LINTER_CHECK(Args...) { 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) + SET_APPEND(_MAKEFILE_INCLUDE_LIKE_DEPS $CPP_LINTERS_DEFAULT_CONFIGS) } -#tag:test +# tag:test ### @usage STYLE_CPP() ### ### Run 'ya tool clang-format' test on all cpp sources and headers of the current module macro STYLE_CPP() { - _STYLE_CPP("build/config/tests/cpp_style/config.clang-format") + .ALLOWED_IN_COMMON=yes + _ADD_CPP_LINTER_CHECK(NAME clang_format LINTER tools/cpp_style_checker/cpp_style_checker DEPENDS contrib/libs/clang16/tools/clang-format CONFIGS $CPP_LINTERS_DEFAULT_CONFIGS) } ### @usage: HEADERS([Dir1 Dir2 ...]) |