codeclippy 0.0.1

Codeclippy is a utility to scan, map, and search code objects.
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
use crate::map::source_map;

pub fn handle_ls(ls_matches: &clap::ArgMatches) {
    let uri = ls_matches.get_one::<String>("uri").unwrap().to_string();
    let filter_name = ls_matches
        .get_one::<String>("name")
        .map(ToString::to_string);

    let maxdepth = ls_matches.get_one::<usize>("maxdepth");
    println!("maxdepth: {:?}", maxdepth);
    source_map(&uri, filter_name.as_deref(), maxdepth.copied());
}