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

False positive flagged for quotes in ENV and LABEL instructions #50

Closed
rcjsuen opened this issue Aug 6, 2018 · 1 comment
Closed

False positive flagged for quotes in ENV and LABEL instructions #50

rcjsuen opened this issue Aug 6, 2018 · 1 comment
Assignees
Labels

Comments

@rcjsuen
Copy link
Owner

rcjsuen commented Aug 6, 2018

If a LABEL instruction uses quotes for its values, we seem to be flagging it as an error even though it builds just fine. Perhaps this was caused by the fix for #40?

FROM scratch
LABEL "a"="b" \
    "c"="d" \
    "e"="f"
$ docker build .
Sending build context to Docker daemon  1.774MB
Step 1/2 : FROM scratch
 --->
Step 2/2 : LABEL "a"="b"     "c"="d"     "e"="f"
 ---> Running in 9b71e47cfa13
Removing intermediate container 9b71e47cfa13
 ---> 7b64e135ec7f
Successfully built 7b64e135ec7f

The line numbers in the error also seem weird...

$ dockerfile-utils lint Dockerfile
Line: 4-3
Error: Syntax error - can't find = in "    ". Must be of the form: name=value

Line: 4
    "c"="d" \
       ^^^^
Error: LABEL names can not be blank

Line: 5-4
Error: Syntax error - can't find = in "    ". Must be of the form: name=value

Line: 5
    "e"="f"
       ^^^^
Error: LABEL names can not be blank
@rcjsuen
Copy link
Owner Author

rcjsuen commented Aug 7, 2018

This is probably related and/or caused by rcjsuen/dockerfile-ast#45.

@rcjsuen rcjsuen changed the title False positive flagged for quotes in a LABEL instruction False positive flagged for quotes in ENV and LABEL instructions Aug 11, 2018
@rcjsuen rcjsuen self-assigned this Aug 12, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant