| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
1 parent 2dbd15a commit 05100e1
1 file changed
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -5,7 +5,7 @@ | |||
| 5 | 5 | import io | |
| 6 | 6 | import re | |
| 7 | 7 | import sys | |
| 8 | - | ||
| 8 | + import itertools | ||
| 9 | 9 | ||
| 10 | 10 | def do_exist(file_name, lines, imported): | |
| 11 | 11 | if not any(not re.match('using \w+::{0};'.format(imported), line) and | |
@@ -41,5 +41,10 @@ def is_valid(file_name): | |||
| 41 | 41 | return valid | |
| 42 | 42 | ||
| 43 | 43 | if __name__ == '__main__': | |
| 44 | - files = glob.iglob(sys.argv[1] if len(sys.argv) > 1 else 'src/*.cc') | ||
| 45 | - sys.exit(0 if all(map(is_valid, files)) else 1) | ||
| 44 | + if len(sys.argv) > 1: | ||
| 45 | + files = [] | ||
| 46 | + for pattern in sys.argv[1:]: | ||
| 47 | + files = itertools.chain(files, glob.iglob(pattern)) | ||
| 48 | + else: | ||
| 49 | + files = glob.iglob('src/*.cc') | ||
| 50 | + sys.exit(0 if all(list(map(is_valid, files))) else 1) | ||
| Back | FazBrowse Home | New Git URL |
0 commit comments