diff options
author | khoden <khoden@yandex-team.com> | 2024-07-24 13:11:05 +0300 |
---|---|---|
committer | khoden <khoden@yandex-team.com> | 2024-07-24 13:26:07 +0300 |
commit | 5c9815caeeb2080bc4a0b3c89ac1f0f612d640cf (patch) | |
tree | aa6d2e4d9de9a60272292f18d77f08d5d42c2f1f /build/plugins/_dart_fields.py | |
parent | cf9351508de68ab7f57292389d1cc0b2dea61d61 (diff) | |
download | ydb-5c9815caeeb2080bc4a0b3c89ac1f0f612d640cf.tar.gz |
TS_STYLELINT
1cd30a6218b4c762d3191d417ca17ecbd50aa628
Diffstat (limited to 'build/plugins/_dart_fields.py')
-rw-r--r-- | build/plugins/_dart_fields.py | 32 |
1 files changed, 30 insertions, 2 deletions
diff --git a/build/plugins/_dart_fields.py b/build/plugins/_dart_fields.py index e25e20d148..563c1a12c6 100644 --- a/build/plugins/_dart_fields.py +++ b/build/plugins/_dart_fields.py @@ -5,13 +5,14 @@ import operator import os import re import shlex -import six import sys from functools import reduce +import six +import ymake + import _common import lib.test_const as consts -import ymake CANON_RESULT_FILE_NAME = 'result.json' @@ -574,6 +575,10 @@ class NodejsRootVarName: class NodeModulesBundleFilename: KEY = 'NODE-MODULES-BUNDLE-FILENAME' + @classmethod + def value(cls, unit, flat_args, spec_args): + return {cls.KEY: spec_args.get('nm_bundle')} + class PythonPaths: KEY = 'PYTHON-PATHS' @@ -853,6 +858,22 @@ class TsConfigPath: KEY = 'TS_CONFIG_PATH' +class TsStylelintConfig: + KEY = 'TS_STYLELINT_CONFIG' + + @classmethod + def value(cls, unit, flat_args, spec_args): + test_config = unit.get('_TS_STYLELINT_CONFIG') + abs_test_config = unit.resolve(unit.resolve_arc_path(test_config)) + if not abs_test_config: + ymake.report_configure_error( + f"Config for stylelint not found: {test_config}.\n" + "Set the correct value in `TS_STYLELINT(<config_filename>)` macro in the `ya.make` file." + ) + + return {cls.KEY: test_config} + + class TsTestDataDirs: KEY = 'TS-TEST-DATA-DIRS' @@ -991,6 +1012,13 @@ class TestFiles: test_files = _resolve_module_files(unit, unit.get("MODDIR"), test_files) return {cls.KEY: serialize_list(test_files)} + @classmethod + def stylesheets(cls, unit, flat_args, spec_args): + test_files = get_values_list(unit, "_TS_STYLELINT_FILES") + test_files = _resolve_module_files(unit, unit.get("MODDIR"), test_files) + + return {cls.KEY: serialize_list(test_files)} + class TestEnv: KEY = 'TEST-ENV' |