Conditions | 2 |
Total Lines | 9 |
Code Lines | 9 |
Lines | 0 |
Ratio | 0 % |
Changes | 0 |
1 | #!/usr/bin/env python |
||
17 | def main(): |
||
18 | filepath = sys.argv[1] |
||
19 | incg = os.path.basename(filepath).upper().replace('.', '_') |
||
20 | f = codecs.open(filepath, 'r', 'utf-8-sig') |
||
21 | text = f.read() |
||
22 | f.close() |
||
23 | r = '\s*#\s*ifndef[/\s]*INCG_IRIS_{0}\S*\s*'.format(incg) |
||
24 | if not re.search(r, text): |
||
25 | exit(1) |
||
26 | |||
30 |