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

color code added in hadolint v1.23.0 #44

Closed
yamap55 opened this issue Mar 12, 2021 · 5 comments
Closed

color code added in hadolint v1.23.0 #44

yamap55 opened this issue Mar 12, 2021 · 5 comments

Comments

@yamap55
Copy link

yamap55 commented Mar 12, 2021

hadolint v1.23.0 color option has been added.
Therefore, the color code will be displayed when an error is pointed out.
The --no-color option has been added, so please use it.

image1

https://github.com/hadolint/hadolint/releases/tag/v1.23.0

@EGrunzkeCvg
Copy link

The extra color characters also appear in the Problems Panel

@michaellzc
Copy link
Owner

michaellzc commented Mar 27, 2021

The new version will add a new configuration option hadolint.cliOptions with a default value of ["--no-color"].

In the event of an error when calling hadolint, the fallback strategy is retrying without the --no-color flag. Additionally, it will display a warning message to suggest user looking into this issue.

For future references,

If you are a docker user or you use some custom script as hadolint executable, please modify your script accordingly and remove the --no-color option from the extension configuraion. Below is an example

#!/bin/bash

docker run --rm -i hadolint/hadolint hadolint \
  --no-color \
  - < "$@"

For regular users, please consider upgrading to the latest hadolint or manually remove the default --no-color from the hadolint.cliOptions configuration

@cs-shadowbq
Copy link

make sure the cliOptions are empty as below:

"hadolint.cliOptions": [],

@KTamas
Copy link

KTamas commented Dec 7, 2022

EDIT: solved the issue by moving all my customizations to $HOME/.config/hadolint.yaml instead.


I'm suddenly getting the error

Please visit [ExiaSR/vscode-hadolint#44](https://github.com/ExiaSR/vscode-hadolint/issues/44#issuecomment-808756114). You may be using an outdated version of hadolint or you are running hadolint in Docker```

I am not running an outdated version of hadolint:

$ hadolint --version
Haskell Dockerfile Linter 2.12.0

I have the following settings set:

  "hadolint.cliOptions": ["--no-color", "--ignore DL3008", "--ignore DL3016"],
  "hadolint.hadolintPath": "/opt/homebrew/bin/hadolint"

What am I doing wrong?

@bendem
Copy link

bendem commented Apr 5, 2023

I'm confused
image

> ~/.local/bin/hadolint --version
Haskell Dockerfile Linter 2.12.0

> file ~/.local/bin/hadolint
/home/demarteaub/.local/bin/hadolint: ELF 64-bit LSB executable, x86-64, version 1 (SYSV), statically linked, stripped

I'm using the latest compiled version of hadolint from my system, and I'm getting told I'm not and that I need to change things. What's up?

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

6 participants