gather_all_code_from_crates/
cli.rs

1crate::ix!();
2
3#[derive(Builder,Getters,StructOpt,Debug)]
4#[structopt(name = "gather-all-code-from-crates")]
5#[builder(setter(into))]
6pub struct Cli {
7    /// One or more crate directories to scan. If none, current dir is used.
8    #[structopt(parse(from_os_str), short="c", long="crate")]
9    #[getset(get = "pub")]
10    crates: Vec<PathBuf>,
11
12    /// Include test code?
13    #[structopt(long="include-tests")]
14    #[getset(get = "pub")]
15    #[builder(default = "false")]
16    include_tests: bool,
17
18    /// Single out one test block by name.
19    #[structopt(long="single-test")]
20    #[getset(get = "pub")]
21    #[builder(default)]
22    single_test_name: Option<String>,
23
24    /// Omit private functions?
25    #[structopt(long="omit-private")]
26    #[getset(get = "pub")]
27    #[builder(default = "false")]
28    omit_private: bool,
29
30    /// Omit function bodies?
31    #[structopt(long="omit-bodies")]
32    #[getset(get = "pub")]
33    #[builder(default = "false")]
34    omit_bodies: bool,
35
36    /// Only include one function body by name.
37    #[structopt(long="single-function")]
38    #[getset(get = "pub")]
39    #[builder(default)]
40    single_function_name: Option<String>,
41
42    /// Exclude specified files (by relative path).
43    #[structopt(long="exclude-file")]
44    #[getset(get = "pub")]
45    #[builder(default)]
46    excluded_files: Vec<String>,
47
48    /// Exclude main file (like src/lib.rs)?
49    #[structopt(long="exclude-main-file")]
50    #[getset(get = "pub")]
51    #[builder(default = "false")]
52    exclude_main_file: bool,
53
54    /// Remove doc comments from functions
55    #[structopt(long="remove-doc-comments")]
56    #[getset(get = "pub")]
57    #[builder(default = "false")]
58    remove_doc_comments: bool,
59}