Skip to content
You're viewing an older version of this GitHub Action. Do you want to see the latest version instead?
play

GitHub Action

run-ormolu

v3

run-ormolu

play

run-ormolu

Check formatting of Haskell code with Ormolu

Installation

Copy and paste the following snippet into your .yml file.

              

- name: run-ormolu

uses: haskell-actions/run-ormolu@v3

Learn more about this action in haskell-actions/run-ormolu

Choose a version

Ormolu action

CI

This is Ormolu action that helps to ensure that your Haskell project is formatted with Ormolu. The action tries to find all Haskell source code files in your repository and fails if any of them is not formatted. In case of failure it prints the diff between the actual contents of the file and its formatted version.

Inputs

  • pattern Glob pattern that are used to find source files to format. It is possible to specify several patterns by putting each on a new line.
  • follow-symbolic-links Whether to follow symbolic links.
  • extra-args Extra arguments to pass to Ormolu.

Example usage

In the simple case all you need to do is to add this step to your job:

- uses: mrkkrp/ormolu-action@v3

However, if you are using a matrix, then it is more efficient to have a separate job for checking of formatting:

jobs:
  ormolu:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v2
      - uses: mrkkrp/ormolu-action@v3
  build:
    runs-on: ubuntu-latest
    needs: ormolu
    ...

Here, the build job depends on ormolu and will not run unless ormolu passes.