Anton Shestakov <av6@dwimlabs.net>, Thu, 23 Jun 2016 15:06:21 +0800
checker: go back to using hg files with -I and -X
Because -X is a bit simpler than a fileset that also excludes some files (to
code and just visually).
Also rename property to "include" for clarity.
--- a/checker.py Thu Jun 23 14:58:09 2016 +0800
+++ b/checker.py Thu Jun 23 15:06:21 2016 +0800
print('# C&O task: checks')
for linter in config['linters']:
- if 'cmd' not in linter or 'files' not in linter:
+ if 'include' not in linter:
- cmd = ['hg', 'files', 'set:' + ' or '.join(linter['files'])]
+ for pat in linter['include']:
+ cmd.extend(('-I', pat))
+ for pat in linter.get('exclude', []):
+ cmd.extend(('-X', pat))
files = run(cmd, silent=True, get_output=True, ignore_codes=(1,))