Skip to content
This repository has been archived by the owner on Oct 1, 2020. It is now read-only.

FlowMake performs typecheck for whole project #36

Open
glortho opened this issue Sep 16, 2016 · 8 comments
Open

FlowMake performs typecheck for whole project #36

glortho opened this issue Sep 16, 2016 · 8 comments

Comments

@glortho
Copy link

glortho commented Sep 16, 2016

The documentation for FlowMake says:

Triggers a type check for the current file.

Running this command shows failed type checks for all files in the repo. Looking at the source it appears this is the expected behavior? If so, the documentation should say something like 'Triggers a type check for all annotated files.'

@michaelowens
Copy link

Same is happening for me, both on save and FlowMake it will show errors for the whole project, not the current file.

@mvolkmann
Copy link

I think there really needs to be an option to only check the current file.

@mvolkmann
Copy link

mvolkmann commented Dec 18, 2016

I've been looking into this. I think there's a bug in the flow#typecheck function.
This line:

let flow_result = <SID>FlowClientCall('--timeout '.g:flow#timeout.' --retry-if-init false'.expand('%:p'), '2> /dev/null')

needs a space after --retry-if-init false.

However, I think the bigger issue is that this needs to use check-content in order to check just one file. I tried changing that line to this:

let flow_result = <SID>FlowClientCall('check-contents < '.expand('%:p').' --timeout '.g:flow#timeout.' --retry-if-init false', '2> /dev/null')

That generates only errors for the current file, but it apparently doesn't generate the desired output for populating the quickfix window.

I verified that "flow check-content" doesn't generate the same kind of error output as plain "flow". Pretty sure this is the issue with my attempted solution above. Not sure what I can do about that.

@mvolkmann
Copy link

Can we get some feedback from committers as to whether this is something that should be fixed? If it's desired to fix this, but nobody has time right now, I might be willing to submit a pull request.

@ckjoris
Copy link

ckjoris commented Dec 28, 2016

im not a committer, just want to let you know that theres a flow linter for https://github.com/w0rp/ale vim plugin, and it shows warnings for only current buffer.

@mvolkmann
Copy link

Wow, this was wonderful advice! It took me awhile to get it configured, but I'm loving ALE! I have switched from Syntastic to ALE. Here's a screenshot showing Flow in action. I customized the error and warning signs to be emojis.
screen shot 2016-12-31 at 4 08 13 am

@codeaholicguy
Copy link

I have the same question, is there any option to check the current buffer only?

@zfogg
Copy link

zfogg commented Apr 18, 2020

+1 to this

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

6 participants