An open API service indexing awesome lists of open source software.

https://github.com/stringbean/scalafmt-report


https://github.com/stringbean/scalafmt-report

Last synced: about 1 year ago
JSON representation

Awesome Lists containing this project

README

          

# scalafmt-report

Takes the errors generated by [scalafmt](https://scalameta.org/scalafmt/) when run in diff mode and converts it into a
format that can be parsed by [Github Actions](https://docs.github.com/en/actions).

This tool is used by [scalafmt-action](https://github.com/stringbean/scalafmt-action) to provide a full scalafmt
solution for Github Actions.

## Usage

Call `scalafmt-report` with the filename of the errors from scalafmt and the base path of the source code:

```sh
scalafmt-report
```

The errors will then be outputted as Github Actions [error messages](https://docs.github.com/en/actions/reference/workflow-commands-for-github-actions#setting-an-error-message):

```text
::error file=src/main/scala/com/example/Main.scala,line=83::Incorrectly formatted line(s)
::error file=src/main/scala/com/example/service/WidgetService.scala,line=15::Incorrectly formatted line(s)
```