File tree Expand file tree Collapse file tree 5 files changed +60
-34
lines changed Expand file tree Collapse file tree 5 files changed +60
-34
lines changed Original file line number Diff line number Diff line change @@ -12,7 +12,7 @@ node-types = { path = "../node-types" }
12
12
tree-sitter = " 0.19"
13
13
tree-sitter-embedded-template = " 0.19"
14
14
tree-sitter-ruby = { git = " https://github.com/tree-sitter/tree-sitter-ruby.git" , rev = " 888e2e563ed3b43c417f17e57f7e29c39ce9aeea" }
15
- clap = " 2.33 "
15
+ clap = " 3.0 "
16
16
tracing = " 0.1"
17
17
tracing-subscriber = { version = " 0.3.3" , features = [" env-filter" ] }
18
18
rayon = " 1.5.0"
Original file line number Diff line number Diff line change @@ -2,6 +2,7 @@ mod extractor;
2
2
3
3
extern crate num_cpus;
4
4
5
+ use clap:: arg;
5
6
use flate2:: write:: GzEncoder ;
6
7
use rayon:: prelude:: * ;
7
8
use std:: fs;
@@ -104,11 +105,9 @@ fn main() -> std::io::Result<()> {
104
105
. version ( "1.0" )
105
106
. author ( "GitHub" )
106
107
. 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" ) )
112
111
. get_matches ( ) ;
113
112
let src_archive_dir = matches
114
113
. value_of ( "source-archive-dir" )
Original file line number Diff line number Diff line change @@ -7,7 +7,7 @@ edition = "2018"
7
7
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
8
8
9
9
[dependencies ]
10
- clap = " 2.33 "
10
+ clap = " 3.0 "
11
11
node-types = { path = " ../node-types" }
12
12
tracing = " 0.1"
13
13
tracing-subscriber = { version = " 0.3.3" , features = [" env-filter" ] }
Original file line number Diff line number Diff line change @@ -3,6 +3,7 @@ mod language;
3
3
mod ql;
4
4
mod ql_gen;
5
5
6
+ use clap:: arg;
6
7
use language:: Language ;
7
8
use std:: collections:: BTreeMap as Map ;
8
9
use std:: collections:: BTreeSet as Set ;
@@ -556,10 +557,8 @@ fn main() -> std::io::Result<()> {
556
557
. version ( "1.0" )
557
558
. author ( "GitHub" )
558
559
. 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" ) )
563
562
. get_matches ( ) ;
564
563
let dbscheme_path = matches. value_of ( "dbscheme" ) . expect ( "missing --dbscheme" ) ;
565
564
let dbscheme_path = PathBuf :: from ( dbscheme_path) ;
You can’t perform that action at this time.
0 commit comments