clang-tools 20.0.0git
Classes | Functions | Variables
run-clang-tidy Namespace Reference

Classes

class  ClangTidyResult
 

Functions

bool strtobool (str val)
 
str find_compilation_database (str path)
 
List[str] get_tidy_invocation (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)
 
None merge_replacement_files (str tmpdir, str mergefile)
 
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)
 
None main ()
 

Variables

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

Function Documentation

◆ 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 198 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 180 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 ( 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 
)
Gets a command line for clang-tidy.

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

Referenced by main(), and run_tidy().

◆ main()

None run-clang-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 154 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 
)
Runs clang-tidy on a single file and returns the result.

Definition at line 236 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 216 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

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

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

◆ try

run-clang-tidy.try :

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

◆ yaml

None run-clang-tidy.yaml = None

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