hhvm icon indicating copy to clipboard operation
hhvm copied to clipboard

Allow the type checker to target a specific folder

Open milesj opened this issue 10 years ago • 2 comments

When using the Hack type checker, the .hhconfig must be present at the root of the source directory, which will type check the entire folder. However, this causes all errors from all code to be shown (which is OK), but can be very distracting when you are trying to fix type issues in a specific folder.

Would it be possible to mute all errors besides a target folder? Without breaking the relations/lookup from the other folders? Something like hh_client --filter=path/to/folder?

A guide on all the hh_client options would be nice too :P

milesj avatar Feb 18 '15 18:02 milesj

Sure -- should be fairly straightforward to filter down errors to ones that have a position in the target folder. (Remember errors are incompatibilities, so if something in path/to/folder is incompatible with some/other/path, you still want to show it.)

A guide on all the hh_client options would be nice too :P

The manpage has a quick summary of the ones that are expected to be well-supported going forward. There are a ton in there that have bitrotted or are more subject to change, which is why they are deliberately not well documented.

jwatzman avatar Feb 18 '15 19:02 jwatzman

This behavior can be emulated with hh_client --json | jq ..., where ... is a select expression that filters for the path you are interested in.

lexidor avatar Jul 03 '25 20:07 lexidor