github-linguist / github-linguist/linguist
Not all BUILD files are Starlark (Starlark overrides shell)
- Dominant language
- Ruby
- Stars
- 13.7k
- Forks
- 5.4k
- Avg merge
- 1d 15h
- Merged PRs (30d)
- 17
Description
## Preliminary Steps
Please confirm you have...
- [x] reviewed [How Linguist Works](https://github.com/github/linguist#how-linguist-works),
- [x] reviewed the [Troubleshooting](https://github.com/github/linguist#troubleshooting) docs,
- [x] considered implementing an [override](https://github.com/github/linguist#overrides),
- [x] verified an issue has not already been logged for your issue ([linguist issues](https://github.com/issues?utf8=%E2%9C%93&q=is%3Aissue+repo%3Agithub/linguist)).
## Problem Description
I had never heard of `Starlark` before, but apparently it overrides regular shell scripts in many contexts.
Over 50% of our [package build instructions which are mostly bash scripts](https://github.com/lunar-linux/moonbase-core) are recognized as Starlark at the moment. [Here is one rather clear example](https://github.com/lunar-linux/moonbase-core/blob/2ef7f6884a68dab85ac6d826ea173660a6f8f97c/devel/meson/BUILD), but the search gives you many others.
Adding shebang lines in each file is not an option because it simply bloats all descriptions.
We might add overrides in the future because many of the files are ambiguous with Python as well, but seeing a rather unusual variant of python being detected so prominently seems like an issue that should be resolved.
### URL of the affected repository:
https://github.com/lunar-linux/moonbase-core
### Last modified on:
2020/09/14
### Expected language:
Shell
### Detected language:
Starlark
Contributor guide
Research direction
Start with the How Linguist Works and Troubleshooting documentation, then reproduce language detection for the linked moonbase-core BUILD example. Inspect how Starlark and Shell are selected for BUILD files and determine how the affected examples are represented. Done means the reported shell scripts are detected appropriately without adding shebangs, with regression coverage for the case.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- ruby, shell
- Domain
- tooling
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 25/100