这是indexloc提供的服务,不要输入任何密码
Skip to content

oxcaml/ocamlformat

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Build Status

🎨 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.25.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.

About

Auto-formatter for OCaml code

Resources

License

Code of conduct

Contributing

Stars

Watchers

Forks

Packages

No packages published

Languages

  • OCaml 81.0%
  • Pawn 17.4%
  • Emacs Lisp 0.5%
  • NASL 0.5%
  • Shell 0.3%
  • Dune 0.2%
  • Makefile 0.1%