flow-phabricator-parserA flow output parser to be use with phabricator
This is a simple wrapper - parser for node that will transform the output from flow() to something that phabricator can inspect in the linting stage.
How to use it.Install the package with
```lang=bash npm install flow-phabricator-parser --save-dev
oryarn add flow-phabricator-parser --dev
PATH_FROM_REPO_ROOT_TO_FLOWCONFIGin the above with the path to directory containing your project's
project.jsonfile. If it's at the root, remove
/PATH_FROM_REPO_ROOT_TO_FLOWCONFIGfrom the path above - including the
/prefix, so just
.is left. An optional parameter check can be pass at the end to the script so the line will look like
That will force to run flow in mode "check" (independent process) instead of status (server). Flow #6025 and Flow #1428 are issues that can be work around with this. Flow modes
Next we need to ensure the appropriate version of flow-bin is installed.
- Open up
.flowconfigfile at the root of your React Native project, and scroll to the bottom.
You should see a version, e.g.:
Install that version of flow-bin with:
```lang=bash npm install firstname.lastname@example.org --save-dev
oryarn add email@example.com --dev
we need to pass
./ProjectDiras the folder where flow will be run (AKA the folder of your
.flowconfigfile) relative to the root of the git repository.
- Flow is invoked for each file and the output processed for each different file.
- Right now, in very big projects with many dependencies in
node_modules; errors in the parsing are not impossible although really unlikely. To solve this we may need to move from
execFileto a more robust mechanism.