Skip to content

Commit cfe2f0f

Browse files
committed
Add Tiltfile + Starlark support
1 parent f075954 commit cfe2f0f

File tree

2 files changed

+6
-2
lines changed

2 files changed

+6
-2
lines changed

identify/extensions.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,15 +12,15 @@
1212
'bash': {'text', 'shell', 'bash'},
1313
'bat': {'text', 'batch'},
1414
'bats': {'text', 'shell', 'bash', 'bats'},
15-
'bazel': {'text', 'bazel'},
15+
'bazel': {'text', 'bazel', 'starlark'},
1616
'bb': {'text', 'bitbake'},
1717
'bbappend': {'text', 'bitbake'},
1818
'bbclass': {'text', 'bitbake'},
1919
'beancount': {'text', 'beancount'},
2020
'bib': {'text', 'bib'},
2121
'bmp': {'binary', 'image', 'bitmap'},
2222
'bz2': {'binary', 'bzip2'},
23-
'bzl': {'text', 'bazel'},
23+
'bzl': {'text', 'bazel', 'starlark'},
2424
'c': {'text', 'c'},
2525
'c++': {'text', 'c++'},
2626
'c++m': {'text', 'c++'},
@@ -391,6 +391,7 @@
391391
'setup.cfg': EXTENSIONS['ini'],
392392
'sys.config': EXTENSIONS['erl'],
393393
'sys.config.src': EXTENSIONS['erl'],
394+
'Tiltfile': {'text', 'tiltfile', 'starlark'},
394395
'Vagrantfile': EXTENSIONS['rb'],
395396
'WORKSPACE': EXTENSIONS['bzl'],
396397
'wscript': EXTENSIONS['py'],

tests/identify_test.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -172,6 +172,9 @@ def test_tags_from_path_plist_text(tmpdir):
172172
('meson.build', {'text', 'meson'}),
173173
('meson_options.txt', {'text', 'plain-text', 'meson'}),
174174
('Vagrantfile', {'text', 'ruby'}),
175+
('Tiltfile', {'text', 'tiltfile', 'starlark'}),
176+
('Tiltfile.abc', {'text', 'tiltfile', 'starlark'}),
177+
('test.Tiltfile', {'text', 'tiltfile', 'starlark'}),
175178
176179
# does not set binary / text
177180
('f.plist', {'plist'}),

0 commit comments

Comments
 (0)