Functions | |
| bool | check_formatting (List[str] filenames, bool fix, bool verbose, int n_jobs) |
| CHECK FORMATTING. | |
| Tuple[str, bool, List[str]] | check_formatting_file (str filename, str clang_format_path, bool fix, bool verbose) |
| None | check_style (str path, bool enable_check_formatting, bool enable_check_whitespace, bool enable_check_tabs, bool fix, bool verbose, int n_jobs=1) |
| CHECK STYLE. | |
| bool | check_tabs (List[str] filenames, bool fix, bool verbose, int n_jobs) |
| CHECK TABS. | |
| Tuple[str, bool, List[str]] | check_tabs_file (str filename, bool fix, bool verbose) |
| bool | check_trailing_whitespace (List[str] filenames, bool fix, bool verbose, int n_jobs) |
| CHECK TRAILING WHITESPACE. | |
| Tuple[str, bool, List[str]] | check_trailing_whitespace_file (str filename, bool fix, bool verbose) |
| str | find_clang_format_path () |
| Tuple[List[str], List[str], List[str]] | find_files_to_check_style (str path) |
| bool | skip_directory (str dirpath) |
| AUXILIARY FUNCTIONS. | |
| bool | skip_file_formatting (str path) |
| bool | skip_file_tabs (str path) |
| bool | skip_file_whitespace (str path) |
Variables | |
| action | |
| argparse | args = parser.parse_args() |
| str | CLANG_FORMAT_GUARD_OFF = '// clang-format off' |
| str | CLANG_FORMAT_GUARD_ON = '// clang-format on' |
| list | CLANG_FORMAT_VERSIONS |
| PARAMETERS. | |
| default | |
| list | DIRECTORIES_TO_SKIP |
| enable_check_formatting | |
| enable_check_tabs | |
| enable_check_whitespace | |
| list | FILE_EXTENSIONS_TO_CHECK_FORMATTING |
| list | FILE_EXTENSIONS_TO_CHECK_TABS |
| list | FILE_EXTENSIONS_TO_CHECK_WHITESPACE |
| list | FILES_TO_CHECK_WHITESPACE |
| list | FILES_TO_SKIP |
| fix | |
| help | |
| int | |
| n_jobs | |
| argparse | parser |
| MAIN. | |
| path | |
| int | TAB_SIZE = 4 |
| try : | |
| type | |
| verbose | |
| bool check-style-clang-format.check_formatting | ( | List[str] | filenames, |
| bool | fix, | ||
| bool | verbose, | ||
| int | n_jobs | ||
| ) |
CHECK FORMATTING.
Check / fix the coding style of a list of files with clang-format.
@param filenames List of filenames to be checked.
@param fix Whether to fix the formatting of the file (True) or
just check if the file is well-formatted (False).
@param verbose Show the lines that are not well-formatted.
@param n_jobs Number of parallel jobs.
@return True if all files are well formatted after the check process.
False if there are non-formatted files after the check process.
Definition at line 371 of file check-style-clang-format.py.
References find_clang_format_path().
Referenced by check_style().
Here is the call graph for this function:
Here is the caller graph for this function:| Tuple[str, bool, List[str]] check-style-clang-format.check_formatting_file | ( | str | filename, |
| str | clang_format_path, | ||
| bool | fix, | ||
| bool | verbose | ||
| ) |
Check / fix the coding style of a file with clang-format.
@param filename Name of the file to be checked.
@param clang_format_path Path to clang-format.
@param fix Whether to fix the style of the file (True) or
just check if the file is well-formatted (False).
@param verbose Show the lines that are not well-formatted.
@return Tuple [Filename, Whether the file is well-formatted, Verbose information].
Definition at line 432 of file check-style-clang-format.py.
| None check-style-clang-format.check_style | ( | str | path, |
| bool | enable_check_formatting, | ||
| bool | enable_check_whitespace, | ||
| bool | enable_check_tabs, | ||
| bool | fix, | ||
| bool | verbose, | ||
| int | n_jobs = 1 |
||
| ) |
CHECK STYLE.
Check / fix the coding style of a list of files, including formatting and
trailing whitespace.
@param path Path to the files.
@param fix Whether to fix the style of the file (True) or
just check if the file is well-formatted (False).
@param enable_check_formatting Whether to enable code formatting checking.
@param enable_check_whitespace Whether to enable trailing whitespace checking.
@param enable_check_tabs Whether to enable tabs checking.
@param verbose Show the lines that are not well-formatted.
@param n_jobs Number of parallel jobs.
Definition at line 300 of file check-style-clang-format.py.
References check_formatting(), check_tabs(), check_trailing_whitespace(), and find_files_to_check_style().
Here is the call graph for this function:| bool check-style-clang-format.check_tabs | ( | List[str] | filenames, |
| bool | fix, | ||
| bool | verbose, | ||
| int | n_jobs | ||
| ) |
CHECK TABS.
Check / fix tabs in a list of files.
@param filename Name of the file to be checked.
@param fix Whether to fix the file (True) or just check if it has tabs (False).
@param verbose Show the lines that are not well-formatted.
@param n_jobs Number of parallel jobs.
@return True if no files have tabs after the check process.
False if there are tabs after the check process.
Definition at line 602 of file check-style-clang-format.py.
Referenced by check_style().
Here is the caller graph for this function:| Tuple[str, bool, List[str]] check-style-clang-format.check_tabs_file | ( | str | filename, |
| bool | fix, | ||
| bool | verbose | ||
| ) |
Check / fix tabs in a file. @param filename Name of the file to be checked. @param fix Whether to fix the file (True) or just check if it has tabs (False). @param verbose Show the lines that are not well-formatted. @return Tuple [Filename, Whether the file has tabs, Verbose information].
Definition at line 662 of file check-style-clang-format.py.
| bool check-style-clang-format.check_trailing_whitespace | ( | List[str] | filenames, |
| bool | fix, | ||
| bool | verbose, | ||
| int | n_jobs | ||
| ) |
CHECK TRAILING WHITESPACE.
Check / fix trailing whitespace in a list of files.
@param filename Name of the file to be checked.
@param fix Whether to fix the file (True) or
just check if it has trailing whitespace (False).
@param verbose Show the lines that are not well-formatted.
@param n_jobs Number of parallel jobs.
@return True if no files have trailing whitespace after the check process.
False if there are trailing whitespace after the check process.
Definition at line 491 of file check-style-clang-format.py.
Referenced by check_style().
Here is the caller graph for this function:| Tuple[str, bool, List[str]] check-style-clang-format.check_trailing_whitespace_file | ( | str | filename, |
| bool | fix, | ||
| bool | verbose | ||
| ) |
Check / fix trailing whitespace in a file.
@param filename Name of the file to be checked.
@param fix Whether to fix the file (True) or
just check if it has trailing whitespace (False).
@param verbose Show the lines that are not well-formatted.
@return Tuple [Filename, Whether the file has trailing whitespace, Verbose information].
Definition at line 552 of file check-style-clang-format.py.
| str check-style-clang-format.find_clang_format_path | ( | ) |
Find the path to one of the supported versions of clang-format. If no supported version of clang-format is found, raise an exception. @return Path to clang-format.
Definition at line 258 of file check-style-clang-format.py.
References int.
Referenced by check_formatting().
Here is the caller graph for this function:| Tuple[List[str], List[str], List[str]] check-style-clang-format.find_files_to_check_style | ( | str | path | ) |
Find all files to be checked in a given path.
@param path Path to check.
@return Tuple [List of files to check formatting,
List of files to check trailing whitespace,
List of files to check tabs].
Definition at line 203 of file check-style-clang-format.py.
References skip_directory(), skip_file_formatting(), skip_file_tabs(), and skip_file_whitespace().
Referenced by check_style().
Here is the call graph for this function:
Here is the caller graph for this function:| bool check-style-clang-format.skip_directory | ( | str | dirpath | ) |
AUXILIARY FUNCTIONS.
Check if a directory should be skipped. @param dirpath Directory path. @return Whether the directory should be skipped or not.
Definition at line 134 of file check-style-clang-format.py.
Referenced by find_files_to_check_style().
Here is the caller graph for this function:| bool check-style-clang-format.skip_file_formatting | ( | str | path | ) |
Check if a file should be skipped from formatting analysis. @param path Path to the file. @return Whether the file should be skipped or not.
Definition at line 148 of file check-style-clang-format.py.
Referenced by find_files_to_check_style().
Here is the caller graph for this function:| bool check-style-clang-format.skip_file_tabs | ( | str | path | ) |
Check if a file should be skipped from tabs analysis. @param path Path to the file. @return Whether the file should be skipped or not.
Definition at line 185 of file check-style-clang-format.py.
Referenced by find_files_to_check_style().
Here is the caller graph for this function:| bool check-style-clang-format.skip_file_whitespace | ( | str | path | ) |
Check if a file should be skipped from trailing whitespace analysis. @param path Path to the file. @return Whether the file should be skipped or not.
Definition at line 166 of file check-style-clang-format.py.
Referenced by find_files_to_check_style().
Here is the caller graph for this function:| check-style-clang-format.action |
Definition at line 738 of file check-style-clang-format.py.
| argparse check-style-clang-format.args = parser.parse_args() |
Definition at line 759 of file check-style-clang-format.py.
| str check-style-clang-format.CLANG_FORMAT_GUARD_OFF = '// clang-format off' |
Definition at line 60 of file check-style-clang-format.py.
| str check-style-clang-format.CLANG_FORMAT_GUARD_ON = '// clang-format on' |
Definition at line 59 of file check-style-clang-format.py.
| list check-style-clang-format.CLANG_FORMAT_VERSIONS |
PARAMETERS.
Definition at line 53 of file check-style-clang-format.py.
| check-style-clang-format.default |
Definition at line 756 of file check-style-clang-format.py.
| list check-style-clang-format.DIRECTORIES_TO_SKIP |
Definition at line 62 of file check-style-clang-format.py.
| check-style-clang-format.enable_check_formatting |
Definition at line 764 of file check-style-clang-format.py.
| check-style-clang-format.enable_check_tabs |
Definition at line 766 of file check-style-clang-format.py.
| check-style-clang-format.enable_check_whitespace |
Definition at line 765 of file check-style-clang-format.py.
| list check-style-clang-format.FILE_EXTENSIONS_TO_CHECK_FORMATTING |
Definition at line 77 of file check-style-clang-format.py.
| list check-style-clang-format.FILE_EXTENSIONS_TO_CHECK_TABS |
Definition at line 118 of file check-style-clang-format.py.
| list check-style-clang-format.FILE_EXTENSIONS_TO_CHECK_WHITESPACE |
Definition at line 83 of file check-style-clang-format.py.
| list check-style-clang-format.FILES_TO_CHECK_WHITESPACE |
Definition at line 113 of file check-style-clang-format.py.
| list check-style-clang-format.FILES_TO_SKIP |
Definition at line 73 of file check-style-clang-format.py.
| check-style-clang-format.fix |
Definition at line 767 of file check-style-clang-format.py.
| check-style-clang-format.help |
Definition at line 739 of file check-style-clang-format.py.
| check-style-clang-format.int |
Definition at line 756 of file check-style-clang-format.py.
Referenced by find_clang_format_path().
| check-style-clang-format.n_jobs |
Definition at line 769 of file check-style-clang-format.py.
| argparse check-style-clang-format.parser |
MAIN.
Definition at line 728 of file check-style-clang-format.py.
| check-style-clang-format.path |
Definition at line 763 of file check-style-clang-format.py.
| int check-style-clang-format.TAB_SIZE = 4 |
Definition at line 128 of file check-style-clang-format.py.
| check-style-clang-format.try : |
Definition at line 761 of file check-style-clang-format.py.
| check-style-clang-format.type |
Definition at line 738 of file check-style-clang-format.py.
| check-style-clang-format.verbose |
Definition at line 768 of file check-style-clang-format.py.