clang-tools 22.0.0git
run-clang-tidy Namespace Reference

Classes

class  ClangTidyResult

Functions

bool strtobool (str val)
str find_compilation_database (str path)
List[str] get_tidy_invocation (Optional[str] f, str clang_tidy_binary, str checks, Optional[str] tmpdir, str build_path, Optional[str] header_filter, bool allow_enabling_alpha_checkers, List[str] extra_arg, List[str] extra_arg_before, bool quiet, str config_file_path, str config, Optional[str] line_filter, bool use_color, List[str] plugins, Optional[str] warnings_as_errors, Optional[str] exclude_header_filter, bool allow_no_checks, Optional[str] store_check_profile)
None merge_replacement_files (str tmpdir, str mergefile)
Dict[str, float] aggregate_profiles (str profile_dir)
None print_profile_data (Dict[str, float] aggregated_data)
str find_binary (str arg, str name, str build_path)
None apply_fixes (argparse.Namespace args, str clang_apply_replacements_binary, str tmpdir)
T run_with_semaphore (asyncio.Semaphore semaphore, Callable[..., Awaitable[T]] f, *Any args, **Any kwargs)
ClangTidyResult run_tidy (argparse.Namespace args, str name, str clang_tidy_binary, str tmpdir, str build_path, Optional[str] store_check_profile)
None main ()

Variables

Optional yaml = None
 T = TypeVar("T")

Function Documentation

◆ aggregate_profiles()

Dict[str, float] run-clang-tidy.aggregate_profiles ( str profile_dir)
Aggregate timing data from multiple profile JSON files

Definition at line 185 of file run-clang-tidy.py.

Referenced by main().

◆ apply_fixes()

None run-clang-tidy.apply_fixes ( argparse.Namespace args,
str clang_apply_replacements_binary,
str tmpdir )
Calls clang-apply-fixes on a given directory.

Definition at line 321 of file run-clang-tidy.py.

Referenced by main().

◆ find_binary()

str run-clang-tidy.find_binary ( str arg,
str name,
str build_path )
Get the path for a binary or exit

Definition at line 303 of file run-clang-tidy.py.

Referenced by main().

◆ find_compilation_database()

str run-clang-tidy.find_compilation_database ( str path)
Adjusts the directory until a compilation database is found.

Definition at line 77 of file run-clang-tidy.py.

Referenced by main().

◆ get_tidy_invocation()

List[str] run-clang-tidy.get_tidy_invocation ( Optional[str] f,
str clang_tidy_binary,
str checks,
Optional[str] tmpdir,
str build_path,
Optional[str] header_filter,
bool allow_enabling_alpha_checkers,
List[str] extra_arg,
List[str] extra_arg_before,
bool quiet,
str config_file_path,
str config,
Optional[str] line_filter,
bool use_color,
List[str] plugins,
Optional[str] warnings_as_errors,
Optional[str] exclude_header_filter,
bool allow_no_checks,
Optional[str] store_check_profile )
Gets a command line for clang-tidy.

Definition at line 89 of file run-clang-tidy.py.

Referenced by main(), and run_tidy().

◆ main()

◆ merge_replacement_files()

None run-clang-tidy.merge_replacement_files ( str tmpdir,
str mergefile )
Merge all replacement files in a directory into a single file

Definition at line 159 of file run-clang-tidy.py.

Referenced by main().

◆ print_profile_data()

None run-clang-tidy.print_profile_data ( Dict[str, float] aggregated_data)
Print aggregated checks profile data in the same format as clang-tidy

Definition at line 208 of file run-clang-tidy.py.

Referenced by main().

◆ run_tidy()

ClangTidyResult run-clang-tidy.run_tidy ( argparse.Namespace args,
str name,
str clang_tidy_binary,
str tmpdir,
str build_path,
Optional[str] store_check_profile )
Runs clang-tidy on a single file and returns the result.

Definition at line 359 of file run-clang-tidy.py.

References get_tidy_invocation().

◆ run_with_semaphore()

T run-clang-tidy.run_with_semaphore ( asyncio.Semaphore semaphore,
Callable[..., Awaitable[T]] f,
*Any args,
**Any kwargs )

Definition at line 339 of file run-clang-tidy.py.

Referenced by main().

◆ strtobool()

bool run-clang-tidy.strtobool ( str val)
Convert a string representation of truth to a bool following LLVM's CLI argument parsing.

Definition at line 62 of file run-clang-tidy.py.

Variable Documentation

◆ T

run-clang-tidy.T = TypeVar("T")

Definition at line 336 of file run-clang-tidy.py.

◆ yaml

run-clang-tidy.yaml = None

Definition at line 55 of file run-clang-tidy.py.