pub struct ClangParams {
pub tidy_checks: String,
pub lines_changed_only: LinesChangedOnly,
pub database: Option<PathBuf>,
pub extra_args: Vec<String>,
pub database_json: Option<Vec<CompilationUnit>>,
pub style: String,
pub clang_tidy_command: Option<PathBuf>,
pub clang_format_command: Option<PathBuf>,
pub tidy_filter: Option<FileFilter>,
pub format_filter: Option<FileFilter>,
pub repo_root: PathBuf,
}Expand description
A data structure to contain CLI options that relate to clang-tidy or clang-format arguments.
This struct is designed to be a thread-safe vehicle for common clang arguments and configurations.
Fields§
§tidy_checks: StringThe clang-tidy checks to run.
Format of this string follows the -checks argument of clang-tidy.
lines_changed_only: LinesChangedOnlyFocus on changed lines or entire files.
database: Option<PathBuf>An optional path to a compilation database, used for clang-tidy.
extra_args: Vec<String>Extra arguments to pass to clang-tidy.
Format of these strings follows the -extra-arg argument of clang-tidy.
database_json: Option<Vec<CompilationUnit>>An optional list of compilation units, used for clang-tidy.
This can be set to None initially, but it will be populated by
capture_clang_tools_output(),
if the Self::database is given Some valid value (and the
compile_commands.json file is parsed successfully).
style: StringThe clang-format style to use.
Format of this string follows the -style argument of clang-format.
clang_tidy_command: Option<PathBuf>An optional path to the clang-tidy executable.
If Self::tidy_checks is not -*, then this will be populated by
capture_clang_tools_output(),
regardless if this is given Some value.
clang_format_command: Option<PathBuf>An optional path to the clang-format executable.
If Self::style is not an empty string, then this will be populated by
capture_clang_tools_output(),
regardless if this is given Some value.
tidy_filter: Option<FileFilter>An optional FileFilter to exclude files only from clang-tidy analysis.
format_filter: Option<FileFilter>An optional FileFilter to exclude files only from clang-format analysis.
repo_root: PathBufThe root of the repository, used to locate relative file paths in processing.
A project-specific cache folder is created in this path.
Trait Implementations§
Source§impl Clone for ClangParams
impl Clone for ClangParams
Source§fn clone(&self) -> ClangParams
fn clone(&self) -> ClangParams
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more