Skip to content

Dockerfile extension rules #60

Description

@rivernews

Currently the tool will recognize docker files as Dockerfile or .dockerfile.

Looking at a StackOverflow the community uses both:

  1. <purpose>.Dockerfile
  2. Dockerfile.<purpose>

Is there an existing way to support the 2nd way above?

It seems that currently the additional extension option also only support wildcard in the prefix but not the suffix: https://github.com/johann-petrak/licenseheaders/blob/master/licenseheaders.py#L817

Proposal

If no existing way to do this, I'm wondering if we can allow specifying below:

--additional-extensions docker=Dockerfile.

That is, when adding the dot at the end, we do the following instead:

# https://github.com/johann-petrak/licenseheaders/blob/master/licenseheaders.py#L817
patterns.append(ext + "*")

Do you think that's feasible? If so, I can create a pull request.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions