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
61
62
63
64
65
66
//! Health check and diagnostics module.
//!
//! Tool-specific health checks for Asana Cli.
use DoctorCheck;
/// Run tool-specific health checks.
///
/// Returns a vector of health check results.
/// These will be run as part of the doctor command along with standard checks.
///
/// # Examples
///
/// Add checks for your tool's specific requirements:
///
/// ```ignore
/// // Check if configuration file exists
/// let config_path = dirs::config_dir()?.join("asana-cli").join("config.toml");
/// if config_path.exists() {
/// checks.push(DoctorCheck {
/// name: "Configuration file".to_string(),
/// status: tftio_cli_common::CheckStatus::Success,
/// message: format!("Found at {}", config_path.display()),
/// });
/// }
///
/// // Check for required external tools
/// if std::process::Command::new("git").arg("--version").output().is_ok() {
/// checks.push(DoctorCheck {
/// name: "Git".to_string(),
/// status: tftio_cli_common::CheckStatus::Success,
/// message: "Git is installed".to_string(),
/// });
/// }
/// ```
// Vec::new() is not const in stable Rust