MyGit

ocaml-ppx/ocamlformat

Fork: 179 Star: 633 (更新于 2024-11-18 10:47:03)

license: MIT

Language: OCaml .

Auto-formatter for OCaml code

最后发布版本: 0.26.2 ( 2024-04-18 18:07:29)

GitHub网址

ocamlformat

OCaml Code Formatter.

OCaml-CI Build Status

ocamlformat is a code formatter for OCaml. It comes with opinionated default settings but is also fully customizable to suit your coding style.

  • Profiles: ocamlformat offers profiles we predefined formatting configurations. Profiles include default, ocamlformat, janestreet.
  • Configurable: Users can change the formatting profile and configure every option in their .ocamlformat configuration file.
  • Format Comments: ocamlformat can format comments, docstrings, and even code blocks in your comments.
  • RPC: ocamlformat provides an RPC server that can bed used by other tools to easily format OCaml Code.

ocamlformat is part of the OCaml Platform, the recommended set of tools for OCaml.

Getting Started

Installation

To use ocamlformat, you will need OCaml and opam (the OCaml package manager) installed on your system. Visit the OCaml.org installation page for instructions.

With OCaml and opam installed, you can install ocamlformat with:

opam install ocamlformat

Usage

Formatting your code is as easy as running:

ocamlformat file.ml

To configure ocamlformat to your liking, create an .ocamlformat configuration file in your project with settings like:

profile = default
version = 0.26.1

Refer to our documentation or use ocamlformat --help for a full list of configuration options.

To make formatting your code even easier, use the dune build system:

dune fmt

Documentation

The full documentation for ocamlformat, including comprehensive user and API guides, can be found on OCaml.org.

Contributing

Contributing Guide

We wholeheartedly welcome contributors! To start, please read our Contributing Guide to familiarize yourself with our development process, including how to propose and how to start hacking on ocamlformat.

Hacking Guide

In addition to the Contributing Guide, we provide a Hacking Guide for ocamlformat developers. It contains in-depth explanation of development processes, such as running tests, releasing ocamlformat, etc.

Code of Conduct

In order to foster a welcoming and respectful community, ocamlformat has adopted the OCaml Code of Conduct.

Roadmap

Interested in the future of ocamlformat? Take a look at our Roadmap to understand our vision and planned advancements for ocamlformat.

Discussions

For conversations on ongoing development, be sure to visit the ocamlformat section of the OCaml Discuss forum.

License

ocamlformat is distributed under the terms of the MIT License. See the LICENSE file for complete details.

Acknowledgments

We gratefully acknowledge the individuals and organizations that have significantly contributed to ocamlformat.

ocamlformat owes its existance to its initial author, Josh Berdine. We also want to express our appreciation to Hugo Heuzard, Guillaume Petiot, and Jules Aguillon. Their significant contributions have been instrumental to the advancement of ocamlformat.

Moreover, our gratitude extends to Facebook, who fostered the inception of ocamlformat as part of their work on the ReasonML project. Jane Street and Tarides have also provided financial support and contributed to the ongoing development of the project.

最近版本更新:(数据更新于 2024-10-30 15:44:40)

2024-04-18 18:07:29 0.26.2

2023-09-15 17:44:05 0.26.1

2023-07-18 23:34:51 0.26.0

2023-03-07 03:16:04 0.25.1

2023-02-24 17:51:14 0.25.0

2022-07-18 19:57:18 0.24.1

2022-07-12 03:32:55 0.24.0

2022-07-07 16:04:57 0.23.0

2022-05-26 22:29:59 0.22.4

2022-05-26 02:56:18 0.22.3

主题(topics):

ocaml

ocaml-ppx/ocamlformat同语言 OCaml最近更新仓库

2024-09-10 20:49:27 c-cube/ocaml-containers

2024-09-04 16:25:47 mirleft/ocaml-tls

2024-06-29 16:58:29 ocaml/ocamlbuild

2024-06-17 17:04:46 ocaml/dune

2024-05-26 22:10:33 ocsigen/js_of_ocaml

2024-05-13 20:27:08 ocaml/ocaml