You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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 patterns that are used to find source files to format. It
is possible to specify several patterns by putting each on a new
line (notice no quotes around the globs).
respect-cabal-files Whether to try to locate Cabal files and take into
account their default-extensions and default-language settings
(default: true).
follow-symbolic-links Whether to follow symbolic links (default: true).
mode Specifies whether to simply "check" files for formatting, or
modify the files "inplace".
extra-args Extra arguments to pass to Ormolu.
version The version number of Ormolu to use. Defaults to "latest".
Windows
If you are running a workflow on Windows, be wary of Git's
core.autocrlf. Ormolu always converts CRLF endings to
LF endings which may result in spurious diffs, so you probably want to
disable core.autocrlf:
$ git config --global core.autocrlf false
Example usage
In the simple case all you need to do is to add this step to your job:
- uses: haskell-actions/run-ormolu@v17
However, if you are using a matrix, then it is more efficient to have a
separate job for checking of formatting: