summaryrefslogtreecommitdiffstats
path: root/build/plugins/lib
diff options
context:
space:
mode:
authoramgudym <[email protected]>2025-10-08 20:55:35 +0300
committeramgudym <[email protected]>2025-10-08 21:15:34 +0300
commit80cc6bcce370ede66d3c6819797a3fce6b804be1 (patch)
tree2bab37d11034123076ae9309ec91a9e0b0455e11 /build/plugins/lib
parent3a0a7b8ddbccd5d1968d1076a3f94d1957850d71 (diff)
init style_json linter
RELATES:(https://nda.ya.ru/t/Gkkktkfd7L5yye commit_hash:406bc77fb0202da33e48738e0e32a1d5271d9b6a
Diffstat (limited to 'build/plugins/lib')
-rw-r--r--build/plugins/lib/test_const/__init__.py8
1 files changed, 8 insertions, 0 deletions
diff --git a/build/plugins/lib/test_const/__init__.py b/build/plugins/lib/test_const/__init__.py
index 508f2c548ec..0ca52aae73c 100644
--- a/build/plugins/lib/test_const/__init__.py
+++ b/build/plugins/lib/test_const/__init__.py
@@ -463,9 +463,14 @@ class CppLinterName(Enum):
ClangFormat18Vanilla = "clang_format_18_vanilla"
+class CustomExplicitLinterName(Enum):
+ ClangFormatJson = "clang_format_json"
+
+
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"
class LinterConfigsValidationRules(Enum):
@@ -479,6 +484,7 @@ LINTER_TO_GLOBAL_RESOURCES = {
PythonLinterName.Flake8: (('build/external_resources/flake8_py3', FLAKE8_PY3_RESOURCE),),
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),),
}
# XXX: if a new linter is added to this mapping respective path to default config file must be available in the json
@@ -486,6 +492,7 @@ LINTER_TO_DEFAULT_CONFIGS = {
CppLinterName.ClangFormat: DefaultLinterConfig.Cpp,
PythonLinterName.Black: DefaultLinterConfig.Python,
PythonLinterName.Ruff: DefaultLinterConfig.Python,
+ CustomExplicitLinterName.ClangFormatJson: DefaultLinterConfig.Json,
}
# Fill up like
@@ -504,6 +511,7 @@ LINTER_CONFIG_TYPES = {
CppLinterName.ClangFormatYT: (".clang-format",),
PythonLinterName.Black: ("pyproject.toml",),
PythonLinterName.Ruff: ("pyproject.toml", "ruff.toml"),
+ CustomExplicitLinterName.ClangFormatJson: (".clang-format",),
}
AUTOINCLUDE_PATHS = (