summaryrefslogtreecommitdiffstats
path: root/build/plugins/_dart_fields.py
diff options
context:
space:
mode:
authoralevitskii <[email protected]>2025-03-06 09:18:56 +0300
committeralevitskii <[email protected]>2025-03-06 09:59:58 +0300
commit4cc4da00bf1da0d8abf4b8c58a1b3b9da2d06d42 (patch)
tree5b714015e6e6860891c37319b13bb756e59029ad /build/plugins/_dart_fields.py
parent7c7d81ae823ff162a5b313e1382206e8468d6ce9 (diff)
[maps/b2bgeo] Allow linting for only some paths in mvrp_solver
[maps/b2bgeo] Allow linting for only some paths in mvrp_solver commit_hash:f72da7660cc3c235736edcebce5a06269e2772ab
Diffstat (limited to 'build/plugins/_dart_fields.py')
-rw-r--r--build/plugins/_dart_fields.py15
1 files changed, 15 insertions, 0 deletions
diff --git a/build/plugins/_dart_fields.py b/build/plugins/_dart_fields.py
index 6575f84ecff..8d2c471e539 100644
--- a/build/plugins/_dart_fields.py
+++ b/build/plugins/_dart_fields.py
@@ -1183,6 +1183,14 @@ class TestFiles:
'maps/renderer/tools/mapcheck2/tests',
)
+ # XXX: this is a workaround to support very specific linting settings.
+ # Do not use it as a general mechanism!
+ _MAPS_B2BGEO_PREFIX = 'maps/b2bgeo/mvrp_solver'
+ _MAPS_B2BGEO_INCLUDE_LINTER_TEST_PATHS = (
+ 'maps/b2bgeo/mvrp_solver/backend',
+ 'maps/b2bgeo/mvrp_solver/aws_docker',
+ )
+
@classmethod
def value(cls, unit, flat_args, spec_args):
data_re = re.compile(r"sbr:/?/?(\d+)=?.*")
@@ -1291,6 +1299,13 @@ class TestFiles:
else:
raise DartValueError()
+ if upath.startswith(cls._MAPS_B2BGEO_PREFIX):
+ for path in cls._MAPS_B2BGEO_INCLUDE_LINTER_TEST_PATHS:
+ if os.path.commonpath([upath, path]) == path:
+ break
+ else:
+ raise DartValueError()
+
files_dart = _reference_group_var("ALL_SRCS", consts.STYLE_CPP_ALL_EXTS)
return {cls.KEY: files_dart, cls.KEY2: files_dart}