Improved errors for invalid yaml files
Today, kube-linter shows the output Warning: no valid objects found. when there is an invalid yaml file.
The error messages could be made more clear. Rather than asking users to use verbose logging kube-linter lint -v pod.yaml we should display errors that showcase what the issue is. I think it would be ideal to have custom error conditions to show users why something is not valid.
Option 1: The file scanned at ./pod.yaml is not a valid yaml file. Please check to ensure the file is in proper yaml format. Option 2: The file scanned is not a valid kubernetes object please run kube-linter lint -v pod.yaml for more details.
Alternatively, we could also point them to run kube-linter lint -v pod.yaml for more details directly in the error.
This is partially solve by #279
As @IAmATeaPot418 mentioned for better UX we should inform user about --fail-on-invalid-resource and -v options and enable fail-on-invalid-resource as default from next major release.
Is there support for --fail-on-invalid-resource in the Github action? Is there a way to enable the setting via config file kube-linter.yaml ?
Indeed it's not exposed in config nor available in the action.