diff options
author | alevitskii <alevitskii@yandex-team.com> | 2024-11-20 09:22:19 +0300 |
---|---|---|
committer | alevitskii <alevitskii@yandex-team.com> | 2024-11-20 09:33:33 +0300 |
commit | 2d3e35f925595c445a0ff7405eda6c5ed162ab98 (patch) | |
tree | ba0e3192f22e2633345b2a3df4105282215ef435 /tools/cpp_style_checker | |
parent | 1f50694cfb5c440be984de5cae781b8d5948fea6 (diff) | |
download | ydb-2d3e35f925595c445a0ff7405eda6c5ed162ab98.tar.gz |
Use clang-format resource in style cpp linter
Use clang-format resouce in style cpp linter
commit_hash:440dce939163f75f5652a9d119a2d5f064e47e6e
Diffstat (limited to 'tools/cpp_style_checker')
-rw-r--r-- | tools/cpp_style_checker/__main__.py | 4 | ||||
-rw-r--r-- | tools/cpp_style_checker/ya.make | 1 |
2 files changed, 4 insertions, 1 deletions
diff --git a/tools/cpp_style_checker/__main__.py b/tools/cpp_style_checker/__main__.py index f318bb4417..abaa32ee19 100644 --- a/tools/cpp_style_checker/__main__.py +++ b/tools/cpp_style_checker/__main__.py @@ -1,9 +1,11 @@ import difflib import json +import os import subprocess import time import yaml +from build.plugins.lib.test_const import CLANG_FORMAT_RESOURCE from library.python.testing.custom_linter_util import linter_params, reporter from library.python.testing.style import rules @@ -11,7 +13,7 @@ from library.python.testing.style import rules def main(): params = linter_params.get_params() - clang_format_binary = params.depends["contrib/libs/clang16/tools/clang-format/clang-format"] + clang_format_binary = os.path.join(params.global_resources[CLANG_FORMAT_RESOURCE], 'clang-format') style_config_path = params.configs[0] with open(style_config_path) as f: diff --git a/tools/cpp_style_checker/ya.make b/tools/cpp_style_checker/ya.make index b25a270045..35b32a9eaf 100644 --- a/tools/cpp_style_checker/ya.make +++ b/tools/cpp_style_checker/ya.make @@ -1,6 +1,7 @@ PY3_PROGRAM() PEERDIR( + build/plugins/lib/test_const contrib/python/PyYAML library/python/testing/custom_linter_util library/python/testing/style |