🦙 MegaLinter analyzes 50 languages, 22 formats, 21 tooling formats, excessive copy-pastes, spelling mistakes and security issues in your repository sources with a GitHub Action, other CI tools or locally.
Describe the bug
The version 2.9.1 used by the latest Megalinter is affected by bug 785: false positive on pragmas.
To Reproduce
Dockerfile starting with a syntax pragma, for example:
# syntax=docker/dockerfile:1.3
ARG test=val
FROM debian:stable
…etc…
Expected behavior
versions <=2.9.0 (predating the bug) and >=2.9.2 (which contains the fix) correctly recognize the above as valid (it only has comments (with pragma), and ARG until the FROM section begins).
Screenshots
Version 2.9.1 triggers this false positive instead:
DL3061 error: Invalid instruction order. Dockerfile must begin with FROM, ARG or comment.
Additional context
We use mega-linter to automatically check our bioinformatics pipeline and it is affected by this bug as current megalinter uses the affected version 2.9.0 of hadolint.
Describe the bug The version 2.9.1 used by the latest Megalinter is affected by bug 785: false positive on pragmas.
To Reproduce Dockerfile starting with a syntax pragma, for example:
Expected behavior versions <=2.9.0 (predating the bug) and >=2.9.2 (which contains the fix) correctly recognize the above as valid (it only has comments (with pragma), and
ARG
until theFROM
section begins).Screenshots Version 2.9.1 triggers this false positive instead:
Additional context We use mega-linter to automatically check our bioinformatics pipeline and it is affected by this bug as current megalinter uses the affected version 2.9.0 of hadolint.