(paths)
| 9 | DFHACK_ROOT = os.path.normpath(os.path.dirname(os.path.dirname(os.path.abspath(__file__)))) |
| 10 | |
| 11 | def load_pattern_files(paths): |
| 12 | patterns = [] |
| 13 | for p in paths: |
| 14 | with open(p) as f: |
| 15 | for line in f.readlines(): |
| 16 | line = line.strip() |
| 17 | if line and not line.startswith('#'): |
| 18 | patterns.append(line) |
| 19 | return patterns |
| 20 | |
| 21 | def valid_file(rel_path, check_patterns, ignore_patterns): |
| 22 | return ( |