The Hack type checker would benefit immensely from the ability to exclude files and folders from being checked. My primary use case:
foo/bar, a Hack library entirely in strict mode.foo/bar includes unit tests all in strict mode.foo/bar lists some unit testing library in the require-dev section of composer.json.hello/world, a Hack project which requires foo/bar.hello/world doesn't use the same unit testing library as foo/bar.foo/bar, it brings along the strict mode unit tests.foo/bar's unit tests.Being able to add a line to .hhconfig like exclude=vendor/**/tests, or at the very least, a list of directory names, e.g. exclude=vendor/foo/bar/tests:vendor/baz/biz/tests would be amazing.
In a commit on one of my projects, @fredemmott mentions that a library could add some export-ignore statements to their .gitattributes, but as he says, that doesn't help dev-$BRANCH dependencies.
I pored through the existing issues, checking that this isn't a dupe. The closest is #4855, which is close but no cigar. It's in the spirit of #4856, but I think the aim is different. It's also similar to #5611 in concept, but this feature request targets hh_server, not hh_format.
When Hack first launched I used to be against this, but having actually worked more extensively with Composer (and listened to a year of @fredemmott's complaining ;)) I think this makes a lot of sense. Unfortunately I never got around to it before I left the team at the end of last year, and it's fairly unlikely to get implemented anytime soon :(
Concrete use case: hhvm/user-documentation needs an HHVM source tree (and in the near future, an HSL source tree), to build the documentation. These are not used at runtime, and should not be typechecked - but they need to be available during the build process.
Submoduling them would be nice, but it would mean that .hhconfig can't be in the top level directory unless this is fixed.
Something like:
ignore_directories = data-sources/, vendor/**/tests/
Most helpful comment
https://github.com/facebook/hhvm/commit/dc34989d6d285898bedddbf57b812de33b626c69