Open aosq opened 3 years ago
With this change, I think the only difference between npm run test
and npm run test-corpus
is that test-corpus
generates the parser beforehand. This doesn't feel very clear from the script names. For example, in the README, we write
## Testing
```
$ npx tree-sitter generate
$ bin/test-corpus
```
when technically just $ bin/test-corpus
would do. What is the use case for this difference? Could we make a new script option that runs hh-errors
on all the case files a la bin/hh-errors "$($fd '\.(hack|php)$' test/cases)"
?
This PR removes the call to
bin/hh-errors
insidebin/test-corpus
.bin/test-corpus
is useful on its own and a user can always runbin/hh-errors
if they want to find those errors.This PR also renames
bin/hh-json
tobin/hh-parse
. This script runshh_parse
it just returns the output as JSON. Also using "parse" creates a nice symmetry with the VSCode taskts-parse
(which maybe we should add script for inbin/ts-parse
🤔).