mozbuild.code_analysis 包¶
子模块¶
mozbuild.code_analysis.mach_commands 模块¶
- class mozbuild.code_analysis.mach_commands.StaticAnalysisMonitor(srcdir, objdir, checks, total)¶
基类:
object
- property current_file¶
- property num_files¶
- property num_files_processed¶
- on_line(line)¶
- property warnings_db¶
- class mozbuild.code_analysis.mach_commands.StaticAnalysisSubCommand(command, subcommand, description=None, parser=None, metrics_path: str | None = None, virtualenv_name: str | None = None)¶
基类:
SubCommand
- mozbuild.code_analysis.mach_commands.autotest(command_context, verbose=False, dump_results=False, intree_tool=False, checker_names=[])¶
- mozbuild.code_analysis.mach_commands.build_repo_relative_path(abs_path, repo_path)¶
构建相对于仓库根目录的路径
- mozbuild.code_analysis.mach_commands.check(command_context, source=None, jobs=2, strip=1, verbose=False, checks='-*', fix=False, header_filter='', output=None, format='text', outgoing=False)¶
- mozbuild.code_analysis.mach_commands.clang_format(command_context, assume_filename, path, commit, output_path=None, output_format='diff', verbose=False, outgoing=False)¶
- mozbuild.code_analysis.mach_commands.clang_tidy(command_context)¶
详细文档: https://firefox-source-docs.mozilla.ac.cn/code-quality/static-analysis/index.html
- mozbuild.code_analysis.mach_commands.clear_cache(command_context, verbose=False)¶
- mozbuild.code_analysis.mach_commands.get_abspath_files(command_context, files)¶
- mozbuild.code_analysis.mach_commands.get_clang_tidy_config(command_context)¶
- mozbuild.code_analysis.mach_commands.get_clang_tools(command_context, force=False, skip_cache=False, source=None, download_if_needed=True, verbose=False)¶
- mozbuild.code_analysis.mach_commands.get_files_with_commands(command_context, compile_db, source)¶
返回一个字典数组,其中包含带有构建命令的 file_path
- mozbuild.code_analysis.mach_commands.install(command_context, source=None, skip_cache=False, force=False, verbose=False)¶
- mozbuild.code_analysis.mach_commands.prettier_format(command_context, path, assume_filename)¶
- mozbuild.code_analysis.mach_commands.print_checks(command_context, verbose=False)¶
- mozbuild.code_analysis.mach_commands.prompt_bool(prompt, limit=5)¶
使用提示符提示用户并要求输入布尔值。
- mozbuild.code_analysis.mach_commands.run_one_clang_format_batch(args)¶
- mozbuild.code_analysis.mach_commands.static_analysis(command_context)¶
详细文档: https://firefox-source-docs.mozilla.ac.cn/code-quality/static-analysis/index.html