`fileextension` is insufficient

Open
#1,135 5 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
5/5
Estimated time
Over a week
Newbie friendliness
35/100
Issue type
Feature
Clarity
Mostly clear
Activity status
Stale
Tech stack
lua

Research direction

The issue concerns Premake's fileextension rule and proposes a filepattern rule for extensionless files and mid-extension matches. No implementation files or tests are named, so first locate the existing rule and its test coverage. Done means the supported pattern cases and the deprecation path are clearly defined and verified.

Written by the indexing model from the issue text.

Description

When defining rules, I've encountered multiple cases where fileextension is insufficient.

Today's occurrence has popped up many times before; I want to write a rule for configure files, which have no file extension.

I think we need to add filepattern and deprecate fileextension, and use filepattern "*.cpp" instead of fileextension ".cpp"

How do we feel about this?

I have also encountered cases where I want to hook a mid-extension like *.mid_ext.*, so I think patterns generalise more nicely than extensions.

Dominant language
C
Stars
3.6k
Forks
654
Avg merge
1d 1h
Merged PRs (30d)
13

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from premake/premake-core

All issues in premake/premake-core

Similar issues

More C issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.