diff options
author | alevitskii <alevitskii@yandex-team.com> | 2025-01-28 20:00:55 +0300 |
---|---|---|
committer | alevitskii <alevitskii@yandex-team.com> | 2025-01-28 20:51:05 +0300 |
commit | ac85ae8ff578036879ca10a1e64a47a743dbd1ae (patch) | |
tree | 7bc5ee87b45fe38a90056569c427a715dcdf9aaf /build/plugins/_dart_fields.py | |
parent | 6ee13b3691ee2cd77086f8a8ce9d0597a23f35fb (diff) | |
download | ydb-ac85ae8ff578036879ca10a1e64a47a743dbd1ae.tar.gz |
Add STYLE_CPP_YT macro
Add STYLE_CPP_YT macro
commit_hash:c4992f91380e90a2ac148594c648b5a4cd1b3a10
Diffstat (limited to 'build/plugins/_dart_fields.py')
-rw-r--r-- | build/plugins/_dart_fields.py | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/build/plugins/_dart_fields.py b/build/plugins/_dart_fields.py index d7d0fa5737..49c49f345f 100644 --- a/build/plugins/_dart_fields.py +++ b/build/plugins/_dart_fields.py @@ -662,6 +662,8 @@ class LintConfigs: class LintExtraParams: KEY = 'LINT-EXTRA-PARAMS' + _CUSTOM_CLANG_FORMAT_BIN_ALLOWED_PATHS = ('ads', 'bigrt', 'grut') + @classmethod def from_macro_args(cls, unit, flat_args, spec_args): extra_params = spec_args.get('EXTRA_PARAMS', []) @@ -670,6 +672,12 @@ class LintExtraParams: message = 'Wrong EXTRA_PARAMS value: "{}". Values must have format "name=value".'.format(arg) ymake.report_configure_error(message) raise DartValueError() + if 'clang_format_bin' in arg: + upath = unit.path()[3:] + if not upath.startswith(cls._CUSTOM_CLANG_FORMAT_BIN_ALLOWED_PATHS): + message = f'Custom clang-format is not allowed in upath: {upath}' + ymake.report_configure_error(message) + raise DartValueError() return {cls.KEY: serialize_list(extra_params)} |