pub struct TidyOptions {
pub ignore_tidy: Option<Vec<String>>,
pub tidy_checks: String,
pub database: Option<PathBuf>,
pub extra_arg: Vec<String>,
}Expand description
A struct to describe the CLI’s clang-tidy options.
Fields§
§ignore_tidy: Option<Vec<String>>Similar to --ignore but applied
exclusively to files analyzed by clang-tidy.
tidy_checks: StringA comma-separated list of globs with optional - prefix.
Globs are processed in order of appearance in the list.
Globs without - prefix add checks with matching names to the set,
globs with the - prefix remove checks with matching names from the set of
enabled checks. This option’s value is appended to the value of the ‘Checks’
option in a .clang-tidy file (if any).
- It is possible to disable clang-tidy entirely by setting this option to
'-*'. - It is also possible to rely solely on a .clang-tidy config file by
specifying this option as a blank string (
'').
See also clang-tidy docs for more info.
database: Option<PathBuf>The path that is used to read a compile command database.
For example, it can be a CMake build directory in which a file named
compile_commands.json exists (set CMAKE_EXPORT_COMPILE_COMMANDS to ON).
When no build path is specified, a search for compile_commands.json will be
attempted through all parent paths of the first input file. See LLVM docs about
setup tooling
for an example of setting up Clang Tooling on a source tree.
extra_arg: Vec<String>A string of extra arguments passed to clang-tidy for use as compiler arguments.
This can be specified more than once for each
additional argument. Recommend using quotes around the value and
avoid using spaces between name and value (use = instead):
cpp-linter --extra-arg="-std=c++17" --extra-arg="-Wall"Trait Implementations§
Source§impl Clone for TidyOptions
impl Clone for TidyOptions
Source§fn clone(&self) -> TidyOptions
fn clone(&self) -> TidyOptions
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more