-
-
Notifications
You must be signed in to change notification settings - Fork 217
Expand file tree
/
Copy pathlib.rs
More file actions
60 lines (50 loc) · 1.12 KB
/
lib.rs
File metadata and controls
60 lines (50 loc) · 1.12 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
use bpaf::Bpaf;
use std::env;
use std::path::{Path, PathBuf};
pub mod diagnostics;
pub mod domains;
pub mod env_variables;
pub mod lintdoc;
pub mod lsp;
pub mod metadata;
pub mod redirects;
pub mod rules_sources;
mod shared;
pub mod website;
pub fn project_root() -> PathBuf {
Path::new(
&env::var("CARGO_MANIFEST_DIR").unwrap_or_else(|_| env!("CARGO_MANIFEST_DIR").to_owned()),
)
.ancestors()
.next()
.unwrap()
.to_path_buf()
}
#[derive(Debug, Clone, Bpaf)]
#[bpaf(options)]
pub enum CodegenCommand {
/// Updates the documentation of the rule pages
#[bpaf(command)]
Rules,
/// Metadata
#[bpaf(command)]
Metadata,
/// Diagnostics
#[bpaf(command)]
Diagnostics,
/// Updates the files of a release
#[bpaf(command)]
ReleaseFiles,
/// Updates the files of a release
#[bpaf(command)]
Env,
/// Generate redirects
#[bpaf(command)]
Redirects,
/// Generates the LSP custom methods documentation
#[bpaf(command)]
Lsp,
/// Updates the documentation of the rule pages and the files of a release
#[bpaf(command)]
All,
}