Recently I’ve found two kinds of errors in one of our dune files:
- A
dirsstanza containing directories that do not exist, e.g.(dirs foo bar)when onlyfooexists. - A
dunefile inside a directory absent from adirsstanza in the parent, which meant it was ignored.
In both cases Dune did not report anything.
To catch such kinds of silly mistakes, it would be useful to have tools that might detect these and similar ones. Not necessarily by default, but maybe in a “strict” mode.
Is there already something that does that?
Note that the second case is debatable, since a dirs stanza means “just ignore everything in non-listed directories”. But, in practice, copy-paste errors, renamings and partial updates do happen. Having more sanity checks is always useful.