pre-commit
pre-commit copied to clipboard
helmlint always passed
Describe the bug helmlint doesn't really lint
the folder structure looks like
tree test-hook
test-hook
└── test
├── Chart.yaml
├── charts
├── templates
│ ├── NOTES.txt
│ ├── _helpers.tpl
│ ├── deployment.yaml
│ ├── hpa.yaml
│ ├── ingress.yaml
│ ├── service.yaml
│ ├── serviceaccount.yaml
│ └── tests
│ └── test-connection.yaml
└── values.yaml
4 directories, 10 files
To Reproduce Steps to reproduce the behavior including the relevant Terraform/Terragrunt/Packer version number and any code snippets and module inputs you used.
a default helm lint test
run looks like
helm lint test
==> Linting test
[INFO] Chart.yaml: icon is recommended
[ERROR] values.yaml: unable to parse YAML: error converting YAML to JSON: yaml: line 79: did not find expected key
[ERROR] templates/: cannot load values.yaml: error converting YAML to JSON: yaml: line 79: did not find expected key
[ERROR] : unable to load chart
cannot load values.yaml: error converting YAML to JSON: yaml: line 79: did not find expected key
Error: 1 chart(s) linted, 1 chart(s) failed
But the pre-commit run looks like
pre-commit run --all-files
helmlint.................................................................Passed
here is the pre-commit config
repos:
- repo: https://github.com/gruntwork-io/pre-commit
rev: v0.1.17 # Get the latest from: https://github.com/gruntwork-io/pre-commit/releases
hooks:
- id: helmlint
Expected behavior The helmlint should give the same result as helm lint
Additional context Add any other context about the problem here.
pre-commit run --all-files -verbose
shows this
.cache/pre-commit/repoz_8jwzgx/hooks/helmlint.sh: line 68: realpath: command not found
After installing the package the problem is resolved, the getting started doc should add this as a dependency.
brew install coreutils
+1 on this issue, would be helpful to document this