Dockerfile target language support
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
- Working grammar + language support
- At least 10 test cases, including rewrites and metavariables.
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:22statements matches the Node version defined in.node-versionin 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).