• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

tamada / sibling / 16362892246

18 Jul 2025 05:23AM UTC coverage: 59.504% (-10.8%) from 70.292%
16362892246

Pull #38

github

tamada
refactor: replace build_nexter function with NexterFactory::build for consistency
Pull Request #38: Release/v2.0.1

244 of 407 new or added lines in 5 files covered. (59.95%)

288 of 484 relevant lines covered (59.5%)

3.64 hits per line

Source File
Press 'n' to go to next uncovered line, 'b' for previous

0.0
/cli/src/gencomp.rs
1
#[cfg(debug_assertions)]
2
mod generator {
3
    use clap::{Command, CommandFactory};
4
    use clap_complete::Shell;
5
    use std::fs::File;
6
    use std::path::{Path, PathBuf};
7

8
    #[cfg(debug_assertions)]
NEW
9
    fn generate_impl(s: Shell, app: &mut Command, appname: &str, outdir: &Path, file: String) {
×
NEW
10
        let destfile = outdir.join(file);
×
NEW
11
        std::fs::create_dir_all(destfile.parent().unwrap()).unwrap();
×
NEW
12
        if let Ok(mut dest) = File::create(destfile) {
×
NEW
13
            clap_complete::generate(s, app, appname, &mut dest);
×
NEW
14
        }
×
NEW
15
    }
×
16

NEW
17
    pub(super) fn generate(outdir: PathBuf) {
×
NEW
18
        let appname = "sibling";
×
19

NEW
20
        let mut app = crate::cli::CliOpts::command();
×
NEW
21
        app.set_bin_name(appname);
×
22

NEW
23
        generate_impl(
×
NEW
24
            Shell::Bash,
×
NEW
25
            &mut app,
×
NEW
26
            appname,
×
NEW
27
            &outdir,
×
NEW
28
            format!("bash/{}", appname),
×
29
        );
NEW
30
        generate_impl(
×
NEW
31
            Shell::Elvish,
×
NEW
32
            &mut app,
×
NEW
33
            appname,
×
NEW
34
            &outdir,
×
NEW
35
            format!("elvish/{}", appname),
×
36
        );
NEW
37
        generate_impl(
×
NEW
38
            Shell::Fish,
×
NEW
39
            &mut app,
×
NEW
40
            appname,
×
NEW
41
            &outdir,
×
NEW
42
            format!("fish/{}", appname),
×
43
        );
NEW
44
        generate_impl(
×
NEW
45
            Shell::PowerShell,
×
NEW
46
            &mut app,
×
NEW
47
            appname,
×
NEW
48
            &outdir,
×
NEW
49
            format!("powershell/{}", appname),
×
50
        );
NEW
51
        generate_impl(
×
NEW
52
            Shell::Zsh,
×
NEW
53
            &mut app,
×
NEW
54
            appname,
×
NEW
55
            &outdir,
×
NEW
56
            format!("zsh/_{}", appname),
×
57
        );
NEW
58
    }
×
59
}
60

61
#[allow(dead_code, unused_variables)]
NEW
62
pub(crate) fn generate(outdir: std::path::PathBuf) {
×
63
    #[cfg(debug_assertions)]
NEW
64
    generator::generate(outdir);
×
NEW
65
}
×
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc