rhysd / actionlint

:octocat: Static checker for GitHub Actions workflow files
https://rhysd.github.io/actionlint/
MIT License
2.8k stars 155 forks source link

Message format for GitHub Actions #20

Closed ybiquitous closed 3 years ago

ybiquitous commented 3 years ago

Hi, thank you so much for creating this nice tool! 😄

When I tried running actionlint on GitHub Actions, It took some time to set up. Here is my setup code:

https://gist.github.com/ybiquitous/c72834b30882d3c1f9c105683d4c1137

I use Problem Matcher in the setup code, but I doubt it difficult for many users to use Problem Matcher.

If actionlint could output messages with the ::warning or ::error format of Actions, it might be easier to set up. (But, for the purpose, severities may be needed...)

For example:

$ actionlint -format github
::error file=.github/workflows/test.yml,line=10,col=15::Something went wrong

What do you think about this idea?

rhysd commented 3 years ago

How about using reviewdog? It has support for actionlint. Perhaps proposing actionlint support to super-linter might be another option.

ybiquitous commented 3 years ago

Yes, reviewdog or super-linter is good another option!

But, I think it is useful to also provide a straightforward way when getting starting with actionlint, because users would not need to learn more about other integrations like reviewdog.

rhysd commented 3 years ago

I understood. I'm considering if we can make this feature a bit more generic.

It might be better to provide functionality to specify the output format by Go template notation so that users can specify output format freely. And we would be able to provide an example configuration for GitHub Actions workflow using the template.

ybiquitous commented 3 years ago

It might be better to provide functionality to specify the output format by Go template notation

It's like the --format option of the docker command. It sounds like a nice idea to me! 👍🏼

rhysd commented 3 years ago

Sounds nice. I'll check the docker's option before designing this feature.

ybiquitous commented 3 years ago

@rhysd Great work! Thank you so much! 😊 👏🏼

rhysd commented 3 years ago

This feature was released at v1.6.0.