Generate color names and table for Go

Also exclude generated files from gofmt checking
This commit is contained in:
Kovid Goyal
2022-08-27 12:57:07 +05:30
parent 9c58cb3f41
commit 387333492b
2 changed files with 16 additions and 6 deletions

View File

@@ -133,8 +133,10 @@ def main():
elif action == 'gofmt':
q = subprocess.check_output('gofmt -s -l tools'.split())
if q.strip():
print(q.decode())
raise SystemExit(1)
q = '\n'.join(filter(lambda x: not x.endswith('_generated.go'), q.decode().strip().splitlines())).strip()
if q:
print(q)
raise SystemExit(1)
else:
raise SystemExit(f'Unknown action: {action}')