Skip to content

Trim .example suffix when analyzing filenames #7712

@spenserblack

Description

@spenserblack

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?

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions