mirror of
https://github.com/github/codeql.git
synced 2025-12-17 01:03:14 +01:00
QL: Bump clap to 4.2
This commit is contained in:
BIN
ql/Cargo.lock
generated
BIN
ql/Cargo.lock
generated
Binary file not shown.
@@ -13,7 +13,7 @@ tree-sitter-ql-dbscheme = { git = "https://github.com/erik-krogh/tree-sitter-ql-
|
|||||||
tree-sitter-ql-yaml = {git = "https://github.com/erik-krogh/tree-sitter-ql.git", rev = "cf704bf3671e1ae148e173464fb65a4d2bbf5f99"}
|
tree-sitter-ql-yaml = {git = "https://github.com/erik-krogh/tree-sitter-ql.git", rev = "cf704bf3671e1ae148e173464fb65a4d2bbf5f99"}
|
||||||
tree-sitter-blame = {path = "../buramu/tree-sitter-blame"}
|
tree-sitter-blame = {path = "../buramu/tree-sitter-blame"}
|
||||||
tree-sitter-json = {git = "https://github.com/tausbn/tree-sitter-json.git", rev = "745663ee997f1576fe1e7187e6347e0db36ec7a9"}
|
tree-sitter-json = {git = "https://github.com/tausbn/tree-sitter-json.git", rev = "745663ee997f1576fe1e7187e6347e0db36ec7a9"}
|
||||||
clap = "2.33"
|
clap = "4.2"
|
||||||
tracing = "0.1"
|
tracing = "0.1"
|
||||||
tracing-subscriber = { version = "0.3.16", features = ["env-filter"] }
|
tracing-subscriber = { version = "0.3.16", features = ["env-filter"] }
|
||||||
rayon = "1.7.0"
|
rayon = "1.7.0"
|
||||||
|
|||||||
@@ -58,27 +58,29 @@ fn main() -> std::io::Result<()> {
|
|||||||
.build_global()
|
.build_global()
|
||||||
.unwrap();
|
.unwrap();
|
||||||
|
|
||||||
let matches = clap::App::new("QL extractor")
|
let matches = clap::Command::new("QL extractor")
|
||||||
.version("1.0")
|
.version("1.0")
|
||||||
.author("GitHub")
|
.author("GitHub")
|
||||||
.about("CodeQL QL extractor")
|
.about("CodeQL QL extractor")
|
||||||
.args_from_usage(
|
.args(&[
|
||||||
"--source-archive-dir=<DIR> 'Sets a custom source archive folder'
|
clap::arg!(--"source-archive-dir" <DIR> "Sets a custom source archive folder"),
|
||||||
--output-dir=<DIR> 'Sets a custom trap folder'
|
clap::arg!(--"output-dir" <DIR> "Sets a custom trap folder"),
|
||||||
--file-list=<FILE_LIST> 'A text files containing the paths of the files to extract'",
|
clap::arg!(--"file-list" <FILE_LIST> "A text file containing the paths of the files to extract"),
|
||||||
)
|
])
|
||||||
.get_matches();
|
.get_matches();
|
||||||
let src_archive_dir = matches
|
let src_archive_dir = matches
|
||||||
.value_of("source-archive-dir")
|
.get_one::<String>("source-archive-dir")
|
||||||
.expect("missing --source-archive-dir");
|
.expect("missing --source-archive-dir");
|
||||||
let src_archive_dir = PathBuf::from(src_archive_dir);
|
let src_archive_dir = PathBuf::from(src_archive_dir);
|
||||||
|
|
||||||
let trap_dir = matches
|
let trap_dir = matches
|
||||||
.value_of("output-dir")
|
.get_one::<String>("output-dir")
|
||||||
.expect("missing --output-dir");
|
.expect("missing --output-dir");
|
||||||
let trap_dir = PathBuf::from(trap_dir);
|
let trap_dir = PathBuf::from(trap_dir);
|
||||||
|
|
||||||
let file_list = matches.value_of("file-list").expect("missing --file-list");
|
let file_list = matches
|
||||||
|
.get_one::<String>("file-list")
|
||||||
|
.expect("missing --file-list");
|
||||||
let file_list = fs::File::open(file_list)?;
|
let file_list = fs::File::open(file_list)?;
|
||||||
|
|
||||||
let language = tree_sitter_ql::language();
|
let language = tree_sitter_ql::language();
|
||||||
|
|||||||
@@ -10,19 +10,23 @@ fn main() -> std::io::Result<()> {
|
|||||||
.with_env_filter(tracing_subscriber::EnvFilter::from_default_env())
|
.with_env_filter(tracing_subscriber::EnvFilter::from_default_env())
|
||||||
.init();
|
.init();
|
||||||
|
|
||||||
let matches = clap::App::new("QL dbscheme generator")
|
let matches = clap::Command::new("QL dbscheme generator")
|
||||||
.version("1.0")
|
.version("1.0")
|
||||||
.author("GitHub")
|
.author("GitHub")
|
||||||
.about("CodeQL QL dbscheme generator")
|
.about("CodeQL QL dbscheme generator")
|
||||||
.args_from_usage(
|
.args(&[
|
||||||
"--dbscheme=<FILE> 'Path of the generated dbscheme file'
|
clap::arg!(--dbscheme <FILE> "Path of the generated dbscheme file"),
|
||||||
--library=<FILE> 'Path of the generated QLL file'",
|
clap::arg!(--library <FILE> "Path of the generated QLL file"),
|
||||||
)
|
])
|
||||||
.get_matches();
|
.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 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 ql_library_path = PathBuf::from(ql_library_path);
|
||||||
|
|
||||||
let languages = vec![
|
let languages = vec![
|
||||||
|
|||||||
Reference in New Issue
Block a user