Closed jgstew closed 3 years ago
Seems like I need the argument -f parsable
from here: https://yamllint.readthedocs.io/en/stable/quickstart.html#running-yamllint
Seems like parsable
can't be specified in a config file: https://github.com/adrienverge/yamllint/issues/266
It does seem like there should be a way to get this without parsable
as well.
Seems like this might be a bug in the output format not being set as github
properly here:
Specifically here:
elif args_format == 'github' or (args_format == 'auto' and
'GITHUB_ACTIONS' in os.environ and
'GITHUB_WORKFLOW' in os.environ):
Seems like maybe it should be:
elif args_format == 'github' or (args_format == 'auto' and
('GITHUB_ACTIONS' in os.environ or
'GITHUB_WORKFLOW' in os.environ)):
but that is just a guess on my part.
Original commit was here: https://github.com/adrienverge/yamllint/commit/67cb4eb24db7998e67c7ec478c2ac166c35e4a24
Seems like a fix would be to use a more generic GitHub action and add the command arg manually as outlined here:
https://github.com/adrienverge/yamllint/blob/master/docs/integration.rst
I now see that "github" should be the default format and it is configurable here: https://github.com/ibiqlik/action-yamllint/blob/master/action.yml#L16
@jgstew Sorry for late reply, notification overflow.
As you found out yourself you can set your desired output format in the action
- uses: ibiqlik/action-yamllint@v3
with:
format: parsable
my main preference for parsable
was that the output format of github
seems like it wasn't being selected automatically, and even when I specified it, I wasn't getting file paths in the yamllint output, so it was hard to tell what files the lint output was referring to.
I did eventually figure out how to force parsable
but I'm still confused why github
wasn't working for me.
I'd consider this "closed" as far as I'm concerned because I'm fine with the parsable
output personally.
I find the github
not an optimal output, it's mostly useful on a pull request where the warnings/errors are clearly visible in the diff section right on the file that has problems. But, just by looking at the workflow run then there's no way to know which file/line has the issue.
I agree, the github
format was useless to me in the workflow output, which was very annoying. I switched to parsable
and I'm happy.
The errors and warnings output in the GitHub Action don't show which file path they are for, but I have 4 different YAML files in my repo. Is there a way to configure this?
My config: https://github.com/jgstew/jgstew-recipes/blob/main/.github/workflows/yamllint.yaml
Example output with warnings / errors but no paths: https://github.com/jgstew/jgstew-recipes/actions/runs/636513923