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

FlowMake performs typecheck for whole project #36

Open

Description

@glortho

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.'

Activity

  1. michaelowens commented on Oct 4, 2016

    @michaelowens

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

  2. mvolkmann commented on Dec 18, 2016

    @mvolkmann

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

  3. mvolkmann commented on Dec 18, 2016

    @mvolkmann

    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.

  4. mvolkmann commented on Dec 27, 2016

    @mvolkmann

    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.

  5. ckjoris commented on Dec 28, 2016

    @ckjoris

    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.

  6. mvolkmann commented on Dec 31, 2016

    @mvolkmann

    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

  7. codeaholicguy commented on Jul 6, 2017

    @codeaholicguy

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

  8. zfogg commented on Apr 18, 2020

    @zfogg

    +1 to this

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions