summaryrefslogtreecommitdiffstats
path: root/build/plugins/lib
diff options
context:
space:
mode:
authoramgudym <[email protected]>2025-10-30 23:30:01 +0300
committeramgudym <[email protected]>2025-10-31 00:13:03 +0300
commitde5aee2c03e4dc41762db0cf940ec184395b71ce (patch)
treee1634fac1c87bac93c49816ea2e6b804d7655612 /build/plugins/lib
parent18386cb589d154a445d0b7555a4a78d2f2c56fae (diff)
init STYLE_YAML
commit_hash:98f91957f62fb8e9b6ec95bb37712362e927bcbc
Diffstat (limited to 'build/plugins/lib')
-rw-r--r--build/plugins/lib/test_const/__init__.py6
1 files changed, 6 insertions, 0 deletions
diff --git a/build/plugins/lib/test_const/__init__.py b/build/plugins/lib/test_const/__init__.py
index 0ca52aae73c..6927a4260a9 100644
--- a/build/plugins/lib/test_const/__init__.py
+++ b/build/plugins/lib/test_const/__init__.py
@@ -182,6 +182,7 @@ FLAKE8_PY2_RESOURCE = 'FLAKE8_PY2_RESOURCE_GLOBAL'
FLAKE8_PY3_RESOURCE = 'FLAKE8_PY3_RESOURCE_GLOBAL'
RUFF_RESOURCE = 'RUFF_RESOURCE_GLOBAL'
CLANG_FORMAT_RESOURCE = 'CLANG_FORMAT_RESOURCE_GLOBAL'
+YAMLFMT_FORMAT_RESOURCE = 'YAMLFMT_RESOURCE_GLOBAL'
BLACK_RESOURCE = 'BLACK_RESOURCE_GLOBAL'
# test_tool resource for host platform.
@@ -465,12 +466,14 @@ class CppLinterName(Enum):
class CustomExplicitLinterName(Enum):
ClangFormatJson = "clang_format_json"
+ YamlfmtFormatYaml = "yamlfmt_format_yaml"
class DefaultLinterConfig(Enum):
Cpp = "build/config/tests/cpp_style/default_configs.json"
Python = "build/config/tests/py_style/default_configs.json"
Json = "build/config/tests/json_style/default_configs.json"
+ Yaml = "build/config/tests/yaml_style/default_configs.json"
class LinterConfigsValidationRules(Enum):
@@ -485,6 +488,7 @@ LINTER_TO_GLOBAL_RESOURCES = {
PythonLinterName.Py2Flake8: (('build/external_resources/flake8_py2', FLAKE8_PY2_RESOURCE),),
CppLinterName.ClangFormat: (('build/platform/clang/clang-format', CLANG_FORMAT_RESOURCE),),
CustomExplicitLinterName.ClangFormatJson: (('build/platform/clang/clang-format', CLANG_FORMAT_RESOURCE),),
+ CustomExplicitLinterName.YamlfmtFormatYaml: (('build/external_resources/yamlfmt', YAMLFMT_FORMAT_RESOURCE),),
}
# XXX: if a new linter is added to this mapping respective path to default config file must be available in the json
@@ -493,6 +497,7 @@ LINTER_TO_DEFAULT_CONFIGS = {
PythonLinterName.Black: DefaultLinterConfig.Python,
PythonLinterName.Ruff: DefaultLinterConfig.Python,
CustomExplicitLinterName.ClangFormatJson: DefaultLinterConfig.Json,
+ CustomExplicitLinterName.YamlfmtFormatYaml: DefaultLinterConfig.Yaml,
}
# Fill up like
@@ -512,6 +517,7 @@ LINTER_CONFIG_TYPES = {
PythonLinterName.Black: ("pyproject.toml",),
PythonLinterName.Ruff: ("pyproject.toml", "ruff.toml"),
CustomExplicitLinterName.ClangFormatJson: (".clang-format",),
+ CustomExplicitLinterName.YamlfmtFormatYaml: (".yamlfmt.yml",),
}
AUTOINCLUDE_PATHS = (