Skip to content

Commit e1d4aad

Browse files
jberdinefacebook-github-bot
authored andcommitted
[ocamlformat] upgrade ocamlformat to 0.8
Reviewed By: mbouaziz Differential Revision: D10359577 fbshipit-source-id: e7f5286e3
1 parent 9eecd1b commit e1d4aad

30 files changed

Lines changed: 171 additions & 30 deletions

.ocamlformat

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
let-binding-spacing = sparse
12
break-cases = nested
23
margin = 100
3-
version = 0.7
4+
version = 0.8

.ocamlformat.hash

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
b3ed72b3997cb7712e54f90d47128d6dd8e18f53
1+
e2cf2fd21fdc2f79840ddf994403a0c2469b6bfd

Makefile

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -684,7 +684,7 @@ endif
684684
# This is a magical version number that doesn't reinstall the world when added on top of what we
685685
# have in opam.lock. To upgrade this version number, manually try to install several utop versions
686686
# until you find one that doesn't recompile the world. TODO(t20828442): get rid of magic
687-
OPAM_DEV_DEPS = ocamlformat.$$(grep version .ocamlformat | cut -d ' ' -f 3) ocp-indent merlin utop.2.2.0 webbrowser
687+
OPAM_DEV_DEPS = ocp-indent merlin utop.2.2.0 webbrowser
688688

689689
ifneq ($(EMACS),no)
690690
OPAM_DEV_DEPS += tuareg
@@ -697,6 +697,8 @@ devsetup: Makefile.autoconf
697697
OPAMSWITCH=$(OPAMSWITCH); $(OPAM) install --yes --no-checksum user-setup $(OPAM_DEV_DEPS))
698698
$(QUIET)echo '$(TERM_INFO)*** Running `opam config setup -a`$(TERM_RESET)' >&2
699699
$(QUIET)OPAMSWITCH=$(OPAMSWITCH); $(OPAM) config --yes setup -a
700+
$(QUIET)$(call silent_on_success,installing ocamlformat,\
701+
OPAMSWITCH=$(OPAMSWITCH); $(OPAM) pin add --yes ocamlformat.$$(grep version .ocamlformat | cut -d ' ' -f 3) https://github.com/ocaml-ppx/ocamlformat.git#$$(grep version .ocamlformat | cut -d ' ' -f 3)-opam1)
700702
$(QUIET)echo '$(TERM_INFO)*** Running `opam user-setup`$(TERM_RESET)' >&2
701703
$(QUIET)OPAMSWITCH=$(OPAMSWITCH); OPAMYES=1; $(OPAM) user-setup install
702704
$(QUIET)if [ "$(PLATFORM)" = "Darwin" ] && [ x"$(GNU_SED)" = x"no" ]; then \

infer/src/IR/HilExp.ml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -210,6 +210,7 @@ let rec eval_arithmetic_binop op e1 e2 =
210210
| _ ->
211211
None
212212

213+
213214
and eval = function
214215
| Constant c ->
215216
Some c

infer/src/base/Config.ml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1187,9 +1187,9 @@ and () =
11871187
"Do not show reports coming from this type of issue. Each checker can report a range of \
11881188
issue types. This option provides fine-grained filtering over which types of issue should \
11891189
be reported once the checkers have run. In particular, note that disabling issue types \
1190-
does not make the corresponding checker not run.\n \
1191-
By default, the following issue types are disabled: %s.\n\n \
1192-
See also $(b,--report-issue-type).\n"
1190+
does not make the corresponding checker not run.\n\
1191+
\ By default, the following issue types are disabled: %s.\n\n\
1192+
\ See also $(b,--report-issue-type).\n"
11931193
(String.concat ~sep:", " disabled_issues_ids)) ;
11941194
mk true ~long:"enable-issue-type"
11951195
~deprecated:["enable_checks"; "-enable-checks"]

infer/src/base/Die.mli

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,9 +7,10 @@
77

88
open! IStd
99

10-
(* WARNING: ONLY USE IF Logging IS NOT AVAILABLE TO YOU FOR SOME REASON (e.g., inside Config). *)
11-
12-
exception InferExternalError of string
10+
exception
11+
(* WARNING: ONLY USE IF Logging IS NOT AVAILABLE TO YOU FOR SOME REASON (e.g., inside Config). *)
12+
InferExternalError of
13+
string
1314

1415
exception InferInternalError of string
1516

infer/src/base/RunState.ml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -45,8 +45,8 @@ let load_and_validate () =
4545
Error
4646
(Printf.sprintf
4747
"'%s' already exists but it is not an empty directory and it does not look like an \
48-
infer results directory:\n \
49-
%s\n\
48+
infer results directory:\n\
49+
\ %s\n\
5050
Was it created using an older version of infer?"
5151
Config.results_dir err_msg) )
5252
msg

infer/src/biabduction/Rearrange.mli

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,9 +10,8 @@ open! IStd
1010

1111
(** Re-arrangement and extension of structures with fresh variables *)
1212

13-
(* TODO: this description is not clear *)
14-
15-
exception ARRAY_ACCESS
13+
exception (* TODO: this description is not clear *)
14+
ARRAY_ACCESS
1615

1716
val is_only_pt_by_fld_or_param_nonnull :
1817
Procdesc.t -> Tenv.t -> Prop.normal Prop.t -> Exp.t -> bool

infer/src/checkers/control.ml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@
88
open! IStd
99
module F = Format
1010
module L = Logging
11+
1112
(* forward dependency analysis for computing set of variables that
1213
affect the looping behavior of the program
1314

infer/src/checkers/dominators.ml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ open! IStd
88
open Graph
99
module L = Logging
1010
module CFG = ProcCfg.Normal
11+
1112
(* Use ocamlgraph's dominators functor to get the dominators *)
1213
module GDoms = Dominator.Make (ProcCfg.MakeOcamlGraph (CFG))
1314

0 commit comments

Comments
 (0)