mirror of
https://github.com/espressif/esp-idf.git
synced 2024-10-05 20:47:46 -04:00
feat(idf.py): add idf.py clang-check
and idf.py clang-html-report
This commit is contained in:
parent
2e008825a9
commit
47fc761299
@ -687,6 +687,14 @@ def init_cli(verbose_output=None):
|
|||||||
except ImportError:
|
except ImportError:
|
||||||
pass
|
pass
|
||||||
|
|
||||||
|
# Optional load `pyclang` for additional clang-tidy related functionalities
|
||||||
|
try:
|
||||||
|
from pyclang import idf_extension
|
||||||
|
|
||||||
|
extensions.append(('idf_clang_tidy_ext', idf_extension))
|
||||||
|
except ImportError:
|
||||||
|
pass
|
||||||
|
|
||||||
for name, extension in extensions:
|
for name, extension in extensions:
|
||||||
try:
|
try:
|
||||||
all_actions = merge_action_lists(all_actions, extension.action_extensions(all_actions, project_dir))
|
all_actions = merge_action_lists(all_actions, extension.action_extensions(all_actions, project_dir))
|
||||||
|
@ -69,6 +69,10 @@ def action_extensions(base_actions, project_path):
|
|||||||
subprocess.check_output(GENERATORS[args.generator]['dry_run'] + [target_name], cwd=args.build_dir)
|
subprocess.check_output(GENERATORS[args.generator]['dry_run'] + [target_name], cwd=args.build_dir)
|
||||||
|
|
||||||
except Exception:
|
except Exception:
|
||||||
|
if target_name in ['clang-check', 'clang-html-report']:
|
||||||
|
raise FatalError('command "{}" requires an additional plugin "pyclang". '
|
||||||
|
'Please install it via "pip install --upgrade pyclang"'.format(target_name))
|
||||||
|
|
||||||
raise FatalError(
|
raise FatalError(
|
||||||
'command "%s" is not known to idf.py and is not a %s target' % (target_name, args.generator))
|
'command "%s" is not known to idf.py and is not a %s target' % (target_name, args.generator))
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user