github-linguist / github-linguist/linguist
Trim `.example` suffix when analyzing filenames
Open
Improvement
- Dominant language
- Ruby
- Stars
- 13.7k
- Forks
- 5.4k
- Avg merge
- 1d 15h
- Merged PRs (30d)
- 17
Description
## Describe the enhancement
Searching the `*.example` path on GitHub, I'm seeing a lot of `.example` files, such as:
- `.env.example`
- `Makefile.example`
- `README.md.example`
- `*.py.example`
- `*.js.example`
And I'm thinking that Linguist would be able to identify these files' languages correctly if it trimmed the `.example` suffix before checking the extension or filename. E.g.
- `.env.example` -> `.env` -> Dotenv (by filename)
- `README.md.example` -> `README.md` -> Markdown (by extension)
Does this make sense?
Contributor guide
Assessment
This issue has not been assessed yet.