chipsalliance / verible-linter-action

Automatic SystemVerilog linting in github actions with the help of Verible
Apache License 2.0
27 stars 13 forks source link

Use Reviewdog Diagnostic Format to post reviews with change suggestions #7

Closed wsipak closed 3 years ago

wsipak commented 3 years ago

We can use --autofix option of Verible to provide change suggestions that can be easily applied on GitHub. However, with errorformat which is currently used to pass information to Reviewdog, this is not possible.

Verible provides output in two formats:

This PR adds a script which merges the information from these two files to provide a JSON-based Reviewdog Diagnostic Format file.

The RDFormat file is then used as input to Reviewdog, which posts code review with change suggestions. Example results can be viewed here: https://github.com/antmicro/gha-playground/pull/47#discussion_r703638460

The feature of autofix can be disabled by setting the suggest_fixes input to false. I've confirmed that the same warnings will be raised but without change suggestions, as expected, here: https://github.com/antmicro/gha-playground/pull/46