package ocamlformat
Install
Dune Dependency
Authors
Maintainers
Sources
sha256=031494ab770cef10a8f6aa1cbeb5660e46c3aa6c0cd457b110fec859a75e877d
sha512=35c0131f04c2c8ceb94f0f400e4b56690405ddebb482aec0c9962163001d9fd5b593455df08b508394949f2740ba28f1714dff9e1f17b618bdec62fd26fae281
Description
OCamlFormat is a tool to automatically format OCaml code in a uniform style.
Published: 20 Jul 2023
README
README.md
๐จ ocamlformat
ocamlformat is a tool for formatting OCaml code. It automatically adjusts the layout of your code to follow the recommended style guidelines, making it easier to read and understand.
๐ Installation
To use ocamlformat, you will need to have OCaml and opam (the OCaml package manager) installed on your system.
Once you have these dependencies, installation is a breeze! Just run the following command:
opam install ocamlformat
๐ป Usage
Formatting your code with ocamlformat is super simple! Just run the following command:
ocamlformat file.ml
You can also specify a configuration file to customize the formatting behavior of ocamlformat. To set up your project to use the default profile and the ocamlformat version you installed let's create a configuration file named .ocamlformat
containing:
profile = default
version = 0.26.0
For more information on configuration options, check out the documentation or run ocamlformat --help
.
The most convenient way to format your code is through the dune
build system. Just run the following command:
dune fmt
๐ค Contributing
We welcome contributions to ocamlformat! If you find a bug or want to suggest a feature, please open an issue on the GitHub repository. If you want to contribute code, please follow the contributing guidelines and open a pull request.
๐ License
ocamlformat is released under the MIT License.
Dependencies (4)
-
re
>= "1.10.3"
-
ocamlformat-lib
= version
-
dune
>= "2.8"
-
ocaml
>= "4.08" & < "5.2"
Dev Dependencies (3)
-
odoc
with-doc
-
ocamlformat-rpc-lib
with-test & = version
-
cmdliner
with-test = "false" & >= "1.1.0" | with-test & >= "1.2.0"
Used by (63)
- ask
- ask-integrator
- autofonce
- autofonce_config
- autofonce_core
- autofonce_lib
- autofonce_m4
- autofonce_misc
- autofonce_patch
- autofonce_share
- awsm-codegen
-
bastet
< "2.0.0"
- bitpack_serializer
-
catala
>= "0.9.0"
- diff
-
diskuvbox
< "0.1.2"
- drom
- drom_lib
- drom_toml
- dump_ocamlformat
-
ez_cmdliner
>= "0.2.0"
-
ez_config
>= "0.2.0"
-
ez_file
>= "0.2.0"
-
ez_hash
< "0.5.3"
- ez_opam_file
- ez_search
- ez_subst
- fromager
-
guardian
< "0.1.0"
- header-check
-
js_of_ocaml-webgpu
>= "0.2"
-
letters
>= "0.2.0" & != "0.3.1"
- melange-fest
-
melange-json
>= "1.2.0"
-
melange-radix-icons
>= "0.1.0"
- mlx
- module-graph
-
noCanren
>= "0.3.0~alpha1"
-
OCanren-ppx
= "0.3.0~alpha1"
-
ocaml-lsp-server
< "1.8.0"
- ocp-search
-
ocplib_stuff
>= "0.3.0"
-
opam-bin
>= "0.9.5"
-
opam_bin_lib
>= "0.9.5"
-
owi
>= "0.2"
- polars
- polars_async
- ppx_deriving_jsonschema
-
psmt2-frontend
>= "0.3.0"
-
rea
< "0.2.0"
- red-black-tree
-
scaml
>= "1.2.0"
-
sihl
< "0.1.0"
- solidity-alcotest
- solidity-common
- solidity-parser
- solidity-test
- solidity-typechecker
-
spotify_ml
>= "push"
- styled-ppx
- tabr
-
yocaml
>= "2.0.0"
- zanuda
Conflicts
None