Skip to content

Commit

Permalink
Format rules: register .ocamlformat-ignore dep
Browse files Browse the repository at this point in the history
Closes #1793

Signed-off-by: Etienne Millon <me@emillon.org>
  • Loading branch information
emillon committed Feb 11, 2019
1 parent 8607059 commit c4f9730
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/format_rules.ml
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ let depend_on_existing_paths paths =

let depend_on_files ~named dir =
subdirs_until_root dir
|> List.map ~f:(fun dir -> Path.relative dir named)
|> List.concat_map ~f:(fun dir -> List.map named ~f:(Path.relative dir))
|> depend_on_existing_paths

let gen_rules sctx (config : Dune_file.Auto_format.t) ~dir =
Expand All @@ -56,7 +56,7 @@ let gen_rules sctx (config : Dune_file.Auto_format.t) ~dir =
let resolve_program =
Super_context.resolve_program ~dir sctx ~loc:(Some loc) in
let ocamlformat_deps =
lazy (depend_on_files ~named:".ocamlformat" source_dir)
lazy (depend_on_files ~named:[".ocamlformat"; ".ocamlformat-ignore"] source_dir)
in
let setup_formatting file =
let open Build.O in
Expand Down

0 comments on commit c4f9730

Please sign in to comment.