mirror of
https://github.com/github/codeql.git
synced 2026-04-27 17:55:19 +02:00
Ruby: Bump clap to 4.2
This commit is contained in:
BIN
ruby/extractor/Cargo.lock
generated
BIN
ruby/extractor/Cargo.lock
generated
Binary file not shown.
@@ -10,7 +10,7 @@ edition = "2018"
|
||||
tree-sitter = "0.20"
|
||||
tree-sitter-embedded-template = { git = "https://github.com/tree-sitter/tree-sitter-embedded-template.git", rev = "203f7bd3c1bbfbd98fc19add4b8fcb213c059205" }
|
||||
tree-sitter-ruby = { git = "https://github.com/tree-sitter/tree-sitter-ruby.git", rev = "206c7077164372c596ffa8eaadb9435c28941364" }
|
||||
clap = "3.0"
|
||||
clap = "4.2"
|
||||
tracing = "0.1"
|
||||
tracing-subscriber = { version = "0.3.3", features = ["env-filter"] }
|
||||
rayon = "1.5.0"
|
||||
|
||||
@@ -82,7 +82,7 @@ fn main() -> std::io::Result<()> {
|
||||
.build_global()
|
||||
.unwrap();
|
||||
|
||||
let matches = clap::App::new("Ruby extractor")
|
||||
let matches = clap::Command::new("Ruby extractor")
|
||||
.version("1.0")
|
||||
.author("GitHub")
|
||||
.about("CodeQL Ruby extractor")
|
||||
@@ -90,18 +90,21 @@ fn main() -> std::io::Result<()> {
|
||||
.arg(arg!(--"output-dir" <DIR> "Sets a custom trap folder"))
|
||||
.arg(arg!(--"file-list" <FILE_LIST> "A text file containing the paths of the files to extract"))
|
||||
.get_matches();
|
||||
|
||||
let src_archive_dir = matches
|
||||
.value_of("source-archive-dir")
|
||||
.get_one::<String>("source-archive-dir")
|
||||
.expect("missing --source-archive-dir");
|
||||
let src_archive_dir = file_paths::path_from_string(src_archive_dir);
|
||||
|
||||
let trap_dir = matches
|
||||
.value_of("output-dir")
|
||||
.get_one::<String>("output-dir")
|
||||
.expect("missing --output-dir");
|
||||
let trap_dir = file_paths::path_from_string(trap_dir);
|
||||
let trap_dir = file_paths::path_from_string(&trap_dir);
|
||||
|
||||
let file_list = matches.value_of("file-list").expect("missing --file-list");
|
||||
let file_list = fs::File::open(file_paths::path_from_string(file_list))?;
|
||||
let file_list = matches
|
||||
.get_one::<String>("file-list")
|
||||
.expect("missing --file-list");
|
||||
let file_list = fs::File::open(file_paths::path_from_string(&file_list))?;
|
||||
|
||||
let language = tree_sitter_ruby::language();
|
||||
let erb = tree_sitter_embedded_template::language();
|
||||
|
||||
@@ -11,17 +11,21 @@ fn main() -> std::io::Result<()> {
|
||||
.with_env_filter(tracing_subscriber::EnvFilter::from_default_env())
|
||||
.init();
|
||||
|
||||
let matches = clap::App::new("Ruby dbscheme generator")
|
||||
let matches = clap::Command::new("Ruby dbscheme generator")
|
||||
.version("1.0")
|
||||
.author("GitHub")
|
||||
.about("CodeQL Ruby dbscheme generator")
|
||||
.arg(arg!(--dbscheme <FILE> "Path of the generated dbscheme file"))
|
||||
.arg(arg!(--library <FILE> "Path of the generated QLL file"))
|
||||
.get_matches();
|
||||
let dbscheme_path = matches.value_of("dbscheme").expect("missing --dbscheme");
|
||||
let dbscheme_path = matches
|
||||
.get_one::<String>("dbscheme")
|
||||
.expect("missing --dbscheme");
|
||||
let dbscheme_path = PathBuf::from(dbscheme_path);
|
||||
|
||||
let ql_library_path = matches.value_of("library").expect("missing --library");
|
||||
let ql_library_path = matches
|
||||
.get_one::<String>("library")
|
||||
.expect("missing --library");
|
||||
let ql_library_path = PathBuf::from(ql_library_path);
|
||||
|
||||
let languages = vec![
|
||||
|
||||
Reference in New Issue
Block a user