Skip to content

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

License

Notifications You must be signed in to change notification settings

AvaPL/scalafmt-native-formatter

Use this GitHub action with your project
Add this Action to an existing workflow or create a new one
View on Marketplace

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

23 Commits
 
 
 
 
 
 
 
 

Repository files navigation

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.

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages