File tree Expand file tree Collapse file tree 2 files changed +7
-9
lines changed
Expand file tree Collapse file tree 2 files changed +7
-9
lines changed Original file line number Diff line number Diff line change @@ -2,6 +2,7 @@ mod extractor;
22
33extern crate num_cpus;
44
5+ use clap:: arg;
56use flate2:: write:: GzEncoder ;
67use rayon:: prelude:: * ;
78use 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" )
Original file line number Diff line number Diff line change @@ -3,6 +3,7 @@ mod language;
33mod ql;
44mod ql_gen;
55
6+ use clap:: arg;
67use language:: Language ;
78use std:: collections:: BTreeMap as Map ;
89use 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) ;
You can’t perform that action at this time.
0 commit comments