Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Wait for the next maker first error (or end) to remove signs. #63

Merged
merged 1 commit into from
Mar 17, 2015

Conversation

Neki
Copy link
Contributor

@Neki Neki commented Mar 17, 2015

Some makers (e.g. rubocop running on JRuby) may take a few seconds to return the first error (in this case, because of the JVM startup time). Neomake currently removes all signs and errors as soon as :Neomake is called, but this is a problem with makers that take a while to start.

For instance, I have bound :Neomake to Bufwrite. Let's assume that a maker gave two errors, one on line 1 and one on line 2. If I fix the first error, then (out of habit) type :w, I have to wait a few seconds before the error on line 2 appears again.

With this PR, signs and errors are not cleared when :Neomake is called, but when the first maker starts returning an error or is finished. This helped my workflow with JRuby, and may be useful when #46 is implemented, as building/checking large projects can take some time before the current buffer is processed.

However, this could be an option rather than the default (or may be a bad idea in general :) ). What is your opinion about it?

@benekastah
Copy link
Collaborator

LGTM. Thanks!

benekastah added a commit that referenced this pull request Mar 17, 2015
Wait for the next maker first error (or end) to remove signs.
@benekastah benekastah merged commit 76dd07e into neomake:master Mar 17, 2015
@Neki
Copy link
Contributor Author

Neki commented Mar 18, 2015

Not sure why yet, but sometimes I have errors now that this PR is merged. You may want to revert the merge until I find the time to investigate. Sorry :(

@Neki
Copy link
Contributor Author

Neki commented Mar 18, 2015

And of course, now that I have some time to work on this, I can not reproduce the issue (it was something about b:neomake_signs_cleared not being defined - I was in a hurry and did not note the exact message).

Please notify me if you encounter an issue with this PR, I will try to fix it.

Edit: see #64 and #65.

@Neki Neki deleted the topic/remove_signs_on_first_result branch April 25, 2015 10:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants