Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Multi-line LABEL directives highlight as errors #338

Closed
adambkaplan opened this issue Jul 30, 2018 · 6 comments
Closed

Multi-line LABEL directives highlight as errors #338

adambkaplan opened this issue Jul 30, 2018 · 6 comments

Comments

@adambkaplan
Copy link

Extension Version: 0.1.0
VSCode Version: 1.25.1 (1.25.1)
OS: MacOS 10.13.6 (17G65) "High Sierra"

If a LABEL directive includes multiple key/value names listed on multiple lines, the Dockerfile linter reports "Syntax error - can't find = in " ". Must be of the form: name=value".

Dockerfile

FROM my-image
USER 1001
LABEL "io.k8s.display-name"="my-image-app" \
      "io.openshift.s2i.build.image"="my-image" \
      "io.openshift.s2i.build.source-location"="test/test-app"
...

Reported Error

{
	"resource": "/path/to/my/Dockerfile",
	"owner": "_generated_diagnostic_collection_name_#0",
	"code": "33",
	"severity": 8,
	"message": "Syntax error - can't find = in \"      \". Must be of the form: name=value",
	"source": "dockerfile-utils",
	"startLineNumber": 10,
	"startColumn": 49,
	"endLineNumber": 11,
	"endColumn": 7
}
@rcjsuen
Copy link
Contributor

rcjsuen commented Aug 6, 2018

Hi, @adambkaplan. Thank you very much for your bug report and I apologize for the long delay in responding.

I have confirmed what you have found and it is indeed a bug in the Dockerfile validation code. I have opened rcjsuen/dockerfile-utils#50 to track this. Please do not hesitate to let me know if you find other false positives being flagged.

@StephenWeatherford
Copy link
Contributor

Related to #150?

@rcjsuen
Copy link
Contributor

rcjsuen commented Aug 15, 2018

@StephenWeatherford No, they’re not the same issue.

I’ve fixed this particular issue and will try to spin a new release before the new release of this extension.

@StephenWeatherford
Copy link
Contributor

Great, thanks!

@rcjsuen
Copy link
Contributor

rcjsuen commented Sep 7, 2018

Hi, @adambkaplan. Thank you again for reporting this bug. This should be included in the 0.2.0 release.

Can you confirm this?

@StephenWeatherford
Copy link
Contributor

@adambkaplan I'm going to go ahead and close for now, it should be fixed. Feel free to re-open if not. Thanks.

@vscodebot vscodebot bot locked and limited conversation to collaborators Feb 18, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

3 participants