frenck/action-yamllint

Support --format parameter

Closed this issue · 9 comments

The default yamllint supports the --format parameter, since you can call it from the command line.

This action does not allow to overwrite the default. The current setting is hardcoded as --format github.

Use case: Currently this doesn't show filenames and line numbers (I reported an issue), so I'd like to switch to --format standard for now.

I don't get that?

As in, it runs as an action, on GitHub, hence the format is GitHub. The output is annotated (including file and line). The annotation works.

You should have a look at this issue:

adrienverge/yamllint#357

Both your action and the github default don't show filenames and line numbers.

You can have a look at my runs over here:

https://github.com/metbril/home-assistant-config/runs/1770191545

That is a result of how GitHub Actions works. You are barking up to the wrong trees there. Your request should be at GitHub.

I'm not barking at anyone. I'm just trying to find a way to see which files cause errors. The yamllint does support it from the command line for github format and standard format works with github actions.

Are you suggesting that Github strips filename and line number from the raw output?

I'm not barking at anyone.

Its a figure of speech, and in no way an attack.

I'm just trying to find a way to see which files cause errors.

See annotation it made after the run. It contains will even show it inline in code and as a results summary of the action run.

Are you suggesting that Github strips filename and line number from the raw output?

Yes.

I really appreciate your responsiveness 👍

I'm just trying to find a way to see which files cause errors.

See annotation it made after the run. It contains will even show it inline in code and as a results summary of the action run.

I'm not sure if I understand you correctly, but I can see the coloured output of the action as 1 long list of errors and warnings without any reference to a specific file. Is that the only thing that's provided by github or am I completely missing something and should I look elsewhere?

Schermafbeelding 2021-01-26 om 22 05 38

You are looking at the run details. If you look at the raw log, you can see the original output.

Additional, look at your run summary (with the graph/overview of everything that ran). All annotations are summarized at the bottom.

image

Or from your own repo:

image

https://github.com/metbril/home-assistant-config/actions/runs/512498140

🤦

I feel such a n00b. I didn't scroll down far enough and completely missed the Annotations section. Filenames and line numbers show there.

Thanks again, Frenck.

Don't worry! Everybody needs to learn at some point, right?

Nevertheless, I do agree with you on the fact that GitHub should just show the original message (and stop trying to be smart there).