Neomake: flow maker not working

Created on 6 Dec 2015  Â·  6Comments  Â·  Source: neomake/neomake

I get the following log output

Neomake: Nothing to make: no enabled makers

in my vimrc

if has('autocmd')
    autocmd! BufWritePost * Neomake
endif

""" open list without moving the cursor; use :ll to jump to current error
let g:neomake_open_list = 2
""" verbose behaviour
"let g:neomake_verbose=3
""" error log file
let g:neomake_logfile=$HOME.'/.vim/log/neomake.log'
""" define error symbols in gutter
let g:neomake_warning_sign = {
  \ 'text': '✹',
  \ 'texthl': 'WarningMsg',
  \ }

let g:neomake_error_sign = {
  \ 'text': '✖',
  \ 'texthl': 'ErrorMsg',
  \ }

""" jump to next error
nnoremap <leader>ne :ll<CR>

let g:neomake_go_enabled_makers = ['gofmt', 'golint']
let g:neomake_go_enabled_makers = ['go', 'golint']
let g:neomake_php_enabled_makers = ['phpcs', 'php', 'phpmd']
let g:neomake_typescript_enabled_makers = ['tsc', 'tsclint']
let g:neomake_javascript_enabled_makers = ['flow']

Flow is installed and working.
Any advice?

Thx

Most helpful comment

Hey,

I found a workaround. I'm not sure whether it is a workaround or if it is the way it is supposed work (the README explicitly says it may be outdated...)

Any way I had to add flow as a javascript and as a jsx maker to make it work properly :

let g:neomake_javascript_enabled_makers = ['flow']
let g:neomake_jsx_enabled_makers = ['flow']

instead of just

let g:neomake_javascript_enabled_makers = ['flow']

Note that enabling it on jsx and not on javascript doesn't work neither. Did you have to use the same config as me? Is this the intended way this works? If so, it should be added somewhere in the docs...

All 6 comments

I am facing a similar issue with the Flow checker for Neomake. When I save, Neomake displays the following message (as expected):

screen shot 2015-12-31 at 10 58 01

However, using :ll, :lopen, and :copen reveal nothing about the error in the code.

I came across the same issue as @majjoha and decided to dig into a bit.

@iwyg, I'm unsure if what @majjoha and I are experiencing is the same as what you are experiencing. If not, I'm happy to move my info to a separate issue. But, just as a starter have you tried just doing a :let g:neomake_javascript_enabled_makers in Vim and observing the output to make sure flow is listed? Perhaps your .vimrc just needs to be sourced after specifying the makers.

I believe the errors are not being displayed in the location list because the error format for the flow maker is invalid. Invalid entries are hidden by default as a result of #114.

I tried my hand at changing the error format myself and found a few useful bits of info:

  • There is a --from=vim option for the command that outputs a slightly more Vim-parseable error message.
  • Facebook has their own Vim Flow plugin here that's a nice reference: https://github.com/flowtype/vim-flow/blob/master/plugin/flow.vim#L38
  • As far as I could tell there's no real way to run flow on only one file. The file paths given to the command seem to be ignored so flow will just output all the errors for your entire project on every run. I have a feeling this is because flow errors can span across multiple files. Meaning you may have a type error on a function that you pulled in from another file, so flow will tell you how the error relates to both files.

So, given the above info I was able to get a couple of different usable options:

_Short Version_:
single_line_vim_short

_Long Version_:
single_line_vim_long

Flow's output is arguably too hard to compact into a single-line message so in both cases the errors are little cryptic, but at least the errors and markers are there as indicators.

I have a work-in-progress PR going here: https://github.com/benekastah/neomake/pull/264. I'm new to both VimL and Flow so any tips or suggestions are welcome.

Still seeing the issue after #265 was merged. (Flow 0.25).

Log says:

2016-05-24T21:26:24+0300 Log level 3: Neomake: Nothing to make: no enabled makers

While:

let g:neomake_javascript_enabled_makers = ['flow']

What does :echo executable('flow') &ft display?

Hello,

I am encountering the exact same issue as @iwyg, and @npbee's work (#264) apparently didn;t have anything to do with it...

:echo executable('flow') &ft displays 1 javascript.jsx. I have no clue on what to dig on this issue.

Did @iwyg or anyone happen to find a fix for it?

Thanks

Hey,

I found a workaround. I'm not sure whether it is a workaround or if it is the way it is supposed work (the README explicitly says it may be outdated...)

Any way I had to add flow as a javascript and as a jsx maker to make it work properly :

let g:neomake_javascript_enabled_makers = ['flow']
let g:neomake_jsx_enabled_makers = ['flow']

instead of just

let g:neomake_javascript_enabled_makers = ['flow']

Note that enabling it on jsx and not on javascript doesn't work neither. Did you have to use the same config as me? Is this the intended way this works? If so, it should be added somewhere in the docs...

Was this page helpful?
0 / 5 - 0 ratings

Related issues

dolohow picture dolohow  Â·  5Comments

msecret picture msecret  Â·  4Comments

sassanh picture sassanh  Â·  6Comments

stjepang picture stjepang  Â·  4Comments

nathanajah picture nathanajah  Â·  6Comments