Extend Dockerfile Lexer to Recognize Alternative Naming Conventions and Support Valid MIME Type
Nobody has claimed this yet.
- Dominant language
- Python
- Stars
- 2.2k
- Forks
- 885
- PR merge metrics
- No merged PRs in 30d
Description
Currently, Pygments supports syntax highlighting for Dockerfile and files matching *.docker, but it does not detect several commonly used alternative naming conventions, such as:
- Dockerfile.backend
- Dockerfile.frontend
- Dockerfile.streamlit
- Dockerfile.dev
- Dockerfile.prod
- backend.dockerfile
- frontend.dockerfile
- dev.dockerfile
- prod.dockerfile
These naming variations are widely used in projects that maintain multiple Dockerfiles for different environments or services.
In addition, it would be beneficial if the Dockerfile lexer also supported the valid MIME type text/x-dockerfile.
Could the lexer be extended to:
Recognize the alternative naming conventions listed above.
Support the MIME type text/x-dockerfile for better interoperability?
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by locating the Dockerfile lexer and its existing filename and MIME-type detection rules. Check the lexer tests, if present, for current Dockerfile and *.docker coverage. Done means the listed naming conventions and text/x-dockerfile are recognized without breaking existing detection.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- dockerfile, python
- Domain
- tooling
- Issue type
- Feature
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Activity status
- Stale
- Clarity
- Clearly specified
- Newbie friendliness
- 55/100