Skip to content

Commit 941f230

Browse files
authored
Merge pull request github#7729 from github/hmac/bump-clap
Ruby extractor: bump clap
2 parents 15aa09f + 962d021 commit 941f230

File tree

5 files changed

+60
-34
lines changed

5 files changed

+60
-34
lines changed

ruby/Cargo.lock

Lines changed: 51 additions & 23 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

ruby/extractor/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ node-types = { path = "../node-types" }
1212
tree-sitter = "0.19"
1313
tree-sitter-embedded-template = "0.19"
1414
tree-sitter-ruby = { git = "https://github.com/tree-sitter/tree-sitter-ruby.git", rev = "888e2e563ed3b43c417f17e57f7e29c39ce9aeea" }
15-
clap = "2.33"
15+
clap = "3.0"
1616
tracing = "0.1"
1717
tracing-subscriber = { version = "0.3.3", features = ["env-filter"] }
1818
rayon = "1.5.0"

ruby/extractor/src/main.rs

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@ mod extractor;
22

33
extern crate num_cpus;
44

5+
use clap::arg;
56
use flate2::write::GzEncoder;
67
use rayon::prelude::*;
78
use std::fs;
@@ -104,11 +105,9 @@ fn main() -> std::io::Result<()> {
104105
.version("1.0")
105106
.author("GitHub")
106107
.about("CodeQL Ruby extractor")
107-
.args_from_usage(
108-
"--source-archive-dir=<DIR> 'Sets a custom source archive folder'
109-
--output-dir=<DIR> 'Sets a custom trap folder'
110-
--file-list=<FILE_LIST> 'A text files containing the paths of the files to extract'",
111-
)
108+
.arg(arg!(--"source-archive-dir" <DIR> "Sets a custom source archive folder"))
109+
.arg(arg!(--"output-dir" <DIR> "Sets a custom trap folder"))
110+
.arg(arg!(--"file-list" <FILE_LIST> "A text file containing the paths of the files to extract"))
112111
.get_matches();
113112
let src_archive_dir = matches
114113
.value_of("source-archive-dir")

ruby/generator/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ edition = "2018"
77
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
88

99
[dependencies]
10-
clap = "2.33"
10+
clap = "3.0"
1111
node-types = { path = "../node-types" }
1212
tracing = "0.1"
1313
tracing-subscriber = { version = "0.3.3", features = ["env-filter"] }

ruby/generator/src/main.rs

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ mod language;
33
mod ql;
44
mod ql_gen;
55

6+
use clap::arg;
67
use language::Language;
78
use std::collections::BTreeMap as Map;
89
use std::collections::BTreeSet as Set;
@@ -556,10 +557,8 @@ fn main() -> std::io::Result<()> {
556557
.version("1.0")
557558
.author("GitHub")
558559
.about("CodeQL Ruby dbscheme generator")
559-
.args_from_usage(
560-
"--dbscheme=<FILE> 'Path of the generated dbscheme file'
561-
--library=<FILE> 'Path of the generated QLL file'",
562-
)
560+
.arg(arg!(--dbscheme <FILE> "Path of the generated dbscheme file"))
561+
.arg(arg!(--library <FILE> "Path of the generated QLL file"))
563562
.get_matches();
564563
let dbscheme_path = matches.value_of("dbscheme").expect("missing --dbscheme");
565564
let dbscheme_path = PathBuf::from(dbscheme_path);

0 commit comments

Comments
 (0)