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

Allow trailing whitespace in ignore comments #997

Open
2 of 3 tasks
PeterStolz opened this issue Jan 30, 2024 · 0 comments
Open
2 of 3 tasks

Allow trailing whitespace in ignore comments #997

PeterStolz opened this issue Jan 30, 2024 · 0 comments

Comments

@PeterStolz
Copy link

  • This is a bug report
  • This is a feature request
  • I searched existing issues before opening this one

Expected behavior

Not sure if this is a bug, so I opened as a feature request. I would expect the ignore rules to strip/ignore trailing whitespaces.

Actual behavior

# hadolint ignore=DL3029 ignores the rules whereas # hadolint ignore=DL3029 does not.
I know there is no particular reason to have a trailing whitespace at the end of a comment, but it took me a bit to figure it out.

Steps to reproduce the behavior

Run hadolint on this dockerfile

FROM busybox
# hadoling ignore=DL3003
RUN cd /
# hadoling ignore=DL3003 
RUN cd /

In my opinion there should be 2 DL3003 warnings, but there is only one.

Output of hadolint --version or
docker run --rm hadolint/hadolint hadolint --version or
docker run --rm ghcr.io/hadolint/hadolint hadolint --version:

Haskell Dockerfile Linter 2.12.0

Dockerfile (if relevant)
see above

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant