gritql icon indicating copy to clipboard operation
gritql copied to clipboard

Dockerfile target language support

Open morgante opened this issue 1 year ago • 1 comments

We would like to support Dockerfile as a language for matching against.

Dockerfile is presumably a very simple grammar (example) so this shouldn't be too big of an effort.

Review this guide and join us on Discord to discuss.

Acceptance criteria

  1. Working grammar + language support
  2. At least 10 test cases, including rewrites and metavariables.

morgante avatar Jun 17 '24 15:06 morgante

Here are two test scenarios that I'd love to use GritQL together with Dockerfile support with:

  • I would like to lint all the Dockerfiles in my project and check that the FROM node:22 statements matches the Node version defined in .node-version in the root of my repo so that we don't have version drift between what we use when developing locally and in production.

  • Lint all Dockerfiles to check that they have a USER section so that they don't run as the root user (for security reasons).

TheKnarf avatar May 07 '25 08:05 TheKnarf