AvaPL / scalafmt-native-formatter

An action which uses scalafmt-native to check code formatting.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

scalafmt-native-formatter

An action which uses scalafmt-native to check code formatting. By default it automatically picks up your scalafmt version from .scalafmt.conf file and runs scalafmt --list on your repository. scalafmt-native is used for fast startup and improved performance by avoiding JVM. If you have a job for scalafmt check only it is significantly faster than any sbt plugin.

Inspired by openlawteam/scalafmt-ci

Usage

name: scalafmt
on: [push]

jobs:
  scalafmt-native-formatter:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v2
      - name: Checking the code with scalafmt
        uses: AvaPL/scalafmt-native-formatter@v0
        with:
          conf-path: path/to/.scalafmt.conf
          args: "--exclude i/am/excluded/Bad.scala --list"

There are two action arguments available:

  • (optional) conf-path - path to .scalafmt.conf (default: .scalafmt.conf at the root of your repository)
  • (optional) args - arguments passed to scalafmt-native (default: "--list")

Contributing

The action is in really early stage of development. If you want to report an issue or add a new functionality feel free to do so.

About

An action which uses scalafmt-native to check code formatting.

License:MIT License


Languages

Language:Scala 100.0%