@@ -76,10 +76,12 @@ def create_args(params):
7676 parser .add_argument ('--collect-root' , metavar = 'DIR' , default = '' ,
7777 help = 'directory to look gcov files in '
7878 '(--root by default)' )
79- parser .add_argument ('-e' , '--exclude' , metavar = 'DIR|FILE' , action = 'append' ,
80- help = 'set exclude file or directory' , default = [])
81- parser .add_argument ('-i' , '--include' , metavar = 'DIR|FILE' , action = 'append' ,
82- help = 'set include file or directory' , default = [])
79+ parser .add_argument ('-e' , '--exclude' , metavar = 'DIR|FILE' ,
80+ nargs = '+' , action = 'append' , default = [[]],
81+ help = 'set exclude file or directory' )
82+ parser .add_argument ('-i' , '--include' , metavar = 'DIR|FILE' ,
83+ nargs = '+' , action = 'append' , default = [[]],
84+ help = 'set include file or directory' )
8385 parser .add_argument ('-E' , '--exclude-pattern' , dest = 'regexp' ,
8486 action = 'append' , metavar = 'REGEXP' , default = [],
8587 help = 'set exclude file/directory pattern' )
@@ -538,6 +540,10 @@ def run():
538540 print ('uncov-gcov v0.3' )
539541 exit (0 )
540542
543+ # flatten lists
544+ args .exclude = [e for items in args .exclude for e in items ]
545+ args .include = [i for items in args .include for i in items ]
546+
541547 if args .verbose :
542548 print ('encodings: {}' .format (args .encodings ))
543549
0 commit comments