DRYer
This commit is contained in:
parent
d53cb97aa1
commit
28af786209
@ -2,34 +2,17 @@
|
|||||||
|
|
||||||
import subprocess
|
import subprocess
|
||||||
|
|
||||||
files_to_exclude = '''\
|
|
||||||
kitty/wcwidth-std.h
|
|
||||||
kitty/charsets.c
|
|
||||||
kitty/unicode-data.c
|
|
||||||
kitty/key_encoding.py
|
|
||||||
kitty/rgb.py
|
|
||||||
kitty/gl.h
|
|
||||||
kitty/gl-wrapper.h
|
|
||||||
kitty/gl-wrapper.c
|
|
||||||
kitty/srgb_gamma.c
|
|
||||||
kitty/glfw-wrapper.h
|
|
||||||
kitty/glfw-wrapper.c
|
|
||||||
kitty/emoji.h
|
|
||||||
kittens/unicode_input/names.h
|
|
||||||
kitty/parse-graphics-command.h
|
|
||||||
kitty/options/types.py
|
|
||||||
kitty/options/parse.py
|
|
||||||
kitty/options/to-c-generated.h
|
|
||||||
kittens/diff/options/types.py
|
|
||||||
kittens/diff/options/parse.py
|
|
||||||
tools/wcswidth/std.go
|
|
||||||
'''
|
|
||||||
|
|
||||||
ignored = []
|
ignored = []
|
||||||
for line in subprocess.check_output(['git', 'status', '--ignored', '--porcelain']).decode().splitlines():
|
for line in subprocess.check_output(['git', 'status', '--ignored', '--porcelain']).decode().splitlines():
|
||||||
if line.startswith('!! '):
|
if line.startswith('!! '):
|
||||||
ignored.append(line[3:])
|
ignored.append(line[3:])
|
||||||
files_to_exclude += '\n'.join(ignored)
|
files_to_exclude = '\n'.join(ignored)
|
||||||
|
|
||||||
|
cp = subprocess.run(['git', 'check-attr', 'linguist-generated', '--stdin'],
|
||||||
|
check=True, stdout=subprocess.PIPE, input=subprocess.check_output([ 'git', 'ls-files']))
|
||||||
|
for line in cp.stdout.decode().splitlines():
|
||||||
|
if line.endswith(' true'):
|
||||||
|
files_to_exclude += '\n' + line.split(':')[0]
|
||||||
|
|
||||||
p = subprocess.Popen([
|
p = subprocess.Popen([
|
||||||
'cloc', '--exclude-list-file', '/dev/stdin', 'kitty', 'kittens', 'tools',
|
'cloc', '--exclude-list-file', '/dev/stdin', 'kitty', 'kittens', 'tools',
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user