Skip to content

Weird error: "expecting is not a supported rule" #60

@darkvertex

Description

@darkvertex

Describe the bug
A clear and concise description of what the bug is.

To Reproduce
Steps to reproduce the behavior:

  1. Ensure autosave is ON, make a new Dockerfile.
  2. Start typing this:
FROM node:latest
WORKDIR 

(Note: WORKDIR has a space after it.)
3. A notification should appear: hadolint: expecting is not a supported rule

Expected behaviour
Okay, so an empty "WORKDIR" is nonsense, but I would not expect the hadolint extension to be worrying about it, let alone throwing a cryptic notification.

Screenshots or Dockerfile

FROM node:latest
WORKDIR 

(Note: WORKDIR has a space after it.)
image
...and if I pop open the Help->Developer Tools window, I got this in the JS Console:
image

Environment and version (please complete the following information):

  • hadolint:
> hadolint --version
Haskell Dockerfile Linter UNKNOWN

(but actually it's 2.8.0 -- there's an issue logged about the --version output already.)

  • OS: Windows 10.0.19042 Build 19042

Debug information
I tried running the same command that the extension output log said it was running:

> hadolint C:\Users\alan\repos\redacted\buggy.Dockerfile --no-color
C:\Users\alan\repos\redacted\buggy.Dockerfile:2:9 expecting the workdir path

From my naive understanding, it appears like maybe the extension is expecting rule-style (DLXXXXX....) output strings all the time and not handling those few error messages that don't have a rule to them.

Additional context
This issue looks related to #46 and #55.

Metadata

Metadata

Assignees

Labels

No labels
No labels

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions