I have OCaml project and in vendor folder I have some libraries that are not of my own, I don't want to run ocamlformat on them I tried this
# .ocamlformat
profile = default
version = 0.24.1
# .ocamlformat-ignore
vendor/*
But when I run dune build @fmt
I see a lot of errors regarding the vendor
folder
(cd _build/default && /home/geckos/.opam/coq-of-solidity/bin/ocamlformat --intf vendor/ocaml-solidity/src/solidity-typechecker/solidity_typechecker.mli) > _build/default/vendor/ocaml-solidity/src/solidity-typechecker/.formatted/solidity_typechecker.mli
ocamlformat: Error while parsing /home/geckos/code/coq-of-solidity/_build/default/vendor/ocaml-solidity/.ocamlformat:
Project should be formatted using ocamlformat version "0.15.0", but the installed version is "0.24.1"
For option "align-cases": This option has been removed in version 0.22.
For option "align-constructors-decl": This option has been removed in version 0.22.
For option "align-variants-decl": This option has been removed in version 0.22.
For option "let-open": This option has been removed in version 0.17. Concrete syntax will now always be preserved.
Having
vendor/**
in your .ocamlformat-ignore file should fix your issue. No need to have a line for each sublevel of your vendor directory.