Skip to content

Commit

Permalink
Add Tiltfile + Starlark support
Browse files Browse the repository at this point in the history
  • Loading branch information
dbast committed Dec 16, 2024
1 parent f075954 commit cfe2f0f
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
5 changes: 3 additions & 2 deletions identify/extensions.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,15 +12,15 @@
'bash': {'text', 'shell', 'bash'},
'bat': {'text', 'batch'},
'bats': {'text', 'shell', 'bash', 'bats'},
'bazel': {'text', 'bazel'},
'bazel': {'text', 'bazel', 'starlark'},
'bb': {'text', 'bitbake'},
'bbappend': {'text', 'bitbake'},
'bbclass': {'text', 'bitbake'},
'beancount': {'text', 'beancount'},
'bib': {'text', 'bib'},
'bmp': {'binary', 'image', 'bitmap'},
'bz2': {'binary', 'bzip2'},
'bzl': {'text', 'bazel'},
'bzl': {'text', 'bazel', 'starlark'},
'c': {'text', 'c'},
'c++': {'text', 'c++'},
'c++m': {'text', 'c++'},
Expand Down Expand Up @@ -391,6 +391,7 @@
'setup.cfg': EXTENSIONS['ini'],
'sys.config': EXTENSIONS['erl'],
'sys.config.src': EXTENSIONS['erl'],
'Tiltfile': {'text', 'tiltfile', 'starlark'},
'Vagrantfile': EXTENSIONS['rb'],
'WORKSPACE': EXTENSIONS['bzl'],
'wscript': EXTENSIONS['py'],
Expand Down
3 changes: 3 additions & 0 deletions tests/identify_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -172,6 +172,9 @@ def test_tags_from_path_plist_text(tmpdir):
('meson.build', {'text', 'meson'}),
('meson_options.txt', {'text', 'plain-text', 'meson'}),
('Vagrantfile', {'text', 'ruby'}),
('Tiltfile', {'text', 'tiltfile', 'starlark'}),
('Tiltfile.abc', {'text', 'tiltfile', 'starlark'}),
('test.Tiltfile', {'text', 'tiltfile', 'starlark'}),
# does not set binary / text
('f.plist', {'plist'}),
Expand Down

0 comments on commit cfe2f0f

Please sign in to comment.