feat(tools): Add 'check' field to idf.py actions

This commit is contained in:
Tomas Rezucha
2026-07-16 12:16:11 +08:00
committed by BOT
parent f7e24571ea
commit 32e1303c3e
4 changed files with 41 additions and 18 deletions
+1 -8
View File
@@ -988,19 +988,12 @@ def get_sdkconfig_value(sdkconfig_file: str, key: str) -> str | None:
pattern = re.compile(rf'^{key}=\"?([^\"]*)\"?$')
with open(sdkconfig_file, encoding='utf-8') as f:
for line in f:
match = re.match(pattern, line)
match = re.match(pattern, line.strip())
if match:
value = match.group(1)
return value
def is_target_supported(project_path: str, supported_targets: list) -> bool:
"""
Returns True if the active target is supported, or False otherwise.
"""
return get_target(project_path) in supported_targets
def _check_idf_target(
args: 'PropertyDict', prog_name: str, cache: dict, cache_cmdl: dict, env: dict | None = None
) -> None: