package fromager
A CLI to format an ocaml codebase
Install
Dune Dependency
Authors
Maintainers
Sources
fromager-0.4.0.tbz
sha256=267f2a741cb068ddbf23de9f7f288fa24d42a6a4870acf0b0f26653da50e6abe
sha512=081d50123ae2459fa70904db00c62e04e0bc464e4b2c9b781cd3f5862f09ed0af5954ecc42418da2b9aff8d0e407b20e608e16b38c8081997f5342109e2a83a6
Description
Published: 12 Jun 2021
README
Fromager
Fromager helps you format your codebase.
Installation & Usage
If you have Opam, the package manager of OCaml, simply do:
$ opam install fromager
$ fromager
It's that simple! You don't even need an .ocamlformat
file.
Configuring Fromager
By default, fromager ignores any directory starting with an underscore (e.g. _opam
) or with a dot (e.g. .git
).
You can optionally create a fromage.toml
file at the root of your project:
[config]
ocamlformat_version = "0.18.0"
ignored_files = []
ignored_dirs = [ "./some", "./ignored/directories" ]
Enforce formatting in CI by adding a Fromager Github action
name: Run Fromager
on:
[pull_request]
jobs:
run_fromager:
strategy:
fail-fast: false
matrix:
os:
- macos-latest
- ubuntu-latest
ocaml-version:
- 4.07.1
runs-on: ${{ matrix.os }}
steps:
- name: Get code
uses: actions/checkout@v2
- name: Use OCaml ${{ matrix.ocaml-version }}
uses: avsm/setup-ocaml@v1
with:
ocaml-version: ${{ matrix.ocaml-version }}
- name: Build
run: |
eval $(opam env)
opam pin add . -y
- name: Format
run: |
eval $(opam env)
opam install fromager
fromager
git diff
Dependencies (5)
- ocamlformat
-
core
>= "v0.12.4" & < "v0.15"
-
toml
>= "7.0"
-
dune
>= "2.8"
-
ocaml
>= "4.07"
Dev Dependencies
None
Used by
None
Conflicts
None
sectionYPositions = computeSectionYPositions($el), 10)"
x-init="setTimeout(() => sectionYPositions = computeSectionYPositions($el), 10)"
>
On This Page