Skip to content

Scalafmt Action

Actions
Format Scala code using scalafmt
v2.0.2
Latest
Star (12)

Tags

 (1)

Scalafmt GitHub Action

Runs scalafmt --list on your repository automatically with every push.

Uses scalafmt-native under the hood to keep things small and booting super quick by avoiding the JVM. 🐎

Usage

Simply add a step such as the following to your your workflow yml file:

- name: Check for scalafmt conformance
  uses: openlawteam/scalafmt-ci@v2

Example in the full context of a workflow file, with some optional arguments:

name: Check scalafmt on push
on: [push]

jobs:
  scalafmt-lint:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v1
        with:
          fetch-depth: 1
      - name: Checking your code to see if u r naughty or nice
        uses: openlawteam/scalafmt-ci@v2
        with:
          args: "--exclude=third_party --list"

Installing with GitHub Marketplace

https://github.com/marketplace/actions/scalafmt-action

(Legacy) HCL Syntax

If you are still using legacy HCL format (from the GitHub Actions Alpha test), you will need to pin to a previous version of this action.

action "lint" {
  uses="openlawteam/scalafmt-ci@v0"
  # optional additional args
  args="--exclude ./vendor"
}

Scalafmt Action is not certified by GitHub. It is provided by a third-party and is governed by separate terms of service, privacy policy, and support documentation.

About

Format Scala code using scalafmt
v2.0.2
Latest

Tags

 (1)

Scalafmt Action is not certified by GitHub. It is provided by a third-party and is governed by separate terms of service, privacy policy, and support documentation.