https://github.com/stringbean/scalafmt-report
https://github.com/stringbean/scalafmt-report
Last synced: about 1 year ago
JSON representation
- Host: GitHub
- URL: https://github.com/stringbean/scalafmt-report
- Owner: stringbean
- Created: 2021-02-20T21:07:41.000Z (about 5 years ago)
- Default Branch: main
- Last Pushed: 2021-03-23T13:20:16.000Z (almost 5 years ago)
- Last Synced: 2025-01-10T05:16:55.214Z (about 1 year ago)
- Language: Scala
- Size: 9.77 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
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)
```