dprint / dprint-plugin-dockerfile

Dockerfile code formatting plugin for dprint.

Home Page:https://dprint.dev/plugins/dockerfile

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Doesn't work with `Dockerfile.*`

b0o opened this issue · comments

When there's a need to have multiple Dockerfiles in a single directory, it's relatively common to name them Dockerfile.*, e.g. Dockerfile.dev, Dockerfile.prod.

I've tried configuring dprint to match such files, but it doesn't seem to work:

{
  "dockerfile": {},
  "includes": [
    "**/Dockerfile",
    "**/Dockerfile.*"
  ],
  "excludes": [],
  "plugins": [
    "https://plugins.dprint.dev/dockerfile-0.3.0.wasm"
  ]
}

If I have Dockerfile and Dockerfile.prod at the root of my project, running dprint output-file-paths finds Dockerfile but not Dockerfile.prod. It doesn't even work if I explicitly add **/Dockerfile.prod to includes.

If I add **/*.Dockerfile to includes and mv Dockerfile.prod prod.Dockerfile, it does find the file, but this isn't our preferred naming convention.

dprint-plugin-dockerfile version: 0.3.0