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

Docker lexer does not work properly for HEALTHCHECK statements #922

Open
1 task done
frapa opened this issue Feb 5, 2024 · 0 comments
Open
1 task done

Docker lexer does not work properly for HEALTHCHECK statements #922

frapa opened this issue Feb 5, 2024 · 0 comments
Labels

Comments

@frapa
Copy link

frapa commented Feb 5, 2024

Is there an existing issue for this?

  • I have searched the existing issues

Describe the bug

Chroma does not seem to properly highlight the HEALTHCHECK statement in dockerfiles

image

This is also demonstrated by the HTML which is not tokenized:

image

Test file to reproduce the issue

FROM golang as build

RUN apt-get install wget curl && \
    wget https://github.com/watchexec/watchexec/releases/download/v1.24.2/watchexec-1.24.2-x86_64-unknown-linux-gnu.deb && \
    dpkg -i watchexec-1.24.2-x86_64-unknown-linux-gnu.deb && \
    rm watchexec-1.24.2-x86_64-unknown-linux-gnu.deb

ENV REPOSITORY_ROOT="/repositories"
ENV TEMPLATE_DIR="/api/templates"
ENV STATIC_DIR="/api/static"


WORKDIR /api/src
RUN mkdir /.cache && chmod 0777 /.cache

HEALTHCHECK --interval=10s --timeout=10s --retries=3 CMD curl http://localhost:3333/sign-in

USER 1234:1234
ENTRYPOINT ["watchexec", "-r", "-w", "/api", "go", "run", "."]

The lexer contains the proper rule, I am not sure why it fails to match. Checking the regex on regex101 also suggest the regex is correct, so I am lost why my highlighting is off.

I am using chroma v2 on go 1.21.

To Reproduce

Here is also the Playground version, which seems a bit odd as well.

@frapa frapa added the bug label Feb 5, 2024
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