OCamlFormat 0.7

See full changelog
  • Improve: simplify setting option defaults, slight --help improvement (#350, @jberdine)
  • Improve: update emacs mode to use replace-buffer-contents (#345, @hhugo)
  • Improve: add option to not force-break structs (#346, @jberdine)
  • Improve: move 'formatting' options into separate section (#348, @gpetiot)
  • Improve: fun sugar (@hhugo)
  • Improve: add option to omit open lines between one-line module items (#303, @gpetiot)
  • Fix: infix ops (@hhugo)
  • Improve: reformat files with no locations (@hhugo)
  • Improve: better error when max-iters = 1 (@hhugo)
  • Improve: breaking before arrows in pattern match cases (@jberdine)
  • Improve: no parens for trailing 'not' (@hhugo)
  • Improve: missing break hint, fix #331 (@hhugo)
  • Improve: comments before match (#330, @jberdine)
  • Fix: missing comments (@hhugo)
  • Fix: missing attributes due to sugar (@hhugo)
  • Fix: parens non trivial rhs for # infix ops (@hhugo)
  • Improve: let-module-in break before in (#328, @jberdine)
  • Improve: sugar for nestest module_with (@hhugo)
  • Improve: attributes on let bindings (#324, @jberdine)
  • Improve: wrapping of functor args in type declaration (#315, @gpetiot)
  • Fix: comments attachment with infix ops (@hhugo)
  • Fix: comments attachment with Pexp_fun (@hhugo)
  • Fix: docstrings as attributes (@hhugo)
  • Improve: refactor and improve documentation of options (#302, @gpetiot)
  • Improve: error reporting in emacs integration (#304, @jberdine)
  • Improve: pexp_open as final arg of infix op (#314, @jberdine)
  • Fix: missing parens around labeled record pattern arg (@jberdine)
  • Fix: missing attributes (@hhugo)
  • Fix: duplicated (x3) attributes in pexp_letmodule (@hhugo)
  • Improve: allow to locally disable ocamlformat (@hhugo)
  • Improve: corner case indentation of fun -> function (#312, @jberdine)
  • Improve: labeled, optional, and default args (@jberdine)
  • Improve: punning default arg with type constraint (@jberdine)
  • Improve: add options to controls various spaces (#284, @hhugo)
  • Improve: add option to disable wrapping fun args (#283, @hhugo)
  • Improve: add option --break-cases to break each pattern-matching case (#251, @gpetiot)
  • Improve: rename --nested-parens option (@hhugo)
  • Improve: ws before colon for constraint (#293, @hhugo)
  • Improve: option to choose where to parens nested match (@hhugo)
  • Improve: always parens nested match (even the right most one) (@hhugo)
  • Improve: always break for let_and contruct (@hhugo)
  • Fix: missing comments (@hhugo)
  • Improve: Add option to preserve style of local module open (#267, @gpetiot)
  • Improve: preserve extension point formatting (@hhugo)
  • Improve: make double semi consistent between implementation and use_file (#292, @hhugo)
  • Improve: configure ocamlformat using attributes (@hhugo)
  • Improve: extension point (@hhugo)
  • Improve: break in type declaration for variant and record (#280, @hhugo)
  • Fix: memory leak (@hhugo)
  • Test: add ocaml compiler to test suite, and improve make -C test (@jberdine)
  • Fix: unary operator +/- (@hhugo)
  • Fix: doc comments in class (@hhugo)
  • Fix: ocaml bug, sort fields (@hhugo)
  • Improve: empty mod with comments (@hhugo)
  • Improve: disable warning generated by the lexer in quiet mode (@hhugo)
  • Fix: record update (@hhugo)
  • Fix: rec let binding and attribute (@hhugo)
  • Fix: punning (@hhugo)
  • Fix: let open and constraint (@hhugo)
  • Fix: not extension sugar when attribute (@hhugo)
  • Fix: no-comment-check missing case (@hhugo)
  • Fix: string literal (@hhugo)
  • Fix: format of infix in presence of %; (@hhugo)
  • Fix: let binding and type annot (@hhugo)
  • Fix: binding when lhs is an extension (@hhugo)
  • Fix: pat constraint in payload (@hhugo)
  • Fix: let rec with extension (@hhugo)
  • Fix: comments (@hhugo)
  • Fix: comments in fmt_case (@hhugo)
  • Fix: comments around Longident (@hhugo)
  • Fix: missing comment for pmty_with (@hhugo)
  • Improve: add option to disambiguate infix precedence with parens (@jberdine)
  • Improve: not when infix op arg (@jberdine)
  • Improve: add a flag to skip all checks about comments (@hhugo)
  • Improve: breaking of module ident/unpack/extension exps (#269, @jberdine)
  • Fix: literal sub-exps with attributes (@jberdine)
  • Fix: many fixes regarding attributes (@hhugo)
  • Improve: preserve formatting of block comments (#255, @hhugo)
  • Improve: breaking of applications with long literal list args (#258, @jberdine)
  • Fix: sugar functor (@hhugo)
  • Fix: type alias in variant (@hhugo)
  • Improve: formatting of comments (@jberdine)
  • Fix: prefix operators (@hhugo)
  • Fix: exception declarations (@hhugo)
  • Fix: doc comments in structure (#250, @hhugo)
  • Fix: add parens around pat with trailing attr (@hhugo)
  • Fix: let binding and Ppat_or (@hhugo)
  • Fix: be more permissive with pattern (@hhugo)
  • Fix: fix string_literal with when its location includes its attribute (#244, @hhugo)
  • Improve: improve errors returned to the user. (#243, @hhugo)
  • Fix: missing comments for Pexp_construct (#240, @hhugo)
  • Fix: multiple fixes around classes (#242, @hhugo)
  • Fix: comments in empty () and [] (#241, @hhugo)
  • Fix: support empty variant (#239, @hhugo)
  • Fix: add missing attribute (#238, @hhugo)
  • Fix: be more permissive with ppat_interval (#237, @hhugo)
  • Improve: remove trailing ws (#210, @hhugo)
  • Improve: attributes on type declarations (#232, @jberdine)
  • Improve: breaking of infix Array and String get and set ops (#233, @jberdine)
  • Fix: attributes and doc comments (#221, @hhugo)
  • Improve: spacing of module unpack (#230, @jberdine)
  • Improve: no parent for new (@hhugo)
  • Fix: Revert: Improve: remove redundant parens around application operators (@hhugo)
  • Improve: array alignment (#226, @hhugo)
  • Improve: nested array infix ops (#225, @hhugo)
  • Fix: is_adjacent and remove [~inclusive] from [Source.string_between] (@hhugo)
  • Fix: Cmts.CmtSet.split (@hhugo)
  • Improve: Allow comments inside empty delimited "things" (#223, @hhugo)
  • Fix: Source.ends_line (#222, @hhugo)
  • Improve: empty struct and sig (#217, @hhugo)
  • Improve: support for toplevel files (#218, @hhugo)
  • Fix: string literal, fix #214 (#219, @hhugo)
  • Improve: more tuning for functors (@hhugo)
  • Improve: sugar for functor type with multiple args (@hhugo)
  • Improve: sugar for functors with multiple args (@hhugo)
  • Improve: module type with (@hhugo)
  • Improve: break before with/and type (@hhugo)
  • Improve: break between fun args (@hhugo)
  • Improve: module unpacking (#215, @hhugo)
  • Improve: for & while loops (#211, @hhugo)
  • Fix: attributes on ite (#209, @hhugo)
  • Fix: partially applied (+) and (-) (#208, @hhugo)
  • Fix: polymorphic variant (#202, @hhugo)
  • Fix: parens with lazy pat (fix #199) (#201, @hhugo)
  • Improve: omit excess indentation of function cases (@jberdine)
  • Improve: extensions with payloads of multiple structure items (@jberdine)
  • Improve: parenthesization and attribute placement of if-then-else (@jberdine)
  • Fix: do not attach comments to docstrings (@jberdine)
  • Fix: short syntax for extensions (#193, @hhugo)
  • Fix: missing attrs for pcl_fun (@hhugo)
  • Fix: pos of attribute for functors (@hhugo)
  • Fix: () module only if not attrs (@hhugo)
  • Fix: missing attrs for object (@hhugo)
  • Fix: no short form of extension with attribs (@hhugo)
  • Fix: normalization for Pexp_poly and Pexp_constraint (#190, @hhugo)
  • Fix: some parenthesization context checks (#189, @hhugo)
  • Fix: attributes on fun expressions (@jberdine)
  • Fix: extensions with multiple module-level eval expressions (#185, @jberdine)
  • Fix: functor & apply (#182, @hhugo)
  • Fix: module rec with (@hhugo)
  • Fix: more parens in pat_constraint (@hhugo)
  • Improve: tuple & constraint (@hhugo)
  • Improve: empty module (#178, @hhugo)
  • Fix: extensible variant (#177, @hhugo)
  • Fix: index operator (#176, @hhugo)
  • Improve: empty module sig (@hhugo)
  • Fix: add attributes to module signature (@hhugo)
  • Add: support for objects and classes (#173, @hhugo)
  • Improve: remove some redundant parens around tuple types (@jberdine)
  • Fix: args in let bindings (@hhugo)
  • Improve: let module%ext (@hhugo)
  • Fix: infix op in alias (@hhugo)
  • Fix: extensions pat (@hhugo)
  • Fix: limit use of short syntax for extensions (@hhugo)
  • Improve: allow break after Psig_include (@jberdine)
  • Fix: { (a; b) with a; b } (@hhugo)
  • Fix: with type [longident] (@hhugo)
  • Fix: attributes on polymorphic variants (@hhugo)
  • Fix: attribute in let bindings (@hhugo)
  • Fix: private in extensible variant (@hhugo)
  • Fix: gadt in extensible variant (@hhugo)
  • Fix: missing parens in list pattern (@hhugo)
  • Improve: format [new e] like an apply (@hhugo)
  • Fix: parens for constraint (@hhugo)
  • Fix: avoid emitting >] which is an unparsable keyword (#171, @hhugo)
  • Fix: misplaced comments on module type of (@jberdine)